claude-howto-guide
```markdown
What this skill does
```markdown
---
name: claude-howto-guide
description: Master Claude Code features — slash commands, memory, hooks, subagents, MCP, skills, plugins, checkpoints, and CLI — using the claude-howto structured tutorial guide.
triggers:
- how do I use Claude Code effectively
- set up Claude Code slash commands
- configure hooks in Claude Code
- create a subagent workflow with Claude Code
- install MCP servers for Claude Code
- use Claude Code memory and CLAUDE.md
- set up a Claude Code plugin
- automate code review with Claude Code
---
# Claude How-To: Master Claude Code Features
> Skill by [ara.so](https://ara.so) — Daily 2026 Skills collection.
`claude-howto` is a structured, visual, example-driven tutorial guide for Claude Code. It covers every major feature — slash commands, memory, skills, subagents, MCP, hooks, plugins, checkpoints, and CLI — with copy-paste templates, Mermaid diagrams, and a progressive 11–13 hour learning path.
---
## Installation
```bash
git clone https://github.com/luongnv89/claude-howto.git
cd claude-howto
```
No Python dependencies are required to use the templates. To build the offline EPUB:
```bash
uv run scripts/build_epub.py
```
---
## Repository Structure
```
claude-howto/
├── 01-slash-commands/ # User-invoked shortcuts (/cmd)
├── 02-memory/ # Persistent context (CLAUDE.md)
├── 03-skills/ # Reusable capabilities (auto-invoked)
├── 04-subagents/ # Specialized AI assistants
├── 05-mcp/ # External tool access via MCP protocol
├── 06-hooks/ # Event-driven automation
├── 07-plugins/ # Bundled feature packages
├── 08-checkpoints/ # Session snapshots and rewind
├── 09-advanced-features/ # Planning, thinking, background tasks
├── 10-cli/ # CLI commands, flags, options
├── LEARNING-ROADMAP.md # Guided learning path
├── CATALOG.md # Full feature catalog
└── CONTRIBUTING.md
```
---
## Quick 15-Minute Setup
```bash
# Create Claude Code command directory in your project
mkdir -p /path/to/your-project/.claude/commands
# Copy a slash command template
cp 01-slash-commands/optimize.md /path/to/your-project/.claude/commands/
# Set up project memory
cp 02-memory/project-CLAUDE.md /path/to/your-project/CLAUDE.md
# Install a skill
cp -r 03-skills/code-review ~/.claude/skills/
```
---
## Feature 1: Slash Commands
Slash commands are Markdown files in `.claude/commands/`. The filename becomes the command name.
**File:** `.claude/commands/review.md`
```markdown
# Code Review
Review the current file or selection for:
- Logic errors and edge cases
- Performance bottlenecks
- Security vulnerabilities
- Style and readability
Provide a structured report with severity levels (critical / warning / suggestion).
```
**Usage in Claude Code:**
```
/review
```
**Copy all example commands:**
```bash
cp 01-slash-commands/*.md .claude/commands/
```
---
## Feature 2: Memory (CLAUDE.md)
`CLAUDE.md` files give Claude persistent context about your project. They are auto-loaded at session start.
**Scopes:**
- `~/.claude/CLAUDE.md` — global, applies to all projects
- `./CLAUDE.md` — project-level
- `./src/CLAUDE.md` — directory-level
**Template:** `./CLAUDE.md`
```markdown
# Project: my-api
## Stack
- Python 3.12, FastAPI, PostgreSQL
- Tests: pytest, httpx
- Linting: ruff, mypy
## Conventions
- All endpoints return `{"data": ..., "error": null}` or `{"data": null, "error": "..."}`
- Use `async def` for all route handlers
- Database sessions via `get_db()` dependency injection
## Key Commands
- `make test` — run test suite
- `make lint` — ruff + mypy
- `make migrate` — run Alembic migrations
## Do Not
- Never commit secrets or `.env` files
- Never use `print()` for logging — use `structlog`
```
**Copy the template:**
```bash
cp 02-memory/project-CLAUDE.md ./CLAUDE.md
```
---
## Feature 3: Skills
Skills are reusable capability definitions that Claude invokes automatically based on context. They live in `~/.claude/skills/` (global) or `.claude/skills/` (project).
**Structure:**
```
~/.claude/skills/
└── code-review/
├── skill.md # Skill definition
└── templates/ # Supporting templates
```
**Install a skill:**
```bash
cp -r 03-skills/code-review ~/.claude/skills/
```
**Example `skill.md`:**
```markdown
# Skill: Code Review
Trigger: When reviewing code, PRs, or diffs.
## Behavior
1. Check for security vulnerabilities (injection, secrets, auth bypass)
2. Identify performance issues (N+1 queries, unbounded loops)
3. Verify error handling completeness
4. Assess test coverage gaps
5. Output findings as a structured Markdown report
```
---
## Feature 4: Subagents
Subagents are specialized Claude instances delegated subtasks. Define them in `.claude/agents/`.
**File:** `.claude/agents/security-auditor.md`
```markdown
# Agent: Security Auditor
## Role
Specialized security review agent. Focus exclusively on:
- Injection vulnerabilities (SQL, command, LDAP)
- Authentication and authorization flaws
- Secrets or credentials in code
- Insecure dependencies
## Output Format
Return a JSON report:
{
"critical": [...],
"high": [...],
"medium": [...],
"low": [...]
}
```
**Orchestrating subagents in a workflow:**
```python
# Example: Trigger subagent delegation via Claude Code SDK
import anthropic
client = anthropic.Anthropic()
orchestrator_prompt = """
You are an orchestrator. For the following code diff, delegate to:
1. The security-auditor agent for vulnerability scanning
2. The performance-reviewer agent for bottleneck detection
Return a combined report.
Code diff:
{diff}
""".format(diff=open("changes.diff").read())
response = client.messages.create(
model="claude-opus-4-6",
max_tokens=4096,
messages=[{"role": "user", "content": orchestrator_prompt}]
)
print(response.content[0].text)
```
---
## Feature 5: MCP (Model Context Protocol)
MCP servers give Claude access to external tools and live data. Configure in `.claude/mcp.json`.
**File:** `.claude/mcp.json`
```json
{
"servers": {
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_TOKEN": "${GITHUB_TOKEN}"
}
},
"postgres": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-postgres"],
"env": {
"DATABASE_URL": "${DATABASE_URL}"
}
},
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/project"]
}
}
}
```
**Environment variables (never hardcode):**
```bash
export GITHUB_TOKEN="your-token-here"
export DATABASE_URL="postgresql://user:pass@localhost/db"
```
**Copy MCP config templates:**
```bash
cp 05-mcp/mcp.json .claude/mcp.json
```
---
## Feature 6: Hooks
Hooks are scripts triggered by Claude Code events. They live in `.claude/hooks/`.
**Supported events:**
| Event | Trigger |
|-------|---------|
| `pre-tool-use` | Before Claude runs any tool |
| `post-tool-use` | After a tool completes |
| `pre-file-write` | Before writing a file |
| `post-file-write` | After writing a file |
| `session-start` | When a session begins |
| `session-end` | When a session ends |
**File:** `.claude/hooks/post-file-write.sh`
```bash
#!/bin/bash
# Auto-run linter after Claude writes a Python file
FILE="$1"
if [[ "$FILE" == *.py ]]; then
echo "Running ruff on $FILE..."
ruff check --fix "$FILE"
mypy "$FILE" --ignore-missing-imports
fi
```
**File:** `.claude/hooks/pre-file-write.py`
```python
#!/usr/bin/env python3
"""Block writes to protected paths."""
import sys
import os
PROTECTED = [".env", "secrets.json", "credentials.yaml"]
file_path = sys.argv[1] if len(sys.argv) > 1 else ""
filename = os.path.basename(file_path)
if filename in PROTECTED:
print(f"BLOCKED: Writing to {filename} is not allowed.", file=sys.stderr)
sys.exit(1)
sys.exit(0)
```
**Register hooks in `.claude/config.json`:*Related in Writing & Docs
jax-development
IncludedUse this skill when the user is writing, debugging, profiling, refactoring, reviewing, benchmarking, parallelising, exporting, or explaining JAX code, or when they mention JAX, jax.numpy, jit, grad, value_and_grad, vmap, scan, lax, random keys, pytrees, jax.Array, sharding, Mesh, PartitionSpec, NamedSharding, pmap, shard_map, Pallas, XLA, StableHLO, checkify, profiler, or the JAX repo. It helps turn NumPy or PyTorch-style code into pure functional JAX, fix tracer/control-flow/shape/PRNG bugs, remove recompiles and host-device syncs, choose transforms and sharding strategies, inspect jaxpr/lowering/IR, and benchmark compiled code correctly.
nature-article-writer
IncludedDrafts, rewrites, diagnostically critiques, and style-calibrates primary research manuscripts for Nature and Nature Portfolio journals. Use when the user wants a Nature-style title, summary paragraph or abstract, introduction, results, discussion, methods, figure legends, presubmission enquiry, cover letter, reviewer response, or when a scientific draft sounds generic, jargon-heavy, structurally weak, or AI-ish and needs precise, broad-reader-friendly prose without inventing data, analyses, or references. Best for primary research articles and letters rather than reviews or press releases unless explicitly adapting one.
deckrd
IncludedDocument-driven framework that derives requirements, specifications, implementation plans, and executable tasks from goals through structured AI dialogue. Use when user says "write requirements", "create spec", "plan implementation", "derive tasks", "structure this feature", "break down into tasks", or "document this module". Also use for reverse engineering existing code into docs (/deckrd rev). Do NOT use for direct code writing — use /deckrd-coder after tasks are generated. Do NOT use when the user only wants to run or fix existing code without planning.
clinical-decision-support
IncludedGenerate professional clinical decision support (CDS) documents for pharmaceutical and clinical research settings, including patient cohort analyses (biomarker-stratified with outcomes) and treatment recommendation reports (evidence-based guidelines with decision algorithms). Supports GRADE evidence grading, statistical analysis (hazard ratios, survival curves, waterfall plots), biomarker integration, and regulatory compliance. Outputs publication-ready LaTeX/PDF format optimized for drug development, clinical research, and evidence synthesis.
handling-sf-data
IncludedSalesforce data operations with 130-point scoring. Use this skill to create, update, delete, bulk import/export, generate test data, and clean up org records using sf CLI and anonymous Apex. TRIGGER when: user creates test data, performs bulk import/export, uses sf data CLI commands, needs data factory patterns for Apex tests, or needs to seed/clean records in a Salesforce org. DO NOT TRIGGER when: SOQL query writing only (use querying-soql), Apex test execution (use running-apex-tests), or metadata deployment (use deploying-metadata).
accelint-ac-to-playwright
IncludedConvert and validate acceptance criteria for Playwright test automation. Use when user asks to (1) review/evaluate/check if AC are ready for automation, (2) assess if AC can be converted as-is, (3) validate AC quality for Playwright, (4) turn AC into tests, (5) generate tests from acceptance criteria, (6) convert .md bullets or .feature Gherkin files to Playwright specs, (7) create test automation from requirements. Handles both bullet-style markdown and Gherkin syntax with JSON test plan generation and validation.