agentleFS
jthiruveedulajthiruveedula/agentkit/skills/setup-guardian/SKILL.md

setup-guardian

Skill0 starsChanged 2 months agoMITView on GitHub

Static health checks for this repo: dist/ freshness, install targets, skill counts, action SHA pins, CI gate, external lock, subprocess env=. Use when changing skills, install/build/workflows, or for a repo health check.

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    After a fix run, re-run the doctor and confirm fixed=True paths are clean before pushing.

    line 40
  2. Very specific:

    Run one check (--check <name>) when you only touched one area.

    line 96

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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

Setup Guardian

Cheap static checks for mistake classes that already hit this repo (whole-needs CI gate, typo'd action SHA, bare subprocess env= dropping Windows vars, hand-written skill counts). reference/lessons.md is the registry; scripts/doctor.py is the enforcement. Run after any change to skills, install.sh, scripts/, or .github/workflows/.

Procedure

  1. Run the doctor and read the report.

    python3 skills/setup-guardian/scripts/doctor.py

    Human lines per check: [PASS|WARN|FAIL] <name>: <message>, with a -> <remediation> hint under each failure. Exit 1 if anything fails, 0 otherwise. Use --check <name> to run a single check (e.g. --check pinned_shas after touching a workflow).

  2. Use --fix for the safe auto-fixes only. The doctor rebuilds dist/, rewrites the README skill count, and regenerates the site catalog — the three generated artifacts that must never be hand-edited. Everything else (bad SHA pins, broken install targets, a wrong CI gate, lock drift, bare env=) gets a remediation, not a fix, because each needs a human decision.

    python3 skills/setup-guardian/scripts/doctor.py --fix

    After a fix run, re-run the doctor and confirm fixed=True paths are clean before pushing.

  3. --watch for scheduled runs. Prints exactly one JSON object to stdout — {"ok", "failures", "warnings", "checks": [...]} — and exits non-zero on any failure. Nothing else goes to stdout, so it is safe to pipe into logs. Example cron entry (adjust the path to your checkout):

    0 9 * * * /usr/bin/python3 /path/to/agentkit/skills/setup-guardian/scripts/doctor.py --watch >> /var/log/agentkit-doctor.log 2>&1
  4. Stale third-party pins (report only).

    python3 scripts/check-external-updates.py

    Lists pinned external sources with newer upstream commits. Never auto-bump: review upstream changes, then update external/skills.lock.json via scripts/sync-external.sh as a deliberate change.

Check catalog

CheckWhat it guardsAuto-fix
dist_freshnessdist/ matches generated sources (scripts/build.py --check clean)yes — rebuilds via scripts/build.py
install_targetsinstall.sh symlinks exist and point at dist/; no stale manifest entriesno — re-run ./install.sh
skill_countREADME count, site/assets/skills.json, and the AGENTS.md table all agree with skills/yes — rewrites README count, regenerates catalog and dist/
pinned_shasworkflow action pins are full SHAs, none on the known-bad listno — fix the pin, verify via git ls-remote
ci_aggregatorCI success gate compares v.get("result"), not whole needs objectsno — hand-edit ci.yml
external_lockexternal/skills.lock.json schema and per-source fields; checkouts match locked SHAsno — re-run scripts/sync-external.sh
subprocess_envno bare env={...} dicts that drop inherited environment (Windows SystemRoot)no — build from os.environ

Rules

  • Every repeat-mistake class gets a LESSON entry in reference/lessons.md PLUS a doctor check. The registry is the memory; the doctor is the enforcement. A lesson without a check is a hope; a check without a lesson is unexplained.
  • Never hand-write skill counts. The README count line, site/assets/skills.json, and the AGENTS.md table are all generated from skills/ — use make build or doctor.py --fix.
  • Verify new action SHA pins resolve before push. git ls-remote https://github.com/<owner>/<repo> must list the pinned commit; add any caught typo'd SHAs to KNOWN_BAD_SHAS in doctor.py.
  • doctor.py stays stdlib-only and self-contained. No scripts.lib import, no third-party deps — it must run on any machine with Python 3, including fresh CI runners.
  • Run the doctor after adding a skill or touching install.sh, scripts/build.py, or .github/workflows/. Then run make build and make validate before pushing.

Token economy

Run one check (--check <name>) when you only touched one area; --json for machine parsing; --fix once, then make build and verify, don't loop.

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.