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…
64 other projects use a version of this.
Adopted by
Most recently taken up by
- niki914/zafirotheir own version, first seen Oct 3, 2026
- dimitritholen/1337-claudetheir own version, first seen Sep 23, 2026
- ZeroTokenClaw/agents-skillstheir own version, first seen Sep 21, 2026
- nahid-sparktales/agent-dispatchertheir own version, first seen Sep 21, 2026
- emtcmca/guildprooftheir own version, first seen Sep 20, 2026
- sabahattink/antigravity-fullstack-hqtheir own version, first seen Sep 20, 2026
Used with
Projects with it also use security-checklist, nextjs-app-router 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
desilokesh1Skillnextjs-app-router
Next.js App Router best practices, Server Components, Server Actions, routing patterns, and data fetching strategies. Use when building Next.js applications with the App Router.
Also in 3 projects that use this
stefan-jansenSkillllm-evaluation
LLM evaluation and testing patterns including prompt testing, hallucination detection, benchmark creation, and quality metrics. Use when testing LLM applications, validating prompt quality, implementing systematic evaluation, or measuring LLM performance.
Also in 3 projects that use this
rohitg00Skilldata-engineering
Data engineering patterns for ETL pipelines, data warehousing, Apache Spark, and data quality validation
Also in 3 projects that use this
qodex-aiSkillmulti-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 3 projects that use this
mrgoonieSkillcontext-engineering
Master context engineering for AI agent systems. Use when designing agent architectures, debugging context failures, optimizing token usage, implementing memory systems, building multi-agent coordination, evaluating agent performance, or developing LLM-powered pipelines. Covers context fundamentals, degradation patterns, optimization techniques (compaction, masking, caching), compression strategies, memory architectures, multi-agent patterns, LLM-as-Judge evaluation, tool design, and project development.
Also in 7 projects that use this
Other versions64 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 64
- rohitg00/awesome-claude-code-toolkit★ 2.7ksame name
- NeoLabHQ/context-engineering-kit★ 1.7ksame name
- niki914/zafiro★ 221same name
- CodeAlive-AI/ai-driven-development★ 153same name
- nahid-sparktales/agent-dispatcher★ 59same name
- martinholovsky/claude-skills-generator★ 47same name
- Bbar0n234/learnflow-ai★ 35same name
- geekatron/jerry★ 35same name
- sabahattink/antigravity-fullstack-hq★ 30same name
- liqiongyu/my-agents★ 29same name
54 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 57 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 57 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.

