Skip to content

Latest commit

 

History

History
351 lines (282 loc) · 21.9 KB

File metadata and controls

351 lines (282 loc) · 21.9 KB
title description tags
Claude Code Examples
Annotated templates teaching why patterns work, with trade-offs and alternatives
template
reference
workflows
architecture

Claude Code Examples

Annotated templates that teach you why patterns work, not just how to configure them. Each template includes comments explaining trade-offs, alternatives, and when to deviate.

Browse Interactive Catalog — View, copy, and download all templates with syntax highlighting

Structure

Folder Description Count
agents/ Custom AI personas for specialized tasks 14 + 2 collections
commands/ Slash commands (workflow automation) 31
hooks/ Event-driven security & automation scripts 34
skills/ Reusable knowledge modules — 9 on SkillHub 17
claude-md/ CLAUDE.md configuration profiles 7
config/ Settings, MCP, git templates 8
memory/ CLAUDE.md memory file templates 2
rules/ Behavioral rules for common review patterns 5
scripts/ Diagnostic & utility scripts 16
team-config/ Team onboarding templates 3
templates/ Session and workflow templates 1
github-actions/ CI/CD workflows 4
workflows/ Advanced development workflows 3
plugins/ Community plugins (SE-CoVe, claude-mem) 2
integrations/ External tool integrations (Agent Vibes TTS) 1
mcp-configs/ MCP server configurations 1
modes/ Behavioral modes (SuperClaude) 1
semantic-anchors/ Precise vocabulary for better LLM outputs 1
multi-provider/ Multi-provider bridge → dedicated repo

Quick Start

  1. Copy the template you need
  2. Customize for your project
  3. Place in the correct location (see paths below)

File Locations

Type Project Location Global Location
Agents .claude/agents/ ~/.claude/agents/
Skills .claude/skills/ ~/.claude/skills/
Commands .claude/commands/ ~/.claude/commands/
Hooks .claude/hooks/ ~/.claude/hooks/
Config .claude/ ~/.claude/
Memory ./CLAUDE.md or .claude/CLAUDE.md ~/.claude/CLAUDE.md
Modes ~/.claude/MODE_*.md

Windows: Replace ~/.claude/ with %USERPROFILE%\.claude\

Templates Index

Agents (16)

File Purpose Model
code-reviewer.md Thorough code review Sonnet
test-writer.md TDD/BDD test generation Sonnet
security-auditor.md Security vulnerability detection Sonnet
refactoring-specialist.md Clean code refactoring Sonnet
output-evaluator.md LLM-as-a-Judge quality gate Haiku
devops-sre.md Infrastructure troubleshooting with FIRE framework Sonnet
planner.md Strategic planning — read-only, before implementation Opus
implementer.md Mechanical execution — bounded scope Haiku
architecture-reviewer.md Architecture & design review — read-only Opus
adr-writer.md Architecture Decision Record generator — read-only Opus
integration-reviewer.md Runtime integration validator — read-only Sonnet
plan-challenger.md Adversarial plan review across 5 dimensions — read-only Sonnet
planning-coordinator.md Synthesis agent for dynamic research teams — read-only Sonnet
security-patcher.md Apply security patches from audit findings — proposes for review Sonnet
analytics-with-eval/ Collection: analytics agent + evaluation hooks
cyber-defense/ Collection: anomaly detector, log ingestor, risk classifier, threat reporter

Skills (17) — 9 on SkillHub

File Purpose
design-patterns/ Detect and analyze GoF design patterns with stack-aware suggestions
tdd-workflow.md Test-Driven Development process
security-checklist.md OWASP Top 10 security checks
pdf-generator.md Professional PDF generation (Quarto/Typst)
voice-refine/ Writing voice refinement with before/after examples
ast-grep-patterns.md AST-based code search patterns
rtk-optimizer/ RTK token optimization analysis
audit-agents-skills/ Quality audit for agents, skills, and commands
skill-creator/ Create new skills with proper structure and best practices
landing-page-generator/ Generate deploy-ready landing pages from any repository
ccboard/ Comprehensive TUI/Web dashboard for Claude Code monitoring
guide-recap/ Transform CHANGELOG entries into social content (LinkedIn, Twitter/X, Slack)
release-notes-generator/ Generate release notes in 3 formats from git commits
pr-triage/ 4-phase PR backlog management (audit, deep review, validated comments, worktree setup)
issue-triage/ 3-phase issue backlog management (audit, deep analysis, validated actions)
cyber-defense-team/ Multi-agent cyber defense team orchestration
talk-pipeline/ 6-stage pipeline: raw material to slides via Kimi

Commands (31)

