Skip to content
Projetos

Sobre

One-command /claude-ready skill that audits any repo and scaffolds lean CLAUDE.md, scoped rules, permissions, and hooks.

IA e aprendizado de máquina

Como estes números são medidos

Crescimento medido de estrelas

em 24 h
+9
em 7 dias
Coletando histórico
em 15 dias
Coletando histórico
em 1 mês
Coletando histórico

Variações líquidas em períodos sobrepostos, não totais diários. Medições ausentes ficam em branco. Estrelas indicam interesse, não qualidade.

README.md

Original

claude-ready

One manual Claude Code skill (/claude-ready) that audits a repository and sets up a lean CLAUDE.md, path-scoped .claude/rules/, and .claude/settings.json permissions and hooks.

This repo covers only the initial repo setup and config audits you otherwise repeat on every project, without duplicating workflows Claude Code already handles.

Requirements

  • Claude Code CLI (v2.1.286+ recommended for /doctor prompt-audit, /auto-mode-setup, and pre-commit /verify; core skill works on v2.1+), Git, and Bash (macOS, Linux, or Windows via Git Bash / WSL)
  • jq (only if you enable PreToolUse, PostToolUse, or Stop command hooks)
  • gh CLI (optional; not used by /claude-ready, only for general Claude Code GitHub PR/issue workflows)

Install

Clone the repo:

git clone https://github.com/shifulegend/claude-ready.git
cd claude-ready

Pick one install scope (add --dry-run to preview without writing files):

Global (all repos on your machine)

Best for solo use. Nothing is added to a project until you run /claude-ready.

bash scripts/install.sh --global

Per-repo (shared with a team)

Copies the skill into a repository; commit .claude/skills/claude-ready/SKILL.md so teammates and repo-backed Cloud sessions load it:

bash scripts/install.sh --repo "/path/to/your-repo"

Symlink (stays synced with this repo)

Links skills/claude-ready into a target repo without copying files (macOS, Linux, and WSL; on Windows Git Bash, use --global or --repo). Do not commit the symlink (it points to your local clone path); add .claude/skills/claude-ready to .git/info/exclude or use --global for solo work:

bash scripts/install.sh --symlink "/path/to/your-repo"

How to use it

1. Start Claude Code in your repo

cd "/path/to/your-repo"
claude

Run /skills to confirm claude-ready appears.

2. Run /claude-ready

Type /claude-ready and press Enter.

The first pass is read-only. It checks git status, your project manifests (package.json, pyproject.toml, Makefile, Cargo.toml, go.mod, workspace configs, CI workflows), and any existing Claude config (CLAUDE.md, AGENTS.md, .claude/, .mcp.json, .gitignore).

3. Answer the setup questions

Claude prints a short gap report covering existing config issues (such as a CLAUDE.md over 200 lines, emphatic/redundant rules, or missing .gitignore entries), the fastest single-file test and lint commands it found, and sensitive paths like .env* or secrets/.

It then stops and asks 3 to 5 questions. Reply Accept defaults, skip the codebase summary or customize in one message (for example, in a TypeScript repo):

1. Allow pnpm tsc --noEmit, pnpm vitest run *, and pnpm lint *. tsc takes 2s, so add a Stop hook for tsc and a PostToolUse Prettier hook.
2. Do not copy patterns from src/legacy/.
3. Block .env secret files (keep .env.example readable) and secrets/**, and update .gitignore. Do not touch src/gen/.
4. Add .claude/rules/api.md scoped to src/api/**/*.ts.
5. Skip the codebase summary and write the files.

4. Review and commit

After you approve, Claude writes only what you asked for, merging into any existing CLAUDE.md, .claude/settings.json, or .gitignore instead of overwriting them:

  • CLAUDE.md: exact commands, non-obvious conventions, and env gotchas (target under 80 lines, hard cap under 200)
  • .claude/rules/<area>.md: conventions that load only on matching file paths
  • .claude/settings.json: allow, ask, and deny rules plus any hooks you enabled

