agentleFS
YehudaFrankelYehudaFrankel/clankbrain/.claude/skills/guard/SKILL.md

guard

Skill16 starsChanged 7 months agoMITView on GitHub

Scans recently changed files against a growing library of known error patterns, flags violations before they ship. After any bug fix, extracts the root cause as a new permanent rule. Trigger on "guard check", "scan for issues", "check conventions", "did I miss anything", "scan my changes".

52 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

4 rules. 0 are common, 3 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 41 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If not clear, ask: "Which files should I scan?"

    line 18
  2. Distinctive:

    If the file does not exist, create it with at least these starter patterns:

    line 26
  3. Very specific:

    If nothing is wrong: ✓ All [N] pattern checks passed.

    line 48
  4. Distinctive:

    After any bug is fixed, extract the pattern and make it permanent.

    line 54

“Common” is measured: kept by at least 6 in 10 of the 41 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 — Pattern Scanner + Rule Logger

Guard has two jobs:

  1. Scan — check recently changed files against all known error patterns
  2. Learn — after any bug fix, extract the root cause as a new checkable rule so it never happens again

Step 1: Identify files to scan

Pull from conversation context: which files were just edited? If not clear, ask: "Which files should I scan?"


Step 2: Load the pattern library

Read .claude/rules/guard-patterns.md.

If the file does not exist, create it with at least these starter patterns:

  • Auth check missing on protected endpoint
  • User input concatenated directly into SQL query
  • Missing error handling on async operation
  • Hardcoded environment-specific value (localhost, test credential)
  • Console.log / debug print left in production code

Step 3: Scan each file against every pattern

For each pattern in guard-patterns.md, run a targeted grep on the changed file(s).

Report each violation clearly:

⚠️  [PATTERN NAME]
   File: src/routes/admin.js:42
   Code: db.query("SELECT * WHERE id=" + req.params.id)
   Why:  Raw string concatenation = SQL injection. Use parameterized queries.

If nothing is wrong: ✓ All [N] pattern checks passed. Nothing flagged.


Step 4: Learn mode — run after every bug fix

After any bug is fixed, extract the pattern and make it permanent.

  1. Name the pattern — short, screaming-snake-case ID (e.g. MISSING_AUTH_CHECK)
  2. Describe the violation — one sentence, concrete
  3. Write the grep — what to search for, what signals a violation
  4. Explain why — what goes wrong at runtime if this is missed
  5. Append the new entry to guard-patterns.md
  6. Report: New rule added: [PATTERN NAME] — will be checked on every future guard scan.

The point is: every bug that gets fixed once should be impossible to ship twice.


Step 5: Report summary

Guard scan complete — [N] patterns checked, [M] violations found.
[List violations or "All clear."]
[List any new rules added this run.]

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.