feat(ci): add Claude Code Action with lerobot-specific config#3323
feat(ci): add Claude Code Action with lerobot-specific config#3323
Conversation
…ials: false Fixes pre-commit zizmor failures from PR #3322: - Pin anthropics/claude-code-action@v1 to commit hash (26ddc358) to satisfy blanket pinning policy - Add persist-credentials: false to actions/checkout steps to suppress credential-persistence warning - Remove trailing blank lines to satisfy end-of-file-fixer Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add CLAUDE.md with lerobot-specific review instructions (core abstractions, engineering principles, ML-specific checks, PR checklist) - Enable use_sticky_comment: true on both workflows (single updating comment per PR) - Add structured lerobot-specific review prompt to claude-code-review.yml - Upgrade permissions: contents/pull-requests/issues write for interactive claude.yml - Add actions: read to claude-code-review.yml for CI log access - Set FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true to suppress Node.js 20 deprecation warnings Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…borators Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
CLAUDE.md is CI-only config — moving it to .github/ ensures it is not visible at the repo root when contributors clone lerobot. Both workflows now explicitly reference .github/CLAUDE.md in their prompt/system-prompt. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
.github/workflows/claude.yml
Outdated
| (github.event.issue.author_association == 'OWNER' || github.event.issue.author_association == 'MEMBER' || github.event.issue.author_association == 'COLLABORATOR')) | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write |
There was a problem hiding this comment.
We should probably decrease the permission to read, to prevent prompt-injection.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
I'll analyze this and get back to you. |
|
Claude finished @imstevenpmwork's task in 5m 9s —— View job Comparing PR #3323 vs PR #3332
I wasn't able to fetch #3332's description directly, but I compared its code (now on Scope
Security approach
Other differences
Summary
If this PR is to be merged on top of what's already on |
|
@claude what’s up |
| id-token: write | ||
| actions: read | ||
| env: | ||
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true |
| actions: read | ||
|
|
||
| claude_args: '--system-prompt "Read .github/CLAUDE.md for lerobot-specific conventions before responding."' | ||
| # See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md |
There was a problem hiding this comment.
@claude could you summarize the information in this link?
|
Claude finished @imstevenpmwork's task in 26s —— View job
I'm unable to close PRs due to permission limitations of the GitHub App. You can close this PR manually by clicking the "Close pull request" button below, or by running: The comment explaining the closure has already been covered in the discussion above — #3332 (merged via #3333) provides the security-hardened Claude Code Action setup that is now on |
|
Superseded by: #3332 |

Summary
Adds Claude Code Action integration, building on and fixing the pre-commit failures from #3322.
.github/CLAUDE.md— repo-specific instructions Claude reads on every run: core abstractions, engineering principles, ML-specific checks (data leakage, loss correctness, DDP safety), and a PR checklist. Kept in.github/so it does not appear at the repo root for contributors.claude-code-review.yml— auto-reviews every PR with a structured lerobot-specific prompt, usingclaude-opus-4-6. Posts a single sticky comment (no thread spam).claude.yml— responds to@claudementions in PR/issue comments and reviews. Restricted toOWNER,MEMBER, andCOLLABORATORto prevent public API abuse.Both workflows: pinned action SHA,
persist-credentials: false,FORCE_JAVASCRIPT_ACTIONS_TO_NODE24, andactions: readfor CI log access.Test plan
pre-commit run --all-filespasses@claudeon a PR and verify response