Claude Code Customization
Claude Code has its own file-based customization system, parallel to Copilot's. This page covers the files you commit to a repo so the whole team gets the same behavior: CLAUDE.md, skills, subagents, hooks, permission settings, and MCP configuration.
Claude Code ships updates frequently. Treat the field names and examples here as a starting point and check the Claude Code docs for the current details.
Overview โ Which File Does What?โ
| File | Location | Activation | Primary Use |
|---|---|---|---|
CLAUDE.md | Repo root (and subfolders) | Loaded at session start; subfolder files when Claude works there | Project context, commands, conventions |
SKILL.md | .claude/skills/<skill-name>/ | Claude loads it when the description matches the task, or you run /skill-name | Packaged workflows with supporting files |
| Subagents | .claude/agents/*.md | Claude delegates to them, or you ask for one by name | Specialized workers with their own context, tools, and model |
| Settings | .claude/settings.json | Always | Permissions, hooks, environment variables |
| MCP config | .mcp.json (repo root) | Always (after you approve the servers) | External tools and data sources |
Personal versions of most of these live in ~/.claude/ and apply to all your projects. Personal overrides for one repo go in .claude/settings.local.json. When Claude Code creates that file itself it adds it to your global git excludes; if you create it by hand, add it to .gitignore yourself.
CLAUDE.mdโ
The main project context file โ stack, commands, conventions. It's covered in Prompt Engineering โ Claude Code. Two points matter for teams:
- Keep it short. It is sent with every request. Put long, task-specific procedures in a skill instead.
- Share with other tools through
AGENTS.md. If the repo already has anAGENTS.md, add@AGENTS.mdat the top ofCLAUDE.mdto import it rather than duplicating its content. Claude Code only readsAGENTS.mdon its own when there's noCLAUDE.md,CLAUDE.local.md, or.claude/CLAUDE.mdin the working directory or above it.
Skillsโ
Skills use the same open Agent Skills format as Copilot: a folder with a SKILL.md and optional supporting files (scripts, templates, reference docs).
---
name: release-notes
description: Drafts release notes from merged PRs since the last tag. Use when the user asks for release notes, a changelog entry, or a summary of what shipped.
---
# Release Notes
1. Find the latest tag with `git describe --tags --abbrev=0`.
2. List merged PRs since that tag with `gh pr list --state merged --search "merged:>=<tag date>"`.
3. Group changes into Features, Fixes, and Internal.
4. Follow the format in `template.md` in this folder.
- Only
nameanddescriptionare loaded up front; the rest is read when the skill is used. A precise description is what makes the skill trigger. - A skill is also available as a slash command (
/release-notes) unless its frontmatter setsuser-invocable: false. Adddisable-model-invocation: truefor workflows that should only run when a person asks โ deploys, for example. - Custom slash commands from
.claude/commands/still work, but skills are the current format for them.
Copilot also discovers skills in .claude/skills/, so one skill folder can serve both tools.
Subagentsโ
A subagent runs a task in its own context window and returns only a summary. That keeps searches, log analysis, and other noisy work out of the main conversation, and lets you run the work on a cheaper model.
---
name: test-runner
description: Runs the test suite and reports failures with likely causes. Use after code changes or when the user asks to run tests.
tools: Bash, Read, Grep, Glob
model: haiku
---
Run `npm test`. If tests fail, read the failing test and the code under test,
and report each failure with the file, the assertion, and the most likely cause.
Do not edit files.
toolsrestricts what the subagent can do. Omit it to inherit all of the main session's tools.modelcan behaiku,sonnet,opus,inherit, or a full model ID. If you omit it, the subagent uses theCLAUDE_CODE_SUBAGENT_MODELenvironment variable when set, otherwise the main conversation's model โ so set it explicitly when the point is to save cost.- Claude Code includes built-in subagents โ such as Explore (read-only codebase search) and Plan โ so check whether one fits before writing your own. The built-ins run on the main conversation's model; define your own with
model: haikuto run exploration cheaply.
For the bigger picture, see Multi-Agent Orchestration and Token Consumption Optimization.
Hooksโ
Hooks are shell commands that Claude Code runs at fixed points โ before or after a tool call, when you submit a prompt, when Claude finishes. Unlike instructions, they always run: use them for rules that must never be skipped.
Hooks are configured in .claude/settings.json. The hook receives the event as JSON on stdin. This example formats every file Claude edits with the project's installed Prettier (it needs jq on the developer's machine):
{
"hooks": {
"PostToolUse": [
{
"matcher": "Edit|Write",
"hooks": [
{
"type": "command",
"command": "jq -j '.tool_input.file_path, \"\\u0000\"' | xargs -0 npx --no-install prettier --write"
}
]
}
]
}
}
Common uses:
PostToolUseโ format or lint files after editsPreToolUseโ block a tool call; a hook that exits with code 2 stops the call and shows its stderr to Claude (for example, refuse edits topackage-lock.jsonor.env)SessionStartโ load dynamic context, such as the current sprint's open issuesStopโ run checks when Claude finishes a task
Hooks run with your user permissions, without asking. Review hook commands in a repo before you start a session there, just as you would review a script before running it.
Permissionsโ
Permission rules in settings.json decide which tool calls run without asking, which always prompt, and which are blocked:
{
"permissions": {
"allow": [
"Bash(npm run lint)",
"Bash(npm run test *)",
"Bash(git status)",
"Bash(git diff *)"
],
"ask": [
"Bash(git push *)"
],
"deny": [
"Read(./.env)",
"Read(./.env.*)",
"Read(./secrets/**)"
]
}
}
- Commit a shared allowlist of safe, read-only or local commands so teammates aren't prompted for
npm testevery time. - Use
denyfor secret files โ it is enforced by the tool, not left to the model's judgment. - Settings precedence, highest first: managed (organization) โ command-line
--settingsโ.claude/settings.local.jsonโ.claude/settings.jsonโ~/.claude/settings.json. Rules are evaluated deny, then ask, then allow, so a deny always wins.
Claude Code also has permission modes, cycled with Shift+Tab: default (ask for each action), acceptEdits (file edits run without asking), and plan (read-only analysis, no changes). Newer builds start interactive sessions in an auto mode that approves routine actions on its own. A bypassPermissions mode that skips all prompts only joins the cycle when you enable it explicitly โ keep it for sandboxed environments; see Agent Security.
MCP Serversโ
Project-wide MCP servers go in .mcp.json at the repo root, using an mcpServers key:
{
"mcpServers": {
"mdn": {
"type": "http",
"url": "https://mcp.mdn.mozilla.net/"
}
}
}
Add one from the command line with claude mcp add --transport http mdn --scope project https://mcp.mdn.mozilla.net/. Claude Code asks each developer to approve project MCP servers the first time, so a server added to the repo doesn't run silently. Use /mcp to check status and to sign in to servers that use OAuth.
See MCP Servers for which servers are worth using and how to keep secrets out of config files.
Copilot โ Claude Code Equivalentsโ
| Purpose | GitHub Copilot | Claude Code |
|---|---|---|
| Project instructions | .github/copilot-instructions.md or AGENTS.md | CLAUDE.md (can import @AGENTS.md) |
| File-scoped rules | .github/instructions/*.instructions.md (applyTo) | CLAUDE.md in the subfolder |
| Reusable workflows | .github/skills/ (or .claude/skills/), *.prompt.md | .claude/skills/ |
| Specialized agents | .github/agents/*.agent.md | .claude/agents/*.md |
| Enforced automation | Hooks in .github/hooks/*.json | Hooks in .claude/settings.json |
| Tool permissions | Per-tool approval in VS Code settings | permissions in .claude/settings.json |
| MCP config | .vscode/mcp.json (servers) | .mcp.json (mcpServers) |
Copilot hook configuration and supported events vary by host; see the GitHub hooks reference and VS Code hooks documentation.
For a team using both tools, keep shared conventions in AGENTS.md, put skills in .claude/skills/ (both tools read it), and keep only tool-specific settings in each tool's own files.
Resourcesโ
- Claude Code documentation โ official reference
- Memory and
CLAUDE.md - Skills
- Subagents
- Hooks
- Settings and permissions
- MCP in Claude Code
- Claude Code Roadmap โ roadmap.sh learning path