Check git status and git diff before committing. Commit CLAUDE.md, .claude/rules/, .claude/settings.json, .claude/skills/ (if installed with --repo), and .mcp.json (if used). Keep CLAUDE.local.md and .claude/settings.local.json in .gitignore.

For daily workflows after setup, use Claude Code's built-in Plan Mode, /code-review, and /ship.

5. Verify the setup

Run these built-in checks one at a time after setup:

/context all
/doctor prompt-audit

/context all confirms CLAUDE.md loaded and shows its token footprint. /doctor prompt-audit flags broken paths, conflicting rules, or instructions newer models no longer need. Re-run it after major model upgrades to trim old rules.

Optional next steps:

  • Run /auto-mode-setup to configure trusted repos, buckets, and domains in ~/.claude/settings.json (Claude Code ignores autoMode in repo .claude/settings.json).
  • Run /verify to record .claude/skills/verify/SKILL.md for pre-commit app checks (or /run-skill-generator for complex launch steps).
  • Test your deny rules by asking What is in .env? (confirm the read is denied while .env.example stays readable). If you enabled a Stop hook, it skips turns when your git working tree is clean; introduce a lint or type error matching your hook command and send a short prompt to verify the hook exits with code 2 and prints the error to stderr.

What's in this repo

Workflow diagramimage

Settings gotchas and troubleshooting

Rules that commonly break hand-edited .claude/settings.json files (see SECURITY.md for the full threat model):

  • deny beats ask, and ask beats allow. deny runs before the Auto Mode classifier sees the tool call.
  • Use Edit(path) to deny file edits and writes (Edit covers Edit, Write, and NotebookEdit; Write(path) is a no-op warning).
  • Put a space before a trailing * (Bash(pnpm lint *), not Bash(pnpm lint*)).
  • Never wildcard execution wrappers (Bash(npx *), Bash(docker exec *), Bash(sudo *)). Include both the wrapper and the specific inner command (e.g., Bash(npx vitest run *) or Bash(docker exec app npm test)), or run the inner command directly.
  • Pair .env deny rules with /sandbox if you want OS-level blocking against scripts reading files directly. Command hooks run outside /sandbox with your user privileges.
Issue Likely cause Fix
/claude-ready not in /skills Wrong folder, lowercase filename, or reserved name collision Check ~/.claude/skills/claude-ready/SKILL.md (or .claude/skills/claude-ready/SKILL.md for --repo/--symlink); avoid ship, ship-local, steward, synced, anthropic-skills / anthropic-skills:*
A .claude/rules/ file loads unconditionally on every session YAML syntax error in paths: Run claude --debug to inspect the parse error
PostToolUse or Stop hook silently skips (or fails) Missing jq or local tool binary (starter templates exit 0 when missing) Install jq and confirm your formatter/linter binary exists; run claude --debug for custom hook errors
autoMode rules in .claude/settings.json do nothing Project-scope autoMode is ignored by design Move autoMode to ~/.claude/settings.json or run /auto-mode-setup
HTTP MCP server in .mcp.json is skipped Missing "type": "http" field Add "type": "http" next to "url" and check /mcp
Personal skill missing in Cloud sessions Cloud sessions do not read ~/.claude/skills/ Commit the skill under .claude/skills/ in the repo
Claude keeps ignoring a CLAUDE.md rule File is too long, vague, or needs deterministic enforcement Trim with /doctor prompt-audit or move the rule to a hook or permissions.deny

Contributing and license

Run bash scripts/validate.sh (requires python3; CI also runs shellcheck) before opening a PR. See CONTRIBUTING.md for repo rules.

Built against the Claude Code documentation and talks by Boris Cherny and the Anthropic Claude Code team.

MIT License. See LICENSE.

Explore projetos relacionados

Carregando…