agentleFS
bonez-iobonez-io/re_gent/.claude/skills/context-primer/SKILL.md

context-primer

Skill4 starsChanged 6 months agoApache-2.0View on GitHub

Load everything captured history knows about a file or area before work starts, so the agent begins warm instead of from zero. Use at the start of a task, before editing unfamiliar code.

The file

Files
SKILL.md

Brief the agent on a file before it edits it.

An agent starts every session knowing nothing about how this code came to be. It re-derives decisions that were already made, and re-makes mistakes that were already corrected. re_gent has that history. This skill loads it.

Gather

rgt blame <path>                       # which steps own which lines
rgt log --json --session <id> -n 100   # per session, the steps and prompts
rgt show <step-hash>                   # full context for the important ones

From rgt blame, take the distinct step hashes owning lines in the file — those are the turns that built it. Read each with rgt show, oldest first. Pull the prompt, the assistant's stated reasoning, and the files that moved alongside.

Cap it: the ten or so steps that own the most lines are enough. This is a briefing, not an archive.

Distil

Produce a briefing, not a log. Chronological, but only what changes how someone would edit this file today:

Purpose — what this file is for, inferred from the prompts that built it, not from its code.

Decisions already made — choices someone made deliberately, with the prompt that drove them. These are the things not to relitigate.

Corrections — where a later step reversed an earlier one. Quote both prompts. This is the highest-value section: it is the record of what was already tried and rejected, and it is exactly what a cold agent repeats.

Constraints in force — anything a prompt asked for that still binds ("keep the API stable", "no new dependencies").

Usual company — files that move with this one (see the file-coupling skill). Editing here probably means editing there.

Open threads — anything a prompt asked for that no later step appears to have finished.

Report

Lead with three sentences a person could read aloud: what this file is, the one decision most likely to be accidentally undone, and what else to expect to touch.

Then the sections above. Cite step hashes so any claim can be checked with rgt show. Where history is thin, say so plainly rather than inferring from the code — the value here is knowing why, and guessing defeats it.

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.