Claude Code Repository Conventions Guide
A reference skill that feeds Claude the architecture, naming rules, and tool/command patterns of the Claude Code CLI codebase.
Dev & CodingAdvanced★ 3,213⑂ 3,644AI score 6/10Last updated: Apr 22, 2026
What it does
A single-file reference skill that captures the background knowledge needed to work inside the Claude Code CLI repository (TypeScript, ~1,900 files / 512k+ lines).
- Tables mapping 30+ directories under
src/(commands, tools, components, services, coordinator, memdir, ...) - Startup sequence
main.tsx→entrypoints/init.ts→entrypoints/cli.tsxplus core files (QueryEngine.ts,Tool.ts,tools.ts) - Code templates for defining tools with
buildTool()and the three command types: PromptCommand / LocalCommand / LocalJSXCommand - Permission system (default / plan / bypassPermissions / auto), wildcard rules like
Bash(git *), andcheckPermissions()expectations - Ink + React UI structure, AppState store,
bun:bundlefeature flags, naming/import conventions, and config file locations
Who it's for
- Developers modifying the Claude Code CLI or a fork/similar large TypeScript CLI
- Anyone studying a real-world architecture built on Ink (React for CLI) + Bun + Zod
- Engineers designing agent tools, slash commands, or permission layers who want a reference template
Examples
- "Add a
/changelogslash command" → Claude follows the PromptCommand pattern, setsallowedTools, and registers it incommands.ts. - "Create a tool that deletes files" → uses the
buildTooltemplate and never skipscheckPermissions()/isReadOnly(), validating input with Zod. - "How should experimental features be hidden?" → explains gating via
feature('PROACTIVE')frombun:bundleor env-var checks.
· · · Install guide · · ·
Install in the Claude app (no terminal)
- Download the ZIP with the button below.
- In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
- Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Install in Claude Code
Let Claude do it — paste this into Claude Code
Install the skill I found on Claude Skill Mart. Copy the Skill.m folder from the GitHub repo codeaashu/claude-code into my ~/.claude/skills/claude-code-skill/. When it's done, tell me in one line what this skill can do.
Install with a command instead
git clone https://github.com/codeaashu/claude-code.git /tmp/cc-skill && mkdir -p ~/.claude/skills/claude-code-skill && cp /tmp/cc-skill/Skill.md ~/.claude/skills/claude-code-skill/SKILL.md⚠ This is a third-party skill. Check the source repository before installing.
- Open your terminal.
- Clone the repo into a temp folder:
git clone https://github.com/codeaashu/claude-code.git /tmp/cc-skill - Create the skill folder:
mkdir -p ~/.claude/skills/claude-code-skill - Copy the skill file:
cp /tmp/cc-skill/Skill.md ~/.claude/skills/claude-code-skill/SKILL.md - Confirm the
---front matter at the top hasnameanddescription(without them the skill won't load). - Restart Claude Code and run
/skillsto verify it appears. - While working in that codebase, ask things like "add a new tool following the repo conventions" to trigger the skill.
View source on GitHub ↗License: NOASSERTION