Skip to content

chore: add setup:claude command to bootstrap Claude Code config - #131

Closed
Phanco wants to merge 1 commit into
mainfrom
feature/pro-251-chore-add-claude-command-to-generate-skills-in-the-repo
Closed

chore: add setup:claude command to bootstrap Claude Code config#131
Phanco wants to merge 1 commit into
mainfrom
feature/pro-251-chore-add-claude-command-to-generate-skills-in-the-repo

Conversation

@Phanco

@Phanco Phanco commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds opt-in npm run setup:claude that syncs a tracked claude-setup/ template into a local (gitignored) .claude/, deep-merging settings.json on re-runs.
  • Seeds claude-setup/settings.json with marketplace + plugin config (zama-developer@zama-marketplace, typescript-lsp@claude-plugins-official, building-secure-contracts@trailofbits) plus repo-tuned npm/Hardhat permission allowlist.
  • Empty claude-setup/skills/ and claude-setup/commands/ ready for shared skills/commands without enforcing them on developers.

Closes PRO-251.

Test plan

  • Run npm run setup:claude on a fresh checkout — .claude/ is created with the synced settings and plugins.
  • Run again with an existing .claude/settings.json — verify deep merge (template wins on conflicts, arrays unioned).
  • Confirm Claude Code picks up building-secure-contracts skills.

🤖 Generated with Claude Code

Adds an opt-in `npm run setup:claude` script that syncs a tracked
`claude-setup/` template into a local `.claude/` directory, then registers
the `zama-marketplace` and `trailofbits` plugin marketplaces and installs
`zama-developer` and `building-secure-contracts`. Lets developers pick up
shared skills and commands without enforcing them across the team.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Phanco
Phanco requested review from a team and mortendahl as code owners April 30, 2026 11:03
@cla-bot cla-bot Bot added the cla-signed label Apr 30, 2026
@gasp

gasp commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

why specifically "claude" and not pnpm setup:agents to be agent-agnostic?

"Bash(npx hardhat test)",
"Bash(npx hardhat:*)"
],
"ask": [

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest we also add some network commands to the ask list by default:

"Bash(curl:*)",
"Bash(wget:*)",
"Bash(nc:*)",
"Bash(ssh:*)",
"Bash(scp:*)",
"Bash(rsync:*)"

And maybe also some "cheat code" commands that can be used to get around the other permission blocks:

"Bash(eval:*)",
"Bash(bash -c:*)",
"Bash(sh -c:*)"

"Bash(npm run format:*)",
"Bash(npx hardhat compile)",
"Bash(npx hardhat test)",
"Bash(npx hardhat:*)"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could potentially be dangerous if a prod .env file is present in a project and claude starts running live transaction scripts. Not aware of any real examples, but just a thought. wdyt?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think at least putting npx hardhat run:* and npc hardhat deploy:* into deny/ask would be preferable.

@melanciani

Copy link
Copy Markdown
Collaborator

not relevant anymore, we can go back at it if needed

@melanciani melanciani closed this Jul 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants