A curated list of resources, tools, tips, and community projects for Claude Code — Anthropic's official agentic coding CLI.
Claude Code lives in your terminal, understands your codebase, and helps you code faster through natural language. Unlike simple code-completion tools, it can run commands, edit files across your project, manage git workflows, and orchestrate multi-step tasks autonomously.
What makes this list different: Every section includes copy-pasteable configs, working hook recipes, real templates, and practical examples — not just links.
Contributions welcome! Read the contribution guidelines before submitting a PR.
- Basics
- Configuration
- Extending
- Agents & Orchestration
- Workflows
- Community
- Claude Code Documentation - Comprehensive official docs covering all features.
- Claude Code GitHub - Official repo, issue tracker, and discussions.
- Claude Code Changelog - Release notes and version history.
- Claude Code Best Practices - Anthropic's recommended patterns for getting the most out of Claude Code.
- Anthropic Cookbook - Official examples and guides from Anthropic.
- Model Context Protocol (MCP) - Official MCP specification and docs.
- MCP Servers Repository - Official and community MCP server implementations.
- Claude API Reference - Underlying API that powers Claude Code.
- Claude Code SDK - Build custom agents and automations with the Claude Code SDK.
- Anthropic Blog - Engineering blog posts about Claude Code internals and best practices.
- Installation Guide - Official installation and setup instructions.
- Claude Code Quickstart - Get up and running in minutes.
- First Session Walkthrough - Step-by-step tutorial for your first coding session.
- Claude Code Configuration - Settings, permissions, and environment configuration.
- Memory & CLAUDE.md Guide - How Claude Code reads and uses memory files.
# Install via npm (requires Node.js 18+)
npm install -g @anthropic-ai/claude-code
# Verify installation
claude --version
# Start your first session
cd your-project && claude
# Auto-generate a CLAUDE.md for your project
claude /init| Command | Description |
|---|---|
/help |
Show all available commands |
/init |
Auto-generate a CLAUDE.md for the current project |
/compact |
Compress conversation history to free context |
/model <name> |
Switch model (opus, sonnet, haiku) |
/plan |
Enter plan mode — explore first, code second |
/review |
Review code changes |
/commit |
Create a git commit with a smart message |
/pr |
Create a GitHub pull request |
/cost |
Show token usage and estimated cost |
/clear |
Clear conversation history |
/fast |
Toggle fast mode (same model, faster output) |
/memory |
Edit CLAUDE.md memory files |
# One-shot query (non-interactive)
claude -p "What does the main function do?"
# Resume last conversation
claude --resume
# Resume specific session
claude --resume <session-id>
# List previous sessions
claude sessions list
# Use a specific model
claude --model opus
claude --model sonnet
claude --model haiku
# Headless mode (non-interactive, for scripts and CI)
claude -p "Run all tests and report results" --output-format json
# Stream output in headless mode
claude -p "Explain src/index.ts" --output-format stream-json
# Set max turns for autonomous operation
claude -p "Fix all lint errors" --max-turns 20
# Append system prompt
claude --system-prompt "Always respond in Spanish"
# Specify allowed tools
claude --allowedTools "Read,Write,Bash(git *)"
# Skip permissions (trusted projects only)
claude --dangerously-skip-permissions# Review a PR diff
gh pr diff 123 | claude -p "Review this PR for bugs and security issues"
# Explain test failures
npm test 2>&1 | claude -p "Why are these tests failing? Suggest fixes."
# Analyze logs
tail -500 /var/log/app.log | claude -p "Summarize errors and suggest fixes"
# Generate commit message from staged changes
git diff --staged | claude -p "Write a conventional commit message" --output-format text
# Multi-file analysis
find src -name "*.ts" | head -20 | xargs cat | claude -p "Find potential memory leaks"
# Chain with other tools
claude -p "Generate a SQL migration to add a users table" --output-format text | pbcopy# List recent sessions
claude sessions list
# Resume most recent session
claude --resume
# Resume specific session by ID
claude --resume abc123
# Continue with full context preserved
claude --continue
CLAUDE.mdis the memory file Claude Code reads at session start. A good one dramatically improves output quality.
- Monorepo Template - Turborepo/Nx monorepos with multiple packages.
- Python Project Template - Python projects with venv, pytest, ruff, mypy.
- TypeScript/Node Template - Node.js/TypeScript with npm/pnpm, ESLint, Vitest.
- React/Next.js Template - Next.js App Router with Tailwind and shadcn/ui.
- Rust Project Template - Cargo-based Rust projects with clippy and testing.
- Go Project Template - Go modules with standard project layout.
- Django Template - Django projects with REST framework and celery.
- SvelteKit Template - SvelteKit projects with runes and form actions.
- Laravel Template - Laravel projects with Eloquent and artisan commands.
- Data Science Template - Jupyter notebooks, pandas, scikit-learn, experiment tracking.
- Homelab/Infrastructure Template - Server management, services, and infrastructure.
- Mobile App Template - React Native / Flutter cross-platform apps.
- Keep it under 500 lines — Claude reads it every session, so conciseness matters.
- Put the most important context (build commands, architecture) at the top.
- Use tables for structured data (services, ports, API keys).
- Include the commands Claude should know how to run.
- Use nested
CLAUDE.mdfiles in subdirectories for package-specific context. - Update it after every significant change to your project.
- Use comments (
<!-- -->) to explain why, not just what. - Include known issues and "don't touch" warnings for work-in-progress areas.
Paste this into Claude Code to auto-generate a CLAUDE.md tailored to your project:
Analyze this project and generate a CLAUDE.md file. Include:
1. Project overview (name, stack, description)
2. All available commands in a table (build, test, lint, run)
3. Project structure as a tree
4. Code conventions you observe (naming, imports, patterns)
5. Environment variables from .env.example or config files
6. Known issues from TODO/FIXME comments
Read package.json, tsconfig.json, Makefile, Cargo.toml, pyproject.toml,
or whatever build config exists. Be specific — use actual values, not placeholders.
project/
├── CLAUDE.md # Root context — project-wide info
├── src/
│ ├── CLAUDE.md # Source-specific conventions
│ ├── api/
│ │ └── CLAUDE.md # API layer patterns and endpoints
│ └── components/
│ └── CLAUDE.md # Component conventions, design system
├── .claude/
│ ├── settings.json # Project-level Claude settings
│ └── commands/ # Custom slash commands
│ ├── review.md
│ └── deploy-check.md
└── tests/
└── CLAUDE.md # Testing conventions, fixtures
| Section | Example |
|---|---|
| Project overview | "This is a Next.js 14 app with App Router" |
| Build/run commands | npm run dev, npm test, npm run build |
| Architecture | "We use the repository pattern with service layers" |
| Conventions | "Use named exports, no default exports" |
| Common tasks | "To add a new API route, create a file in src/app/api/" |
| Environment | "Requires Node 20+, PostgreSQL 16" |
| Known issues | "The auth module is being migrated, don't touch legacy/" |
- claude-config - Built-in
/configcommand to manage settings interactively. - dotenv-vault - Sync environment variables across machines for consistent Claude Code behavior.
| Scope | Path | Use Case |
|---|---|---|
| Global | ~/.claude/settings.json |
Personal defaults (permissions, model, hooks) |
| Global local | ~/.claude/settings.local.json |
Machine-specific overrides (not synced) |
| Project | .claude/settings.json |
Shared team settings (commit to repo) |
| Project local | .claude/settings.local.json |
Personal project overrides (gitignored) |
Place
.mdfiles in.claude/commands/to create project-specific commands. Use$ARGUMENTSto accept input.
<!-- .claude/commands/review.md -->
Review the changes in the current branch compared to main.
Focus on:
1. Security vulnerabilities
2. Performance regressions
3. Missing error handling
4. Test coverage gaps
Format as a markdown checklist with severity levels.<!-- .claude/commands/deploy-check.md -->
Pre-deployment checklist:
1. Run all tests
2. Check for console.logs or debug statements
3. Verify environment variables are not hardcoded
4. Check for TODO/FIXME comments
5. Verify all API endpoints have error handling
6. Check bundle size hasn't increased significantly<!-- .claude/commands/doc.md -->
Generate documentation for $ARGUMENTS.
Include:
- Brief description of purpose
- Parameters with types and descriptions
- Return value
- Usage example
- Edge cases to be aware of
Write docs as JSDoc comments directly in the source file.<!-- .claude/commands/test.md -->
Write comprehensive tests for $ARGUMENTS.
Include:
- Happy path tests
- Edge cases (empty input, null, undefined, boundary values)
- Error scenarios
- Integration points with mocked dependencies
Use the existing test patterns in this project.Hooks are shell commands that execute automatically in response to Claude Code events. Configure them in your settings JSON.
| Event | Trigger | Available Env Vars |
|---|---|---|
PreToolUse |
Before any tool executes | $CLAUDE_TOOL_NAME, $CLAUDE_FILE_PATH |
PostToolUse |
After any tool executes | $CLAUDE_TOOL_NAME, $CLAUDE_FILE_PATH, $CLAUDE_TOOL_OUTPUT |
Notification |
When Claude sends a notification | $CLAUDE_NOTIFICATION |
Stop |
When Claude finishes a turn | — |
// .claude/settings.json
{
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"command": "echo 'About to run a shell command'"
}
],
"PostToolUse": [
{
"matcher": "Write|Edit",
"command": "eslint --fix \"$CLAUDE_FILE_PATH\" 2>/dev/null || true"
}
],
"Notification": [
{
"command": "terminal-notifier -message \"$CLAUDE_NOTIFICATION\" -title 'Claude Code'"
}
],
"Stop": [
{
"command": "say 'Claude is done'"
}
]
}
}Auto-format on save (multi-language):
{
"hooks": {
"PostToolUse": [
{
"matcher": "Write|Edit",
"command": "case \"$CLAUDE_FILE_PATH\" in *.py) black \"$CLAUDE_FILE_PATH\" 2>/dev/null;; *.ts|*.tsx|*.js|*.jsx) prettier --write \"$CLAUDE_FILE_PATH\" 2>/dev/null;; *.go) gofmt -w \"$CLAUDE_FILE_PATH\" 2>/dev/null;; *.rs) rustfmt \"$CLAUDE_FILE_PATH\" 2>/dev/null;; esac || true"
}
]
}
}Desktop notifications (macOS):
{
"hooks": {
"Notification": [
{
"command": "osascript -e 'display notification \"'\"$CLAUDE_NOTIFICATION\"'\" with title \"Claude Code\"'"
}
]
}
}Block dangerous commands:
{
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"command": "if echo \"$CLAUDE_TOOL_INPUT\" | grep -qE 'rm -rf /|DROP TABLE|format c:'; then echo 'BLOCKED: Dangerous command detected' >&2; exit 1; fi"
}
]
}
}Auto-run tests after edits:
{
"hooks": {
"PostToolUse": [
{
"matcher": "Write|Edit",
"command": "if echo \"$CLAUDE_FILE_PATH\" | grep -qE '\\.(test|spec)\\.(ts|js|tsx|jsx)$'; then npx vitest run \"$CLAUDE_FILE_PATH\" --reporter=dot 2>/dev/null || true; fi"
}
]
}
}Customize what Claude Code shows in the status bar at the bottom of your terminal.
// ~/.claude/settings.json
{
"statusLine": {
"enabled": true,
"items": ["model", "cost", "session"]
}
}MCP (Model Context Protocol) servers extend Claude Code with external tools and data sources. Add them to
.claude/settings.jsonor~/.claude/settings.json.
// .claude/settings.json
{
"mcpServers": {
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_TOKEN": "ghp_your_token_here"
}
},
"postgres": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-postgres", "postgresql://localhost/mydb"]
}
}
}- mcp-server-filesystem - Secure file system access with configurable permissions.
- github-mcp-server - GitHub's official API integration for repositories, issues, and pull requests.
- mcp-server-postgres - Archived reference server for read-only PostgreSQL access.
- mcp-server-sqlite - Archived reference server for SQLite querying.
- mcp-server-brave-search - Archived reference server for Brave Search.
- mcp-server-puppeteer - Archived reference server for browser automation.
- mcp-server-slack - Archived reference server for Slack integration.
- mcp-server-memory - Persistent memory using a knowledge graph.
- mcp-server-google-maps - Archived reference server for Google Maps integration.
- mcp-server-fetch - Fetch and convert web pages to markdown.
- mcp-server-sequential-thinking - Dynamic problem-solving through thought sequences.
- mcp-server-docker - Manage Docker containers and images.
- mcp-server-kubernetes - Kubernetes cluster management.
- mcp-server-linear - Linear issue tracker integration.
- mcp-server-notion - Notion workspace access and page management.
- mcp-server-obsidian - Obsidian vault access and note management.
- evc-team-relay-mcp - Collaborative Obsidian vault access via Team Relay with real-time CRDT sync.
- mcp-server-todoist - Todoist task management integration.
- sentry-mcp - Official Sentry error tracking integration.
- mcp-server-supabase - Supabase database and auth integration.
- MCP Specification - Full protocol specification.
- Build Your Own MCP Server - Tutorial for creating custom MCP servers.
- MCP TypeScript SDK - TypeScript SDK for building MCP servers.
- MCP Python SDK - Python SDK for building MCP servers.
Extend Claude Code's capabilities with community-built plugins and integrations.
- claude-code-router - Built-in model routing for cost optimization (use haiku for simple tasks, opus for complex ones).
- claude-code-action - GitHub Action for running Claude Code in CI/CD pipelines.
- Hermes Tweet - Xquik X/Twitter plugin with a Claude manifest and approval-gated actions.
Skills are reusable prompt templates that Claude Code can invoke. They can be shared across projects and teams.
| Skill | Trigger | Description |
|---|---|---|
/commit |
Git commit | Smart commit message generation |
/pr |
Pull request | Create PR with title, description, test plan |
/review |
Code review | Review current changes |
/init |
Initialize | Generate CLAUDE.md for current project |
Create custom skills in .claude/commands/:
<!-- .claude/commands/migrate.md -->
Generate a database migration for $ARGUMENTS.
1. Check existing models and migrations for context
2. Create the migration file using the project's migration tool
3. Include both up and down migration logic
4. Add appropriate indexes for foreign keysClaude Code can spawn specialized subagents (via the Task tool) to handle parallel, isolated work. Subagents inherit project context but run in their own conversation.
Main Agent
├── Task (Explore subagent) → "Find all API endpoints"
├── Task (Bash subagent) → "Run the full test suite"
└── Task (General subagent) → "Research how auth middleware works"
Subagents are useful for:
- Parallel research — explore multiple parts of a codebase simultaneously.
- Isolated execution — run tests or builds without cluttering the main conversation.
- Context protection — keep large tool outputs out of the main context window.
| Type | Best For |
|---|---|
Explore |
Codebase exploration, finding files and patterns |
Bash |
Running commands, git operations |
general-purpose |
Multi-step research and code analysis |
Plan |
Designing implementation strategies |
Use the Claude Code SDK to orchestrate multiple Claude Code instances for complex workflows.
import { Claude } from "@anthropic-ai/claude-code";
const claude = new Claude();
// Review different aspects in parallel
const [security, performance, tests] = await Promise.all([
claude.sendMessage("Review src/ for security vulnerabilities", {
options: { model: "sonnet" }
}),
claude.sendMessage("Find performance bottlenecks in src/api/", {
options: { model: "sonnet" }
}),
claude.sendMessage("Check test coverage gaps in src/services/", {
options: { model: "haiku" }
}),
]);
console.log("Security:", security.text);
console.log("Performance:", performance.text);
console.log("Tests:", tests.text);#!/bin/bash
# Run multiple Claude Code tasks in parallel
claude -p "Check for security issues in src/" --output-format json > /tmp/security.json &
claude -p "Find unused exports in src/" --output-format json > /tmp/unused.json &
claude -p "Identify slow database queries" --output-format json > /tmp/perf.json &
wait
echo "All reviews complete. Results in /tmp/*.json"For large projects, structure multiple Claude Code instances as a team with distinct roles.
| Role | Model | Responsibility |
|---|---|---|
| Architect | Opus | Design the approach, break into subtasks |
| Implementer | Sonnet | Write the code based on the architect's plan |
| Reviewer | Sonnet | Review the implementer's code for quality |
| Tester | Haiku | Write and run tests for the new code |
# Step 1: Architect plans the approach
PLAN=$(claude -p "Plan how to add OAuth2 login. Output a numbered task list." \
--model opus --output-format text)
# Step 2: Implementer writes code
claude -p "Implement this plan: $PLAN" --model sonnet
# Step 3: Reviewer checks the work
claude -p "Review all changes on this branch vs main" --model sonnet
# Step 4: Tester validates
claude -p "Write and run tests for the OAuth2 login feature" --model haikuUse plan mode for non-trivial tasks. It forces Claude to explore the codebase and design an approach before writing code.
> /plan Refactor the authentication module to use JWT instead of sessions
Plan mode is ideal for:
- Architecture changes affecting multiple files.
- Refactors where you want to review the approach first.
- Unfamiliar codebases where exploration is needed.
Use git worktrees for parallel, isolated work:
> Work on the login page redesign in a worktree
> # Claude creates an isolated copy — your main branch stays clean
> Write a failing test for user registration with email validation.
> Now implement the minimum code to make the test pass.
> Refactor the implementation while keeping tests green.
> Read the error log below and trace the bug to its root cause.
> Don't fix it yet — just explain what's happening and which files are involved.
Then, once you understand the issue:
> Now fix the bug. Run the test suite after to confirm nothing else broke.
> Migrate all class components in src/components/ to functional components with hooks.
> Do them one at a time. After each migration, run the tests for that component.
> Stop if any test fails.
- Be specific about scope: "Fix the null check in
src/auth/login.ts:45" > "Fix the login bug". - Reference files directly: "Read
package.jsonand update all outdated deps". - Chain tasks: "Run the tests, fix any failures, then run them again".
- Set constraints: "Refactor this function but don't change the public API".
- Ask for exploration first: "What files handle payment processing?" before "Refactor payments".
- Set quality gates: "Run tests after every change. Stop if coverage drops below 80%".
> /commit # Smart commit with conventional message
> Create a PR for this branch # Generates title, description, test plan
# .github/workflows/claude-review.yml
name: Claude Code Review
on:
pull_request:
types: [opened, synchronize]
permissions:
contents: read
pull-requests: write
jobs:
review:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: anthropics/claude-code-action@v1
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
prompt: |
Review this pull request. Focus on:
1. Security vulnerabilities
2. Performance regressions
3. Missing error handling
4. Test coverage
Post your review as a PR comment.# .github/workflows/claude-fix.yml
name: Claude Auto-Fix
on:
push:
branches: [main]
jobs:
fix:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: anthropics/claude-code-action@v1
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
prompt: "Run the linter. If there are errors, fix them and commit."
allowed_tools: "Bash(npm run lint *),Edit,Write,Bash(git *)"import { Claude } from "@anthropic-ai/claude-code";
// Nightly code health check
const claude = new Claude();
const result = await claude.sendMessage(
"Check for: unused dependencies, circular imports, and functions over 50 lines. " +
"Output a JSON report.",
{ options: { outputFormat: "json", model: "haiku" } }
);
console.log(JSON.parse(result.text));- VS Code Extension - Official VS Code integration with inline diffs and chat panel.
- JetBrains Plugin - Official IntelliJ/WebStorm/PyCharm integration.
- Claude Code Desktop - Standalone desktop app with terminal integration.
- Neovim Plugin (avante.nvim) - Neovim integration supporting Claude as a backend.
- Cursor - AI-first code editor with Claude model support.
- Zed Editor - High-performance editor with built-in Claude assistant.
- Terminal-only - Claude Code works in any terminal — iTerm2, Alacritty, Warp, Kitty, WezTerm, tmux, etc.
# Check current session cost
# Inside Claude Code:
> /cost
# Set a spending limit in your environment
export ANTHROPIC_MAX_TOKENS=100000 # Limit per session- Use
/model haikufor simple tasks (code explanations, formatting, small fixes). - Use
/model sonnetfor everyday coding (default, best balance). - Use
/model opusonly for complex architecture and multi-file refactors. - Use
/compactregularly to keep context small and reduce token usage. - Use headless mode (
-p) for batch tasks to avoid interactive overhead. - Set
--max-turnsin automation to prevent runaway sessions.
- Anthropic Console - Official usage dashboard and billing.
- LLM Cost Calculator - Compare Claude Code costs with other AI coding tools.
- ax - Local-first cost, skill, tool, and telemetry dashboard for Claude Code, Codex, OpenCode, Cursor, and Pi.
- agenttrace - Inspect local Claude/Codex agent sessions for cost, tokens, latency, tool failures, and CI gates.
Claude Code has a granular permission system to control what actions it can take:
// .claude/settings.json
{
"permissions": {
"allow": [
"Read",
"Write",
"Edit",
"Bash(npm run *)",
"Bash(npx vitest *)",
"Bash(git status)",
"Bash(git diff *)",
"Bash(git log *)",
"Bash(git add *)",
"Bash(git commit *)"
],
"deny": [
"Bash(rm -rf *)",
"Bash(curl * | bash)",
"Bash(wget *)",
"Bash(git push --force *)",
"Bash(git reset --hard *)",
"Bash(chmod 777 *)"
]
}
}{
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"command": "if echo \"$CLAUDE_TOOL_INPUT\" | grep -qE 'git (add|commit)' && git diff --cached --name-only | grep -qE '\\.(env|pem|key)$'; then echo 'BLOCKED: Refusing to commit secret files' >&2; exit 1; fi"
}
]
}
}- Always use project-level
.claude/settings.jsonfor team-shared permissions. - Use deny lists for destructive commands (
rm -rf,git push --force). - Use
--dangerously-skip-permissionsonly in fully trusted, automated pipelines. - Review Claude's actions during the first few sessions before expanding permissions.
- Use the
PreToolUsehook to implement custom safety checks.
Open source projects built with or for Claude Code.
-
claude-code-action - GitHub Action for running Claude Code in CI/CD workflows.
-
mcpservers.org - Directory and registry of MCP servers.
-
mcp.run - Run MCP servers in a secure sandbox without local installation.
-
Smithery - Package registry for MCP servers with one-click install.
-
OpenAgentRelay - Expose a restricted local Claude Code or other agent command as a keyed trusted-LAN capability.
- MCP TypeScript SDK - Build custom MCP servers in TypeScript.
- MCP Python SDK - Build custom MCP servers in Python.
- FastMCP - High-level Python framework for building MCP servers quickly.
- mcp-framework - TypeScript framework for building MCP servers with decorators.
- awesome-mcp-servers - Curated list of MCP server implementations.
- Claude Code - Official Claude Code product overview from Anthropic.
- Claude Code: Best Practices for Agentic Coding - Engineering deep-dive from the Anthropic team.
- How We Build Software at Anthropic - How Anthropic uses Claude Code internally.
- Claude Code and the Model Context Protocol - Official guide to extending Claude Code with MCP.
- Building AI Agents with Claude Code SDK - Guide to building custom agents.
- Claude Code Hooks Deep Dive - Comprehensive guide to the hooks system.
Know a great video tutorial? Submit a PR!
- Claude Code GitHub Issues - Official issue tracker and community feedback.
- r/ClaudeAI - Reddit community for all things Claude.
- Anthropic Discord - Official Anthropic Discord server.
- Claude Code Twitter/X Community - Follow #claudecode for tips and projects.
- MCP Discord - Community for MCP server development.
Contributions are welcome! Please read the contribution guidelines first.
We especially need:
- Community projects — tools, extensions, and integrations you've built.
- CLAUDE.md templates — for frameworks not yet covered.
- Hook recipes — working examples that solve real problems.
- Articles & tutorials — quality content about Claude Code workflows.
Erkan — GitHub: @erkcet
To the extent possible under law, the maintainer has waived all copyright and related rights to this work.