File Trigger Purpose
commit.md /commit Conventional commit messages
pr.md /pr Create well-structured PRs with scope analysis
review-pr.md /review-pr PR review workflow
release-notes.md /release-notes Generate release notes in 3 formats
sonarqube.md /sonarqube Analyze SonarCloud quality issues for PRs
generate-tests.md /generate-tests Test generation
git-worktree.md /git-worktree Isolated git worktree setup
git-worktree-status.md /git-worktree-status Check worktree background verification tasks
git-worktree-remove.md /git-worktree-remove Safe worktree removal with merge checks
git-worktree-clean.md /git-worktree-clean Batch cleanup of stale worktrees
diagnose.md /diagnose Interactive troubleshooting assistant (FR/EN)
validate-changes.md /validate-changes LLM-as-a-Judge pre-commit validation
catchup.md /catchup Restore context after /clear
security.md /security Quick OWASP security audit
security-check.md /security-check Config scan vs known threats (~30s)
security-audit.md /security-audit Full 6-phase audit with score /100
update-threat-db.md /update-threat-db Research & update threat intelligence
audit-agents-skills.md /audit-agents-skills Quality audit for .claude/ config
sandbox-status.md /sandbox-status Sandbox isolation status check
refactor.md /refactor SOLID-based code improvements
explain.md /explain Code explanations (3 depth levels)
optimize.md /optimize Performance analysis and roadmap
ship.md /ship Pre-deploy checklist
learn/quiz.md /learn:quiz Self-testing for learning concepts
learn/teach.md /learn:teach Step-by-step concept explanations
learn/alternatives.md /learn:alternatives Compare different approaches
audit-codebase.md /audit-codebase Codebase health audit scoring 7 categories
plan-start.md /plan-start 5-phase planning: PRD analysis, design review, technical decisions, research team, metrics
plan-execute.md /plan-execute Execute validated plan: worktree isolation, TDD scaffolding, parallel agents, PR creation
plan-validate.md /plan-validate 2-layer plan validation: structural checks + specialist agents, auto-fix issues
review-plan.md /review-plan Structured plan review across 4 axes before writing code

Hooks (34)

Security-first: 12 security hooks, 8 productivity hooks, 5 automation hooks, 5 monitoring hooks.

Security Hooks (13 bash):

File Event Purpose
dangerous-actions-blocker.sh PreToolUse Block rm -rf, force-push, production ops
prompt-injection-detector.sh PreToolUse Detect injection patterns in prompts
unicode-injection-scanner.sh PreToolUse Detect zero-width, RTL override, ANSI escape
repo-integrity-scanner.sh PreToolUse Scan README/package.json for hidden injection
security-check.sh PreToolUse Block secrets in commands
sandbox-validation.sh PreToolUse Validate sandbox isolation
file-guard.sh PreToolUse Protect sensitive files from modification
permission-request.sh PreToolUse Explicit permission flow for risky ops
mcp-config-integrity.sh SessionStart Verify MCP config hash (CVE protection)
claudemd-scanner.sh SessionStart Detect CLAUDE.md injection attacks
output-secrets-scanner.sh PostToolUse Prevent API keys/tokens in Claude responses
pre-commit-secrets.sh Git hook Block secrets from entering commits
security-gate.sh PreToolUse Detect vulnerable code patterns before writing to source files

Productivity Hooks (10):

File Event Purpose
auto-format.sh PostToolUse Auto-format after edits (Prettier, Black, go fmt)
auto-checkpoint.sh PostToolUse Auto-checkpoint work at intervals
typecheck-on-save.sh PostToolUse Run TypeScript checks on save
test-on-change.sh PostToolUse Run tests on file changes
rtk-auto-wrapper.sh PreToolUse Auto-wrap commands with RTK for token savings
rtk-baseline.sh SessionStart Save RTK baseline for session savings tracking
setup-init.sh SessionStart Initialize session environment
subagent-stop.sh Stop Clean up sub-agent resources
auto-rename-session.sh SessionEnd AI-powered session title generation (Haiku)
velocity-governor.sh PreToolUse Rate-limit tool calls to avoid API throttling

Monitoring Hooks (6):

File Event Purpose
output-validator.sh PostToolUse Heuristic output validation
session-logger.sh PostToolUse Log operations for monitoring
session-summary.sh SessionEnd Display session stats (duration, tools, cost, RTK savings)
session-summary-config.sh CLI tool Configure session-summary sections and display
learning-capture.sh Stop Prompt for daily learning capture
privacy-warning.sh PostToolUse Warn on potential privacy leaks

Notification & TTS (3):

File Event Purpose
notification.sh Notification Contextual macOS sound alerts
tts-selective.sh PostToolUse Text-to-speech for selected outputs
pre-commit-evaluator.sh Git hook LLM-as-a-Judge pre-commit

PowerShell (2):

File Event Purpose
security-check.ps1 PreToolUse Block secrets in commands
auto-format.ps1 PostToolUse Auto-format after edits

