kid-sid/claude-spellbook/claude-code

Claude Code and agent skill by kid-sid/claude-spellbook

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Use when configuring Claude Code — installing skills or agents, writing hook configurations, setting up tool permissions, registering MCP servers, or authoring CLAUDE.md project instructions.

Install

npx vskill@latest install kid-sid/claude-spellbook/claude-code

SKILL.md

Claude Code Setup

Configuration and customization reference for Claude Code — skills, commands, agents, hooks, permissions, and MCP servers.

When to Activate

  • Setting up skills, slash commands, or agents in a new project or globally
  • Writing or debugging hook configurations in settings.json
  • Configuring tool permissions to reduce approval prompts
  • Registering or troubleshooting an MCP server
  • Writing CLAUDE.md project instructions
  • Asking how Claude Code loads context or resolves settings
  • Integrating Claude Code with VS Code or JetBrains

Directory Layout

~/.claude/ # global — applies to all projects
├── settings.json # global permissions, hooks, env vars
├── CLAUDE.md # global instructions read at every session
├── skills/
│ └── <name>/skill.md # or <name>.md (flat)
├── agents/
│ └── <name>.md
└── commands/
└── <name>.md
<project>/
├── CLAUDE.md # project instructions (commit this)
└── .claude/
├── settings.json # project permissions + hooks (commit this)
├── settings.local.json # personal overrides (gitignore this)
├── skills/ # project-scoped skills
├── agents/ # project-scoped agents
└── commands/ # project-scoped commands

Settings are merged: settings.local.json overrides .claude/settings.json overrides ~/.claude/settings.json.

Skills

Skills are markdown files that Claude loads contextually when the task matches.

File Format
markdown
---
name: my-skill
description: One keyword-dense sentence used for activation matching.
---
# Title
One-sentence intro.
## When to Activate
-Verb-leading trigger condition
-Another trigger condition
## Content sections…
## Checklist
-[ ] At least one item
Installation
bash
# Single skill (global)
cp -r skills/my-skill ~/.claude/skills/
# All skills from a library
cp -r skills/* ~/.claude/skills/
# Project-scoped (available only in this project)
cp -r skills/my-skill .claude/skills/
How Skills Load

Claude matches the task description against the description frontmatter field and the ## When to Activate bullet points. No manual invocation needed — skills activate automatically. The name field must match the folder name (or file stem for flat layout).

Slash Commands

Slash commands are prompt templates invoked with /command-name in the Claude Code prompt.

File Format
markdown
Do the thing the user asked.
## Instructions
1.First step — use `$ARGUMENTS` for any text the user typed after the command name
2.Second step
3.Output format…

$ARGUMENTS is replaced with everything the user typed after the command name:

/my-command foo bar → $ARGUMENTS = "foo bar"
/my-command → $ARGUMENTS = ""
Examples
markdown
<!-- .claude/commands/summarize.md -->
Summarize the file at $ARGUMENTS.
Read the file, identify the top 3 key points, and return them as a numbered list.
Each point should be one sentence.
markdown
<!-- .claude/commands/fix-issue.md -->
Fix GitHub issue #$ARGUMENTS in this repository.
1.Run `gh issue view $ARGUMENTS` to read the issue
2.Find the relevant code
3.Implement the fix
4.Write or update tests
5.Summarize what changed
Installation
bash
# Global (available in all projects)
cp .claude/commands/my-command.md ~/.claude/commands/
# Project-only (stays in this repo)
# Already in .claude/commands/ — no copy needed

Agents

Agents run in an isolated context window with their own tool set and system prompt.

File Format
markdown
---
name: my-agent
description: Use this agent when… (triggers auto-delegation)
tools: Read, Grep, Glob, Bash
model: sonnet
color: blue
---
You are a … agent. Your job is to …
## Methodology
Step-by-step approach…
## Output Format
What the agent should return…
Frontmatter Fields
FieldValuesNotes
namekebab-case stringMust match filename stem
descriptionOne sentenceControls when Claude auto-delegates — write as "Use this agent when…"
toolsComma-separated tool namesOmit to inherit all tools; restrict for read-only agents
modelsonnet, opus, haiku, inheritinherit uses the parent session's model
colorred blue green yellow purple orangeUI accent only
Available Tools
Read, Write, Edit, Bash, Glob, Grep,
WebFetch, WebSearch,
Agent, TaskCreate, TaskUpdate, TaskList,
NotebookEdit

Principle of least privilege: a read-only audit agent should declare tools: Read, Grep, Glob, Bash — no Write or Edit.

Installation
bash
# Global
cp .claude/agents/my-agent.md ~/.claude/agents/
# Project-only
# Already in .claude/agents/ — committed with the repo

Hooks

Hooks run shell commands automatically in response to Claude Code events.

Settings Structure
json
{
"hooks": {
"EventName": [
{
"matcher": "ToolName",
"hooks": [
{
"type": "command",
"command": "shell command here",
"timeout": 10,
"async": false
}
]
}
]
}
}
Hook Events
EventWhen it firesMatcher targets
SessionStartOnce at session openEmpty string ""
UserPromptSubmitEvery time user submits a messageMessage content substring
PreToolUseBefore a tool call executesTool name
PostToolUseAfter a tool call completesTool name
PreCompactBefore context window compactionEmpty string ""
StopWhen Claude finishes a turnEmpty string ""
Hook Environment Variables
VariableAvailable inValue
$CLAUDE_FILE_PATHWrite, Edit hooksAbsolute path of the file
$CLAUDE_TOOL_NAMEAll tool hooksName of the tool being called
$CLAUDE_TOOL_INPUTAll tool hooksJSON-encoded tool input
$CLAUDE_TOOL_OUTPUTPostToolUse onlyJSON-encoded tool output
Common Hook Patterns
json
{
"hooks": {
"PostToolUse": [
{
"matcher": "Write",
"hooks": [
{
"type": "command",
"command": "prettier --write $CLAUDE_FILE_PATH",
"if": "Write(**/*.ts)"
},
{
"type": "command",
"command": "black $CLAUDE_FILE_PATH",
"if": "Write(**/*.py)"
}
]
},
{
"matcher": "Edit",
"hooks": [
{
"type": "command",
"command": "eslint --fix $CLAUDE_FILE_PATH",
"if": "Edit(**/*.ts)"
},
{
"type": "command",
"command": "ruff check --fix $CLAUDE_FILE_PATH",
"if": "Edit(**/*.py)"
}
]
},
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "echo \"[$(date)] $CLAUDE_TOOL_INPUT\" >> .claude/command.log",
"async": true
}
]
}
],
"SessionStart": [
{
"matcher": "",
"hooks": [{ "type": "command", "command": "git status" }]
}
],
"Stop": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "python ~/tools/notify.py 'Claude finished'",
"async": true
}
]
}
]
}
}

The if field inside a hook entry is a secondary glob filter on top of the matcher. Use it to handle multiple file types under one matcher block.

async: true — hook runs in background; Claude doesn't wait for it. Use for logging, notifications. async: false (default) — Claude waits for the hook to complete before continuing. Use for formatters, validators.

PreToolUse Blocking

A PreToolUse hook with exit code 2 blocks the tool call and surfaces the hook's stdout as an error message to Claude.

json
{
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "bash -c 'echo $CLAUDE_TOOL_INPUT | grep -q \"rm -rf\" && { echo \"rm -rf blocked\"; exit 2; } || exit 0'"
}
]
}
]
}
}

Settings and Permissions

Settings Files
~/.claude/settings.json # global defaults
<project>/.claude/settings.json # project (commit — shared with team)
<project>/.claude/settings.local.json # personal overrides (gitignore)
Permissions
json
{
"permissions": {
"allow": [
"Bash(npm run *)",
"Bash(git *)",
"Write(**/*.ts)",
"Write(**/*.py)",
"Bash(docker compose up *)"
],
"deny": [
"Bash(git push --force *)",
"Bash(rm -rf *)"
]
}
}

Permission string syntax:

"Bash(command prefix *)" — allow bash commands matching the prefix
"Write(**/*.ext)" — allow writing files matching the glob
"Read(**/*)" — allow reading any file
"*" — allow everything (use in dev only)

Deny rules take precedence over allow rules.

Environment Variables
json
{
"env": {
"NODE_ENV": "development",
"PYTHONPATH": "/app/src",
"LOG_LEVEL": "debug"
}
}
Model Override
json
{
"model": "claude-opus-4-7"
}

MCP Servers

MCP (Model Context Protocol) servers expose tools and resources to Claude Code.

Registration
bash
# Register globally (available in all projects)
claude mcp add -s user <name> <command> [args...]
# Register for current project only (stored in .claude/mcp.json)
claude mcp add -s project <name> <command> [args...]
# Register locally (personal, stored in .claude/mcp.local.json — gitignored)
claude mcp add -s local <name> <command> [args...]
Examples
bash
# Python MCP server
claude mcp add -s user memory_map \
/home/user/memory_map/venv/bin/python \
/home/user/memory_map/server.py
# Node MCP server
claude mcp add -s user filesystem \
npx @modelcontextprotocol/server-filesystem /tmp
# With environment variables
claude mcp add -s project my-server \
--env API_KEY=abc123 \
node server.js
Management
bash
claude mcp list # list all registered servers
claude mcp remove <name> # unregister a server
claude mcp get <name> # show config for one server

MCP config is stored as JSON:

json
{
"mcpServers": {
"memory_map": {
"command": "/home/user/memory_map/venv/bin/python",
"args": ["/home/user/memory_map/server.py"]
}
}
}

CLAUDE.md

CLAUDE.md files inject persistent instructions into every session.

Load Order
~/.claude/CLAUDE.md # always loaded (global)
<project>/CLAUDE.md # loaded when in that project
<project>/src/CLAUDE.md # loaded when working in src/ (scoped)

All matching files are concatenated — lower-level files extend rather than replace.

What to Put in CLAUDE.md
markdown
## Session Setup
<!-- Steps Claude must run at session start -->
1.Run `load_memory` with the current working directory
2.Run `suggest_history` with the current working directory and the user's first message
## Project Context
<!-- What the project is and how it's structured -->
This is a FastAPI service that handles payment processing.
Main entry point: src/main.py. Tests: tests/.
## Conventions
<!-- Non-obvious decisions that Claude should follow -->
-Use `snake_case` for all Python identifiers
-Never commit directly to main — always branch
-Database migrations live in alembic/versions/
## Commands
<!-- Common tasks Claude should know how to run -->
-Run tests: `pytest tests/ -x`
-Start dev server: `uvicorn src.main:app --reload`
-Lint: `ruff check src/`

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
186
Repository forks
15
7-day trend score
26

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/kid-sid/claude-spellbook/claude-code/badge)](https://verified-skill.com/skills/kid-sid/claude-spellbook/claude-code)

Something wrong with this skill or its page? Tell us.