agentleFS
roronoazoroshao369roronoazoroshao369/vibe-coding-os/skills/core/code-context-pack/SKILL.md

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…

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
  1. Distinctive:

    Use this skill before any non-trivial coding task: bug fixes, feature work, refactors, migrations, or changes spanning multiple files.

    line 23
  2. Distinctive:

    Check error handling, retries, and failure-path conventions.

    line 39
  3. Distinctive:

    Look for relevant ADRs, decisions, or task notes.

    line 41
  4. Distinctive:

    Use the filled pack to guide the implementation plan or coding step.

    line 44

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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

  1. Identify the task goal, affected area, and likely neighbors.
  2. Inspect similar existing implementations nearby.
  3. Find related tests and note assertion and setup patterns.
  4. Check error handling, retries, and failure-path conventions.
  5. Review type definitions, API contracts, and shared utilities.
  6. Look for relevant ADRs, decisions, or task notes.
  7. Note known gotchas for this task type.
  8. Fill templates/code-context-pack-template.md with concrete findings.
  9. 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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.