prompt-engineering
Skill4 starsChanged 8 months agoMITArchived repositoryView on GitHub
Load when working with: system prompts, few-shot examples, chain-of-thought, prompt templates, system_prompt, few_shot, prompt evaluation, "промпт", CoT, output formatting, structured output. A production system prompt has four sections: Keep system prompts under 2000 tokens. Longer prompts reduce Claude's effective context for user content. Place examples AFTER the main instruction, not before. Three examples outperform one. Use diverse examples that cover edge cases. Use explicit CoT for reasoning tasks. Add "Think step by step" or "First reason through the problem, then…
99 other projects use a version of this.
Adopted by
Most recently taken up by
- gromov0737/skillstheir own version, first seen Nov 29, 2026
- kaushik-holla/agent-skillstheir own version, first seen Nov 29, 2026
- martinholovsky/claude-skills-generatortheir own version, first seen Nov 29, 2026
- amutaal122/ai-engineer-mastertheir own version, first seen Nov 29, 2026
- Arslan-Ali-11/claude_skillstheir own version, first seen Nov 29, 2026
- afine907/skillstheir own version, first seen Nov 29, 2026
Used with
Projects with it also use security-checklist, multi-agent-orchestration and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
atuljha23Skillsecurity-checklist
OWASP-style quick reference — authn/authz, injection, secrets, sessions, crypto, dependencies. Use during code review and before committing security-sensitive changes.
Also in 3 projects that use this
javalenciacaiSkillmulti-agent-orchestration
Design and coordinate multi-agent systems where specialized agents work together to solve complex problems. Covers agent communication, task delegation, workflow orchestration, and result aggregation. Use when building coordinated agent teams, complex workflows, or systems requiring specialized expertise across domains.
Also in 4 projects that use this
xfstudioSkillllm-evaluation
Implement comprehensive evaluation strategies for LLM applications using automated metrics, human feedback, and benchmarking. Use when testing LLM performance, measuring AI application quality, or establishing evaluation frameworks.
Also in 3 projects that use this
MicrosoftSkillcost-optimization
Optimize existing Azure resources and analyze Reservations or Savings Plans. WHEN: \"optimize Azure costs\", \"reduce cloud spending\", \"rightsize resources\", \"find idle resources\", \"orphaned disk\", \"deleted VM still charged\", \"public IP still charging\", \"reservation utilization\", \"Savings Plan coverage\", \"commitment recommendation\", \"why is pay-as-you-go still charged\". DO NOT USE FOR: cost spikes, forecasts, pricing estimates, budgets, or governance.
Also in 3 projects that use this
GoogleSkillcoding-principles
Enforces engineering, architecture, public API, and code quality standards distilled from human reviewer feedback across A2UI pull requests. Use when authoring new code, refactoring, addressing review feedback, or reviewing PR diffs. Don't use for release publishing or spec blueprint generation without code or PR changes.
Also in 3 projects that use this
mrgoonieSkillproblem-solving
Creative problem-solving techniques for breaking through stuck points - includes collision-zone thinking, inversion, pattern recognition, and simplification
Also in 3 projects that use this
Other versions99 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 99
- trycompai/comp★ 2.2ksame name
- niki914/zafiro★ 405same name
- CodeAlive-AI/ai-driven-development★ 194same name
- grandamenium/cortextos★ 106same name
- nahid-sparktales/agent-dispatcher★ 59same name
- martinholovsky/claude-skills-generator★ 48same name
- nimadorostkar/Claude-Skills-collection★ 41same name
- geekatron/jerry★ 37same name
- Bbar0n234/learnflow-ai★ 35same name
- sabahattink/antigravity-fullstack-hq★ 30same name
89 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository23 other files it gives its agents.
- .claude/CLAUDE.mdCLAUDE.md
- llms.txtllms.txt
- claude-api-patternsSkill
- critical-analysisSkill
- database-migration-safetySkill
- data-validationSkill
- design-doc-creatorSkill
- experiment-trackingSkill
- fastapi-patternsSkill
- github-actionsSkill
- htmx-frontendSkill
- infra-yandex-cloudSkill
- langgraph-patternsSkill
- ml-data-handlingSkill
- multimodal-routerSkill
- nlp-slm-patternsSkill
- predictive-analyticsSkill
- python-project-standardsSkill
- rag-vector-dbSkill
- skill-developerSkill
- supply-chain-auditorSkill
- test-first-patternsSkill
- windows-developerSkill
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 4 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 87 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 25
Keep system prompts under 2000 tokens.
- Distinctive: line 29
Place examples AFTER the main instruction, not before.
- Distinctive: line 49
Use explicit CoT for reasoning tasks.
- Distinctive: line 63
Do NOT use CoT for classification or extraction tasks — it wastes tokens without improving accuracy.
“Common” is measured: kept by at least 6 in 10 of the 87 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Prompt Engineering
When to Load This Skill
Load when working with: system prompts, few-shot examples, chain-of-thought, prompt templates, system_prompt, few_shot, prompt evaluation, "промпт", CoT, output formatting, structured output.
System Prompt Structure
A production system prompt has four sections:
## Role
Who Claude is in this context.
## Context
What the system is, what data Claude has access to, key constraints.
## Task
What Claude must do. Be specific — avoid "help the user".
## Output Format
Exact format of the response. Include examples.Keep system prompts under 2000 tokens. Longer prompts reduce Claude's effective context for user content.
Few-Shot Examples
Place examples AFTER the main instruction, not before. Three examples outperform one. Use diverse examples that cover edge cases.
SYSTEM_PROMPT = """
You are a document classifier. Classify the document into one of: invoice, contract, receipt, other.
Examples:
Document: "Payment due by 30 days for services rendered..."
Label: invoice
Document: "This agreement is made between Party A and Party B..."
Label: contract
Document: "Thank you for your purchase. Total: $42.00"
Label: receipt
"""Chain-of-Thought
Use explicit CoT for reasoning tasks. Add "Think step by step" or "First reason through the problem, then give your answer."
SYSTEM_PROMPT = """
You are a data analyst. When answering questions about data:
1. First, identify what the question is asking
2. List the relevant data points
3. Reason through the calculation
4. State your final answer
Do not skip directly to the answer.
"""Do NOT use CoT for classification or extraction tasks — it wastes tokens without improving accuracy.
Structured Output
For JSON output, provide the exact schema in the system prompt:
SYSTEM_PROMPT = """
Extract the following fields from the document. Return ONLY valid JSON, no other text:
{
"date": "YYYY-MM-DD or null",
"amount": float or null,
"vendor": "string or null",
"category": "invoice|receipt|contract|other"
}
"""Validate the output with Pydantic:
from pydantic import BaseModel
class DocumentExtraction(BaseModel):
date: str | None
amount: float | None
vendor: str | None
category: str
def extract(text: str) -> DocumentExtraction:
response = client.messages.create(
model="claude-haiku-4-5-20251001",
max_tokens=256,
system=EXTRACTION_PROMPT,
messages=[{"role": "user", "content": text}],
)
return DocumentExtraction.model_validate_json(response.content[0].text)Prompt Versioning
Store prompts in files, not inline strings:
prompts/
├── v1/
│ ├── system.md
│ └── examples.md
└── v2/
├── system.md
└── examples.mdLoad at startup, cache in memory:
from pathlib import Path
from functools import lru_cache
@lru_cache(maxsize=None)
def load_prompt(name: str, version: str = "v1") -> str:
path = Path("prompts") / version / f"{name}.md"
return path.read_text(encoding="utf-8")Common Failure Modes
- Instruction following failure: too many rules in one prompt → split into sub-tasks
- Format drift: Claude adds explanation around JSON → add "Return ONLY..." + validate
- Role confusion: Claude breaks character → strengthen the Role section
- Reasoning shortcut: Claude skips steps → explicitly require intermediate steps
See Also
resources/structured-output.md— advanced output validation patternsresources/evals-framework.md— eval framework for prompt regression testing
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

