Claude Code Prompts — 26 Agent Prompt Templates
Independently authored collection of 26 prompt templates for AI coding agents — system prompts, tool routing, agent delegation, memory management, and multi-agent coordination patterns. MIT license.
先审查再安装
这个资产需要先审查。复制的指令会要求 Agent dry-run、列出写入项,确认后再继续。
npx -y tokrepo@latest install 5335df26-ac23-46d7-89f6-2306a52d2bcb --target codex先 dry-run,确认写入项后再运行此命令。
What it is
Claude Code Prompts is a curated collection of 26 agent prompt templates designed specifically for Claude Code workflows. Each template is structured with clear context, instructions, and output format to produce consistent, high-quality results across common development tasks like code review, refactoring, debugging, test generation, and documentation.
This collection targets developers using Claude Code who want reusable, proven prompts instead of writing ad-hoc instructions for recurring tasks.
How it saves time or tokens
Ad-hoc prompts often produce inconsistent results, requiring multiple iterations. These templates are pre-optimized for Claude Code, with explicit output format specifications and task-specific context. Using a structured template instead of a vague request typically produces a usable result on the first attempt, saving both time and token expenditure on follow-up clarifications.
How to use
- Browse the template collection and find the one matching your task.
- Copy the template into your Claude Code session.
- Replace the placeholder sections with your specific code or context.
Example
A code review template:
Review the following code for:
1. Security vulnerabilities (injection, auth bypass, data exposure)
2. Performance issues (N+1 queries, unnecessary allocations)
3. Error handling gaps (uncaught exceptions, missing validation)
4. Code style violations against the project conventions
For each issue found, provide:
- File and line reference
- Severity: critical / warning / suggestion
- Specific fix recommendation with code
Code to review:
[paste your code here]
A test generation template:
Generate unit tests for the following function.
Requirements:
- Cover happy path, edge cases, and error conditions
- Use the project's existing test framework
- Mock external dependencies
- Each test should be independent and idempotent
Function:
[paste function here]
Related on TokRepo
- Prompt library — broader collection of AI prompts
- Coding tools — AI-assisted development tools
Common pitfalls
- Templates are starting points, not rigid scripts; adapt the output format and focus areas to match your project conventions
- Overly long code snippets in the prompt can dilute the template instructions; paste focused sections rather than entire files
- Templates assume Claude Code context; when using in other tools, you may need to adjust references to tool-specific features
常见问题
Yes. The templates are plain text and work with any LLM-based coding tool. They are optimized for Claude Code but the structure and instructions transfer well to Cursor, Copilot Chat, ChatGPT, and other AI coding assistants.
Templates are grouped by task type: code review, refactoring, debugging, test generation, documentation, architecture analysis, and performance optimization. Each group contains 3-4 templates for different levels of detail and scope.
Yes. Templates are designed to be modified. Add project-specific conventions, change output formats, or combine multiple templates for complex tasks. The placeholder sections indicate where to insert your specific context.
Most templates are language-agnostic. The code review, debugging, and documentation templates work across Python, JavaScript, TypeScript, Go, Rust, and other languages. Some templates include language-specific examples that you can adapt.
The collection is community-maintained. New templates are added when common patterns emerge from Claude Code usage. You can contribute templates by following the existing format and submitting them to the repository.
引用来源 (3)
- Anthropic Docs— Claude Code is Anthropic's CLI for AI-assisted development
- Anthropic Prompt Engineering— Structured prompts improve LLM output quality
- Anthropic Docs— Code review best practices for AI tools
TokRepo 相关
来源与感谢
Created by RepoWise. Licensed under MIT.
claude-code-prompts — ⭐ 750+
讨论
相关资产
Prompt Architect — 27 Frameworks for Expert Prompts
Transform vague prompts into structured, expert-level prompts using 27 research-backed frameworks across 7 intent categories. Works with Claude Code, ChatGPT, Cursor, and 30+ AI tools.
Claude Code System Prompts — Full Extraction
Complete extraction of all Claude Code system prompts, 18 tool descriptions, sub-agent prompts, and utility prompts. Tracked across 135+ versions.
Claude Code vs Cursor — When to Use Which
Practical comparison guide for developers choosing between Claude Code (terminal agent) and Cursor (AI IDE). Covers strengths, workflows, pricing, and when each tool shines with real-world examples.
System Prompts — Extracted from 30+ AI Coding Tools
Full system prompts extracted from Claude Code, Cursor, Devin, Windsurf, Replit, v0, and 25+ more AI tools. See exactly how they work.