See hooks/README.md for full documentation, configuration examples, and security hardening patterns

Config (8)

File Purpose
settings.json Hooks configuration
mcp.json MCP servers setup
.gitignore-claude Git ignore patterns
CONTRIBUTING-ai-disclosure.md AI disclosure template for CONTRIBUTING.md
PULL_REQUEST_TEMPLATE-ai.md PR template with AI attribution
sandbox-native.json Native Claude Code sandbox configuration
settings-personalization.json UI personalization: spinner verbs, custom tips carousel
settings.local.json.example Local overrides example (gitignored)

Memory (2)

File Purpose
CLAUDE.md.project-template Team project memory
CLAUDE.md.personal-template Personal global memory

CLAUDE.md Configurations (7)

File Purpose
learning-mode.md Learning-focused development configuration
devops-sre.md DevOps/SRE project configuration
product-designer.md Product designer workflow configuration
tts-enabled.md Text-to-speech enabled configuration
rtk-optimized.md RTK token-optimized configuration
session-naming.md Auto-rename sessions with descriptive titles for parallel work
design-reference-file.md Brand-book and UI kit context for consistent UI generation

See guide/learning-with-ai.md for learning mode documentation See guide/devops-sre.md for DevOps/SRE guide

Scripts (16)

File Purpose Output
audit-scan.sh Fast setup audit scanner JSON / Human
check-claude.sh Health check diagnostics (macOS/Linux) Human
check-claude.ps1 Health check diagnostics (Windows) Human
clean-reinstall-claude.sh Clean reinstall procedure (macOS/Linux) Human
clean-reinstall-claude.ps1 Clean reinstall procedure (Windows) Human
session-stats.sh Analyze session logs & costs JSON / Human
session-search.sh Fast session search & resume Human
cc-sessions.py Advanced session search with incremental indexing Human
fresh-context-loop.sh Auto-restart sessions at context limits Human
bridge.py Plan bridging between sessions JSON
bridge-plan-schema.json JSON Schema for bridge plan v1 format
migrate-arguments-syntax.sh Migrate v1 → v2 argument syntax (bash) Human
migrate-arguments-syntax.ps1 Migrate v1 → v2 argument syntax (PowerShell) Human
rtk-benchmark.sh Benchmark RTK token savings Human
sync-claude-config.sh Sync Claude config across machines Human
sonnetplan.sh Alias to run Claude with Sonnet instead of Opus (cost optimization) Human

See scripts/README.md for detailed usage

Rules (5)

File Purpose
architecture-review.md Rules for architecture review sessions
code-quality-review.md Rules for code quality review sessions
first-principles.md First-principles reasoning rules
performance-review.md Rules for performance review sessions
test-review.md Rules for test review sessions

Team Config (3)

File Purpose
claude-skeleton.md Minimal CLAUDE.md skeleton for new team members
profile-template.yaml Profile assembly template for multi-tool teams
sync-script.ts Sync Claude config across team machines

Templates (1)

File Purpose
session-handoff-lorenz.md Session handoff template for context continuity

GitHub Actions (4)

File Trigger Purpose
claude-code-review.yml PR open/sync + /claude-review comment Prompt-based review (externalized prompt + anti-hallucination protocol)
claude-pr-auto-review.yml PR open/update Auto code review with inline comments
claude-security-review.yml PR open/update Security-focused scan (OWASP)
claude-issue-triage.yml Issue opened Auto-triage with labels and severity

See github-actions/README.md for setup instructions and customization

Workflows (3)

File Purpose
database-branch-setup.md Isolated feature dev with database branches (Neon/PlanetScale)
memory-stack-integration.md Multi-day workflow with memory tools (claude-mem + Serena + grepai)
remotion-quickstart.md Video generation workflow with Remotion

Plugins (2)

File Purpose
se-cove.md Chain-of-Verification for independent code review (Meta AI, ACL 2024)
claude-mem.md Persistent memory management plugin

Integrations (1)

Tool Purpose
Agent Vibes TTS Text-to-speech narration for Claude Code responses

See agent-vibes/README.md for installation and voice catalog

MCP Configs (1)

File Purpose
figma.json Figma MCP server configuration

Modes (1)

File Purpose Activation
MODE_Learning.md Just-in-time explanations --learn flag

See modes/README.md for installation and SuperClaude framework reference

Semantic Anchors (1)

File Purpose
anchor-catalog.md Comprehensive catalog of precise technical terms for prompting

See Section 2.7 in the guide for how to use semantic anchors

Multi-Provider Bridge

Tool Purpose
cc-copilot-bridge Bridge GitHub Copilot to Claude Code CLI for flat-rate access

Moved to dedicated repository: github.com/FlorianBruniaux/cc-copilot-bridge


See the main guide for detailed explanations, or the architecture guide for how Claude Code works internally.