agentleFS
erikperttuerikperttu/steering-coding-agents/.claude/skills/guard/SKILL.md

guard

Skill1 starsChanged 5 months agoMITView on GitHub

The in-session self-check the agent runs against its own work, so the standing rules are enforced and not just read. Locate before reading, confirm writes landed, keep derived state fresh, gate "done" on tests, and stay inside the context budget. Invoke continuously during work, not at session close.

53 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use unfreeze, plan-tune 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.
  • ayudaySkill

    unfreeze

    Clear the freeze boundary set by /freeze, allowing edits to all directories again. Use when you want to widen edit scope without ending the session. Use when asked to "unfreeze", "unlock edits", "remove freeze", or "allow all edits".

    Also in 24 projects that use this

  • ShreyRaviSkill

    plan-tune

    Self-tuning question sensitivity + developer psychographic for gstack (v1: observational). Review which AskUserQuestion prompts fire across gstack skills, set per-question preferences (never-ask / always-ask / ask-only-for-one-way), inspect the dual-track profile (what you declared vs what your behavior suggests), and enable/disable question tuning. Conversational interface — no CLI syntax required.

    Also in 9 projects that use this

  • Saqlain-811Skill

    ios-clean

    Remove the DebugBridge SPM package and all #if DEBUG wiring from an iOS app. (gstack)

    Also in 5 projects that use this

  • Saqlain-811Skill

    ios-fix

    Autonomous iOS bug fixer. (gstack)

    Also in 5 projects that use this

  • seek888Skill

    open-gstack-browser

    Launch GStack Browser — AI-controlled Chromium with the sidebar extension baked in. Opens a visible browser window where you can watch every action in real time. The sidebar shows a live activity feed and chat. Anti-bot stealth built in. Use when asked to "open gstack browser", "launch browser", "connect chrome", "open chrome", "real browser", "launch chrome", "side panel", or "control my browser". Voice triggers (speech-to-text aliases): "show me the browser".

    Also in 9 projects that use this

  • ayudaySkill

    setup-deploy

    Configure deployment settings for /land-and-deploy. Detects your deploy platform (Fly.io, Render, Vercel, Netlify, Heroku, GitHub Actions, custom), production URL, health check endpoints, and deploy status commands. Writes the configuration to CLAUDE.md so all future deploys are automatic. Use when: "setup deploy", "configure deployment", "set up land-and-deploy", "how do I deploy with gstack", "add deploy config".

    Also in 17 projects that use this

  • +1 more from Saqlain-811

The file

We split this skill into the rules it gives an agent

6 rules. 0 are common, 6 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 42 edited versions we read keep these.

  • 6

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

    Never read a whole file to find one function.

    line 27
  2. Distinctive:

    After an edit, verify the change is where you think it is before building on it, by re-reading the just-changed symbol or checking the tool …

    line 33
  3. Distinctive:

    If the project has anything generated from the code, such as a structure map, an index, or a symbol database, and you made a structural …

    line 38
  4. Distinctive:

    Run the targeted tests for what you touched during red/green cycling.

    line 45
  5. Distinctive:

    Every read this session went through locate-first, not a blind whole-file read.

    line 55
  6. Distinctive:

    No avoidable raw dumps or re-reads bloated the context.

    line 58

“Common” is measured: kept by at least 6 in 10 of the 42 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.

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

Guard

The enforcement layer for the standing rules. The agent contract (AGENTS.md / CLAUDE.md) states what's required; this skill is how those requirements get checked during the work instead of forgotten three hours into a session. It is the standing-rules counterpart to the handoff-update skill: handoff keeps the documents clean at session close, guard keeps the work honest while it happens.

Not Claude-specific. Packaged as a skill, but every rule below is a plain discipline. In another setup it's a checklist, a pre-commit hook, or a habit. Adapt the invocation; keep the rules. The specifics (which index, which test command) are yours to fill in from the project's contract.

Why a skill and not a paragraph in the contract

A rule the agent only reads is one it forgets the moment it's moving fast. Wiring the checks into a skill the agent runs against its own work is what turns a rule from words on a page into something enforced, and it makes the disciplined path the path of least resistance, the same move as making the handoff a command instead of a ritual. What can be mechanically checked should be mechanically checked.

Rules

1. Locate before you read

Never read a whole file to find one function. Use the project's index, structure map, or search to get the exact symbol and its line range, then read only that range. Reading blind is the failure this prevents: it pulls hundreds of unneeded lines into context and bypasses the facts the index already has. This is the "narrow straw", the habit that does the most to keep context clean.

2. Confirm the write landed

After an edit, verify the change is where you think it is before building on it, by re-reading the just-changed symbol or checking the tool reported success rather than a silent partial write. Don't stack a second edit on an assumption about the first.

3. Keep derived state fresh

If the project has anything generated from the code, such as a structure map, an index, or a symbol database, and you made a structural change (moved, renamed, added, deleted), regenerate it before you rely on it again. A stale derived artifact is worse than none: the agent trusts it. (For Marker: re-run gen_structure.py after moving or adding a module.)

4. Gate "done" on tests

A task is not done because the code looks right. It is done when the tests covering the changed modules pass. Run the targeted tests for what you touched during red/green cycling; for a high-blast-radius change (a widely imported module), run the full suite as a safety check. Never declare done on an unrun gate.

5. Stay inside the context budget

Long command output and re-reads are the top context drains. Tail noisy commands rather than dumping them. Delegate broad searches and multi-file audits to a sub-agent so its output burns on its side and you get back a summary. Never re-read a file you just edited; the edit already confirmed it landed.

Done when

  • Every read this session went through locate-first, not a blind whole-file read.
  • Structural edits were followed by a regenerate of any derived artifact before it was next used.
  • The tests covering the changed modules pass.
  • No avoidable raw dumps or re-reads bloated the context.

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.