-
Notifications
You must be signed in to change notification settings - Fork 2.5k
chore(repo): setup claude code #31380
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
View your CI Pipeline Execution ↗ for commit 7916be2.
☁️ Nx Cloud last updated this comment at |
1f9f27e
to
fd9ef50
Compare
.github/workflows/claude.yml
Outdated
permissions: | ||
contents: read | ||
pull-requests: read | ||
issues: read | ||
id-token: write |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current permissions configuration only grants read access to repository contents and pull requests, which will limit Claude's ability to respond effectively. For Claude to create comments, make commits, or implement code changes, the workflow needs write permissions for these resources.
Consider updating the permissions block to:
permissions:
contents: write
pull-requests: write
issues: read
id-token: write
This will allow Claude to fully interact with the repository when responding to requests.
permissions: | |
contents: read | |
pull-requests: read | |
issues: read | |
id-token: write | |
permissions: | |
contents: write | |
pull-requests: write | |
issues: read | |
id-token: write |
Spotted by Diamond
Is this helpful? React 👍 or 👎 to let us know.
d3f65ce
to
00f2d80
Compare
00f2d80
to
62b6d1f
Compare
2e3d964
to
5b9d860
Compare
29f8f00
to
e972ce1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Integrate Claude Code AI assistant capabilities into the Nx repository via GitHub Actions and workspace configuration.
- Add GitHub Actions workflow to trigger Claude on issue/PR events and configure environment caching
- Introduce CLAUDE.md, .claude/settings.json, and .mcp.json for Claude usage and MCP integration
- Update repository config (package.json, CONTRIBUTING.md, CODEOWNERS) to include new dependencies and guidelines
Reviewed Changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 4 comments.
Show a summary per file
File | Description |
---|---|
package.json | Add/remove Nx packages, include nx-mcp dependency |
CONTRIBUTING.md | Extend contribution guide with tech stack and interactive commits |
CODEOWNERS | Assign ownership for Claude-related files |
CLAUDE.md | New AI assistant usage and workflow instructions |
.mcp.json | Model Context Protocol server configuration |
.github/workflows/claude.yml | New workflow for Claude Code triggers and installation steps |
.github/workflows/ci.yml | Add pnpm, Rust, and Gradle caching steps to existing CI jobs |
.claude/settings.json | Claude Code permissions and timeout settings |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (1)
CLAUDE.md:1
- [nitpick] Add a top-level header (e.g.,
# Claude Code AI Assistant Guidelines
) to clearly introduce this document.
When responding to queries about this repository:
@@ -270,6 +270,7 @@ | |||
"npm-package-arg": "11.0.1", | |||
"nuxt": "^3.10.0", | |||
"nx": "21.2.0-beta.1", | |||
"nx-mcp": "^0.0.9", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The nx-mcp
tool is primarily a development utility; consider moving it from dependencies
into devDependencies
to align with its usage.
Copilot uses AI. Check for mistakes.
- `docs` - Markdown and configuration files for documentation including tutorials, guides for each supported platform, | ||
and API docs. | ||
- `nx-dev` - Source code for the Nx documentation site which displays the markdown in `docs` and more. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are two docs
bullets in this list—consolidate them into a single entry to avoid duplication.
- `docs` - Markdown and configuration files for documentation including tutorials, guides for each supported platform, | |
and API docs. | |
- `nx-dev` - Source code for the Nx documentation site which displays the markdown in `docs` and more. | |
- `docs` and `nx-dev` - The `docs` folder contains markdown and configuration files for documentation, including tutorials, guides for each supported platform, and API docs. The `nx-dev` folder contains the source code for the Nx documentation site, which renders the content from `docs` and provides additional features. |
Copilot uses AI. Check for mistakes.
.mcp.json
Outdated
"mcpServers": { | ||
"nx": { | ||
"command": "pnpm", | ||
"args": ["nx-mcp", "/home/jason/projects/nx"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid hard-coded absolute paths in configuration; make the workspace root path configurable or use a relative path for portability.
"args": ["nx-mcp", "/home/jason/projects/nx"], | |
"args": ["nx-mcp", "${WORKSPACE_ROOT}/nx"], |
Copilot uses AI. Check for mistakes.
.github/workflows/ci.yml
Outdated
@@ -61,11 +61,32 @@ jobs: | |||
version: 9.8.0 | |||
run_install: false | |||
|
|||
- name: Cache pnpm store |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The pnpm/Rust/Gradle caching blocks are duplicated across multiple jobs; consider extracting them into a reusable workflow or composite action to reduce repetition.
Copilot uses AI. Check for mistakes.
e972ce1
to
3c5dc6f
Compare
0e69b18
to
0cde62f
Compare
0cde62f
to
9255ed0
Compare
099b16a
to
874ec7d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR integrates Claude Code AI assistant into the Nx repository by adding GitHub Actions workflows and workspace configuration, updating dependencies, and enhancing documentation and contribution guidelines.
- Added a new GitHub Actions workflow (
claude.yml
) to trigger Claude Code on issue and PR events, and updated the existing CI workflow (ci.yml
) to install pnpm, cache Rust, and unify environment settings. - Introduced Claude integration docs (
CLAUDE.md
), command reference guides under.claude/commands
, and Model Context Protocol configuration (.mcp.json
). - Updated
package.json
with new AI-related dependencies, enhancedCONTRIBUTING.md
with project structure and commit guidelines, and assigned CODEOWNERS for Claude files.
Reviewed Changes
Copilot reviewed 15 out of 16 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
packages/nx/src/command-line/affected/command-object.ts | Expanded the help description for the affected command to clarify which projects are considered affected. |
package.json | Added @nx/conformance , @nx/enterprise-cloud , and nx-mcp dependencies and removed duplicate entries. |
CONTRIBUTING.md | Updated top-level folder list and added detailed commit guidelines and scopes. |
CODEOWNERS | Assigned ownership of Claude integration files to @FrozenPandaz. |
CLAUDE.md | New documentation outlining how to use Claude Code within this repo. |
.mcp.json | Configured the Model Context Protocol server for Nx workspace integration. |
.github/workflows/claude.yml | Added a workflow to run Claude Code on issue/PR interactions with appropriate permissions. |
.github/workflows/ci.yml | Updated CI to include pnpm setup, Node 20 caching, Rust caching, and consistent dependency installation. |
.claude/settings.json | Specified Claude Code permissions, enabled MCP servers, and extended timeouts. |
.claude/commands/issue-workflow-guide.md | Provided guidance for triggering planning and implementation workflows via Claude. |
.claude/commands/gh-issue-plan.md | Detailed template and steps for GitHub issue planning and resolution. |
.claude/commands/commit.md | Defined the automated commit command, validation requirements, and message format. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (1)
.github/workflows/ci.yml:70
- [nitpick] The Rust caching and setup steps are duplicated across multiple job definitions. Consider extracting them into a reusable workflow or composite action to reduce duplication and simplify maintenance.
- - name: Cache Rust toolchain and cargo registry
- `packages` - Source code for Nx packages such as Angular, React, Web, NestJS, Next and others including generators and | ||
executors (or builders). | ||
- `e2e` - E2E tests for the Nx packages | ||
- `graph` - Source code for the Nx Graph application which shows the project graph, task graph, project details, and more in the browser. | ||
- `docs` - Markdown and configuration files for documentation including tutorials, guides for each supported platform, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are duplicate entries for docs
and e2e
in the top-level folder list. Consider consolidating or removing outdated bullets to avoid confusion.
Copilot uses AI. Check for mistakes.
23329b7
to
50a1746
Compare
50a1746
to
7916be2
Compare
4. Run appropriate tests and validation | ||
5. If the tests, are not passing, please fix the issues and continue doing this up to 3 more times until the tests pass | ||
6. Once the tests pass, push a branch and then suggest opening a PR which has a description of the changes made, and that | ||
it make sure that it explicitly says "Fixes #ISSUE_NUMBER" to automatically close the issue when the PR is merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a grammatical error in this sentence. It should be "make sure that it explicitly says" rather than "it make sure that it explicitly says".
it make sure that it explicitly says "Fixes #ISSUE_NUMBER" to automatically close the issue when the PR is merged. | |
make sure that it explicitly says "Fixes #ISSUE_NUMBER" to automatically close the issue when the PR is merged. |
Spotted by Diamond
Is this helpful? React 👍 or 👎 to let us know.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not looked yet as a bit late for me, but should be a chore not a feat otherwise it’ll be in the changelog
## Current Behavior The Claude Code setup has basic workflow automation but lacks comprehensive tooling permissions and detailed guidance for issue management. The workflow documentation contains redundant sections and some outdated commands. ## Expected Behavior With these changes, the Claude Code integration will have: - Enhanced tool permissions for better CI/CD workflow support - Comprehensive GitHub CLI commands for efficient multi-issue management - Clear mandatory requirements for PR template completion - Streamlined documentation with accurate command references ## Related Issue(s) This PR builds upon the initial Claude Code setup from #31380 by refining the workflow configuration and improving the developer experience.
Summary
This PR integrates Claude Code AI assistant capabilities into the Nx repository through GitHub Actions and workspace configuration.
Changes Made
🤖 GitHub Actions Integration
.github/workflows/claude.yml
: GitHub Actions workflow that triggers Claude Code on:@claude
@claude
@claude
@claude
in title or body📝 Project Documentation & Configuration
CLAUDE.md
: Comprehensive instructions for Claude Code including:.claude/settings.json
: Claude Code permissions and environment configuration.mcp.json
: Model Context Protocol server configuration for Nx workspace integration🔧 Workspace Setup
package.json
: Addednx-mcp
dependency for enhanced workspace integrationpnpm-lock.yaml
: Lock file changes for new dependency.gitignore
: Added Claude-specific ignore patternsCODEOWNERS
: Assigned ownership of Claude-related files to @FrozenPandazCONTRIBUTING.md
: Enhanced contribution guidelines with technology stack informationBenefits
Usage
After this PR is merged, team members and contributors can:
@claude
in issues or PRs to get AI assistanceFor more information, see the Claude Code documentation.
Test Plan
🤖 Generated with Claude Code
Co-Authored-By: Claude noreply@anthropic.com