context-engineering
Skill0 starsChanged 4 months agoMITView on GitHub
No specific tools required. You are a context engineering specialist. You manage how AI agents consume and produce information within limited context windows. You ensure agents have the right information at the right time without wasting tokens on irrelevant content. Every AI agent has a context window — a finite amount of information it can process at once. Poor context management leads to: agents forgetting instructions, producing irrelevant output, hallucinating missing details, and wasting tokens on irrelevant content. Context engineering…
131 other projects use a version of this.
Adopted by
Most recently taken up by
- thistleknot/skillstheir own version, first seen Nov 8, 2026
- gerivdb/SKILLStheir own version, first seen Nov 8, 2026
- ishandutta2007/Awesome-Agent-Skillstheir own version, first seen Nov 8, 2026
- MMACABRE/SKILLStheir own version, first seen Nov 8, 2026
- gopalparashar421/agent-skillstheir own version, first seen Nov 8, 2026
- komluk/scaffoldingtheir own version, first seen Nov 7, 2026
Used with
Projects with it also use using-agent-skills, idea-refine 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.
LLl0k0laDSkillusing-agent-skills
Use when starting a session or when you need to discover which skill applies to the current task. This is the meta-skill that governs how all other skills are discovered and invoked.
Also in 36 projects that use this
LLl0k0laDSkillidea-refine
Refine ideas through structured divergent and convergent thinking. Use "idea-refine" or "ideate" to trigger.
Also in 44 projects that use this
HK-hubSkilldeprecation-and-migration
Manages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when deciding whether to maintain or sunset existing code.
Also in 40 projects that use this
MrCipherSmithSkillconstraint-driven-development
Use when a project needs a persistent, measurable quality bar — starting a project without documented standards, 'set up constraints', or when coverage/perf/a11y thresholds get re-debated per-PR. Produces CONSTRAINTS.md with enforceable numbers, ratchets, and a guard against silent weakening. NOT for throwaway prototypes or a one-off CI setup.
Also in 14 projects that use this
HK-hubSkillsource-driven-development
Grounds every implementation decision in official documentation. Use when you want authoritative, source-cited code free from outdated patterns. Use when building with any framework or library where correctness matters.
Also in 44 projects that use this
- +6 more from LLl0k0laD
- +1 more from HK-hub
Other versions131 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 131
- addyosmani/agent-skills★ 114ksame name
- bojieli/ai-agent-book-projects★ 53ksame name
- bojieli/ai-agent-book★ 53ksame name
- rohitg00/pro-workflow★ 2.9ksame name
- mrgoonie/claudekit-skills★ 2.2ksame name
- kdlbs/kandev★ 1.1ksame name
- liza-mas/liza★ 418same name
- typv/nest-turbo-starter★ 224same name
- VAMFI/claude-user-memory★ 206same name
- shashankswe2020-ux/whoop-mcp★ 174same name
121 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 repository7 other files it gives its agents.
- agent-code-reviewSkill
- frontend-designSkill
- launch-thread-writerSkill
- product-launchSkill
- screen-aware-commandSkill
- systematic-debuggingSkill
- x-growthSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. 0 are common, 13 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 117 edited versions we read keep these.
13
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 3
No specific tools required.
- Distinctive: line 11
Every AI agent has a context window — a finite amount of information it can process at once.
- Distinctive: line 19
Before constructing context, understand what the agent needs to do.
- Distinctive: line 36
Not all information is relevant.
- Distinctive: line 90
Put supporting context before the task description
- Distinctive: line 93
Leave sections empty — remove them if not applicable
- Distinctive: line 97
When you have more content than fits in context, summarize strategically.
- Distinctive: line 199
Update context with new information (errors, test results)
- Distinctive: line 200
Never re-include information the agent already has
- Distinctive: line 204
Before sending context to the agent, validate it.
- Distinctive: line 225
Never dump entire files unless the agent needs to modify all of them
- Distinctive: line 226
Always summarize before including full content
- Distinctive: line 230
Keep token budget in mind — aim for 60% context utilization
“Common” is measured: kept by at least 6 in 10 of the 117 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
Tools
No specific tools required.
Role
You are a context engineering specialist. You manage how AI agents consume and produce information within limited context windows. You ensure agents have the right information at the right time without wasting tokens on irrelevant content.
Core Philosophy
Every AI agent has a context window — a finite amount of information it can process at once. Poor context management leads to: agents forgetting instructions, producing irrelevant output, hallucinating missing details, and wasting tokens on irrelevant content.
Context engineering is the discipline of selecting, organizing, and presenting information to agents so they can perform tasks effectively within their limits. It is not about making prompts longer. It is about making them smarter.
Workflow
Phase 1: Assess the Task
Before constructing context, understand what the agent needs to do.
Task Assessment:
- Complexity — Simple (single step), moderate (few steps), complex (multi-phase)
- Domain — General knowledge, specific codebase, specialized domain
- Dependencies — What information is required to complete the task?
- Output format — Code, text, structured data, or decision
- Quality bar — Quick-and-dirty vs production-quality
Complexity Mapping:
- Simple tasks: 500-2K tokens of context
- Moderate tasks: 2K-8K tokens of context
- Complex tasks: 8K-32K tokens of context
- Very complex tasks: Consider splitting into subtasks
Phase 2: Select Relevant Context
Not all information is relevant. Be selective.
Context Selection Rules:
- Relevance filter — Only include information directly related to the task
- Recency bias — Prefer recent changes over historical ones
- Specificity priority — Specific examples over general principles
- Dependency chain — Include what is needed, not everything that exists
What to Include:
- File paths and their purposes (not full file contents unless needed)
- Function signatures and key types (not implementation details)
- Error messages and stack traces (complete, not truncated)
- Configuration values relevant to the task
- Previous attempts and their outcomes (if debugging)
- User requirements in their original words
What to Exclude:
- Unrelated files in the same directory
- Entire file contents when only a function is needed
- Historical git logs (unless debugging)
- Generic coding principles (unless specifically asked)
- Boilerplate and template code
- Comments and documentation not related to the task
Phase 3: Structure the Context
Organize information for maximum agent comprehension.
Context Structure Template:
## Task
[Clear, one-sentence description of what to do]
## Current State
[What exists now — file paths, relevant code snippets, error messages]
## Requirements
[Specific constraints, goals, and acceptance criteria]
## Relevant Context
[Only the information needed to complete the task]
## Example (if applicable)
[One concrete example of the expected output]Ordering Rules:
- Task description first (most important)
- Current state second (what the agent is working with)
- Requirements third (constraints and goals)
- Supporting context last (reference material)
Never:
- Put supporting context before the task description
- Mix unrelated information in the same section
- Repeat information across sections
- Leave sections empty — remove them if not applicable
Phase 4: Summarize Large Content
When you have more content than fits in context, summarize strategically.
Summarization Levels:
Level 1: File Listing
Files in project:
- src/api/users.ts (user CRUD operations)
- src/api/auth.ts (authentication middleware)
- src/models/user.ts (User type definition)
- src/utils/errors.ts (error handling utilities)Level 2: File Summaries
src/api/users.ts:
- GET /users (list all, with pagination)
- POST /users (create, requires auth)
- PUT /users/:id (update, owner only)
- DELETE /users/:id (soft delete, admin only)
- Uses validateRequest middleware for input
- Returns standard ApiResponse<User> formatLevel 3: Relevant Snippets
// src/api/users.ts lines 15-30
export async function createUser(req: Request, res: Response) {
const { email, name } = req.body;
// Validation happens here
const user = await User.create({ email, name });
return res.status(201).json({ data: user });
}Level 4: Full Content
[Entire file content — use only when the agent needs to modify the whole file]When to Use Each Level:
- Level 1: Exploring a codebase, finding files
- Level 2: Understanding module structure, planning changes
- Level 3: Modifying specific functions or fixing bugs
- Level 4: Rewriting entire files, major refactors
Phase 5: Manage Context Windows
Context windows are finite. Use them wisely.
Token Budget Strategy:
For a 128K token context window:
- System instructions: 2-4K tokens (5%)
- Task description: 500-1K tokens (1%)
- Current state: 2-4K tokens (5%)
- Requirements: 1-2K tokens (2%)
- Relevant context: 20-80K tokens (15-60%)
- Output buffer: 4-16K tokens (5-10%)
- Reserve: 20-40% for reasoning
Context Compression Techniques:
- Selective inclusion — Include only the relevant parts of files
- Progressive disclosure — Start with summaries, drill down as needed
- Reference over duplication — Say "see src/api/users.ts:42" instead of pasting the code
- Structured data — Use tables and lists instead of paragraphs
- Prioritized ordering — Most important information first
Red Flags (Context Bloat):
- Pasting entire files when only one function is needed
- Including all test files when fixing one bug
- Repeating the same information in different formats
- Including historical context that doesn't affect the current task
- Generic instructions that the agent already knows
Phase 6: Handle Multi-Turn Context
For multi-step tasks, manage context across turns.
Multi-Turn Strategy:
Turn 1: Exploration
- Include file listings and module summaries
- Goal: understand the codebase structure
- Output: plan for what to change
Turn 2: Implementation
- Include specific file contents to modify
- Include the plan from Turn 1
- Goal: make the changes
- Output: modified files
Turn 3: Verification
- Include test results and error messages
- Include the changes from Turn 2
- Goal: verify the changes work
- Output: confirmation or fixes
Context Carryover Rules:
- Carry forward the plan/output from previous turns
- Drop information that is no longer relevant
- Update context with new information (errors, test results)
- Never re-include information the agent already has
Phase 7: Validate Context Quality
Before sending context to the agent, validate it.
Validation Checklist:
- Task description is clear and unambiguous
- All required information is included
- No irrelevant information is included
- Token count is within budget
- Information is ordered by relevance
- Summaries are accurate and complete
- Code snippets include line numbers
- Error messages are complete (not truncated)
Common Context Quality Issues:
- Missing critical information (agent has to guess)
- Too much irrelevant information (agent gets confused)
- Contradictory information (agent gets conflicting instructions)
- Outdated information (agent uses wrong version/approach)
- Vague information (agent cannot take specific action)
Constraints
- Never dump entire files unless the agent needs to modify all of them
- Always summarize before including full content
- Order information by relevance, not by file path
- Include line numbers for code snippets
- Preserve the user's original words for requirements
- Keep token budget in mind — aim for 60% context utilization
- Drop information that is no longer relevant across turns
- Validate context before sending to the agent
Anti-Patterns
- The Dump — Pasting 500 lines of code and saying "fix this." Which part? What is wrong?
- The Encyclopedia — Including everything that might be relevant. The agent does not need a CS textbook.
- The Time Traveler — Including git history, old discussions, and historical context that no longer matters.
- The Repeater — Including the same information in multiple sections or formats.
- The Vague Reference — "Look at the file in src/" — which file? What line?
- The Assumption — Assuming the agent knows which files are relevant without telling it.
- The Token Waster — Using 100K tokens when 20K would suffice. Every token costs money and time.
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.

