Prompts2026年4月6日·1 分钟阅读

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 就绪

先审查再安装

这个资产需要先审查。复制的指令会要求 Agent dry-run、列出写入项,确认后再继续。

Needs Confirmation · 64/100策略:需确认
Agent 入口
任意 MCP/CLI Agent
类型
Prompt
安装
Single
信任
信任等级:Community
入口
Claude Code Prompts — 26 Agent Prompt Templates
先审查命令
npx -y tokrepo@latest install 5335df26-ac23-46d7-89f6-2306a52d2bcb --target codex

先 dry-run,确认写入项后再运行此命令。

TL;DR
26 structured prompt templates for Claude Code covering code review, debugging, testing, refactoring, and documentation tasks.
§01

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.

§02

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.

§03

How to use

  1. Browse the template collection and find the one matching your task.
  1. Copy the template into your Claude Code session.
  1. Replace the placeholder sections with your specific code or context.
§04

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]
§05

Related on TokRepo

§06

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

常见问题

Can I use these templates with other AI tools?+

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.

How are the 26 templates organized?+

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.

Can I customize the templates?+

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.

Do these templates work for any programming language?+

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.

How often are new templates added?+

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)
🙏

来源与感谢

Created by RepoWise. Licensed under MIT.

claude-code-prompts — ⭐ 750+

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产