code-context-pack
Skill1 starsChanged 5 months agoMITView on GitHub
Assemble a focused context pack before writing code so the agent works from local patterns, not general training memory. This forces inspection of nearby implementations, tests, conventions, and constraints before any edit. Use this skill before any non-trivial coding task: bug fixes, feature work, refactors, migrations, or changes spanning multiple files. For tiny typo-only edits, the pack can be lightweight, but context should still be checked. Even capable models produce inconsistent code when they skip nearby context. A code context…
In this repository117 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- advanced-orchestrationSkill
- architect-agentSkill
- implementer-agentSkill
- quality-councilSkill
- reviewer-agentSkill
- tester-agentSkill
- writer-critic-pairSkill
- authoring-skillsSkill
- api-endpoint-qualitySkill
- async-job-qualitySkill
- auth-qualitySkill
- db-migration-qualitySkill
- frontend-state-qualitySkill
- acceptance-criteriaSkill
- adaptive-flowSkill
- adaptive-prompt-selectionSkill
- adversarial-code-reviewSkill
- architecture-decision-recordsSkill
- brainstormingSkill
- brownfield-spec-enhancementSkill
- bug-fix-lifecycleSkill
- checkpoint-validationSkill
- cicd-integrationSkill
- clarify-before-codeSkill
- claude-code-hooks-packSkill
- code-intelligence-reviewSkill
- context-policySkill
- context-rich-implementationSkill
- crash-proof-planningSkill
- critique-pass-protocolSkill
- dependency-aware-task-orderingSkill
- deprecation-migrationSkill
- disciplined-diagnosisSkill
- docs-authorSkill
- executing-plansSkill
- external-skillSkill
- finishing-a-development-branchSkill
- git-guardrailsSkill
- goal-driven-executionSkill
- grill-user-before-buildingSkill
- guard-bypass-protocolSkill
- improve-codebase-architectureSkill
- incremental-reviewSkill
- issue-slicingSkill
- lessons-learned-dbSkill
- loop-engineeringSkill
- model-aware-configSkill
- model-weakness-memorySkill
- multi-repo-learningSkill
- orchestration-workflowsSkill
- plan-driven-executionSkill
- plan-from-specSkill
- prd-from-contextSkill
- project-constitutionSkill
- prompt-architectureSkill
- prototype-before-commitmentSkill
- quality-engineSkill
- quality-execution-contractSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 4 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
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 23
Use this skill before any non-trivial coding task: bug fixes, feature work, refactors, migrations, or changes spanning multiple files.
- Distinctive: line 39
Check error handling, retries, and failure-path conventions.
- Distinctive: line 41
Look for relevant ADRs, decisions, or task notes.
- Distinctive: line 44
Use the filled pack to guide the implementation plan or coding step.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Skill: Code Context Pack
Purpose
Assemble a focused context pack before writing code so the agent works from local patterns, not general training memory. This forces inspection of nearby implementations, tests, conventions, and constraints before any edit.
When to use
Use this skill before any non-trivial coding task: bug fixes, feature work, refactors, migrations, or changes spanning multiple files. For tiny typo-only edits, the pack can be lightweight, but context should still be checked.
Why it matters
Even capable models produce inconsistent code when they skip nearby context. A code context pack captures the actual local patterns for naming, error handling, testing, API shape, and decisions, which reduces hallucination and improves fit with the existing codebase.
Workflow
- Identify the task goal, affected area, and likely neighbors.
- Inspect similar existing implementations nearby.
- Find related tests and note assertion and setup patterns.
- Check error handling, retries, and failure-path conventions.
- Review type definitions, API contracts, and shared utilities.
- Look for relevant ADRs, decisions, or task notes.
- Note known gotchas for this task type.
- Fill
templates/code-context-pack-template.mdwith concrete findings. - Use the filled pack to guide the implementation plan or coding step.
Inputs
Task description, acceptance criteria, repository context, and file inventory.
Outputs
A completed Code Context Pack listing similar implementations, test patterns, error handling conventions, naming styles, API contracts, and known gotchas.
Failure modes
- Skipping context collection because the task seems obvious.
- Reading only file names instead of inspecting actual code.
- Listing general best practices instead of repo-specific patterns.
- Copying stale conventions from memory rather than live files.
- Treating the pack as decorative instead of letting it drive the edit.
Verification checklist
- Similar implementations were inspected, not just assumed.
- At least one related test file was reviewed.
- Naming, error handling, and assertion styles are recorded from code.
- Type/API constraints are checked when relevant.
- The pack is filled in before implementation begins.
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.

