guard-it · git:20261031.1b84058 · 2026-10-31 · sha256 d65073344c77d956
guard-it git:20261031.1b84058A
Immutable. This exact content never changes and is served at /api/v1/blob/d65073344c77d956.
No tool to install first
claude plugin marketplace add https://markdownregistry.com/mp/a/art_jnvk7ji4betu6ypo/d65073344c77d956d3873effe1f971d6d03c9c200fbb4d48149d44ab06d77348.json
Then /plugin install guard-it@markdownregistry-jnvk7ji4betu6ypo in Claude Code. It installs this exact version, the one graded A here, pinned to the commit it was graded at, and leaves it there.
---
name: guard-it
description: Check a change against the repo's compliance rules, security policy, secret and dependency policy, and report findings by severity. Use when running a compliance or security pre-flight, before a PR is marked ready or when the user asks to add or tune a compliance rule.
---
# guard-it
Two layers, one rule set:
| Layer | Where | Enforced by |
|-------|-------|-------------|
| Mechanical (a regex decides) | `.compliance-rules/checks.json` plus built-in secret rules | do-it hooks, on every edit and every `git commit` |
| Judgement | `.compliance-rules/*.md`, `SECURITY_POLICY.md`, `docs/agents/compliance/` | this skill, run by `prove-it` or on request |
`DO_IT_COMPLIANCE_DIR` moves the rules directory (see the track-it skill's
CONFIG.md).
## Check a change
1. **Scope.** The change under review: from `prove-it`, its diff and untracked
files; on request, `git diff HEAD` plus untracked files, or the range the
user names.
2. **Mechanical.** Run the hook scanner over the same change so nothing the
hooks would catch is missed:
```bash
node <this skill's dir>/scripts/scan.mjs [--since <ref>]
```
3. **Rules.** Read every `*.md`, `*.yaml` and `*.yml` in the rules directory,
plus `SECURITY_POLICY.md` (root or `docs/`) when present. Apply each rule to
the change. A rule's stated severity sets the group: HIGH or none stated is
**Must**, MEDIUM is **Should**, LOW is **Nice**. A breach of the security
policy is **Must**.
4. **Dependencies.** For changed manifests: no `*` or unbounded `>=` ranges,
no unofficial registries, cross-check `.dependency-audit.json` when it
exists.
Report one line per finding, grouped Must, Should, Nice, then a one-line
count:
```text
MUST src/api/client.ts:42 hardcoded-secret: read it from the environment
```
Concrete `file:line`, never the secret value itself, the smallest fix. A
calling skill (prove-it, sweep-it) takes these findings into its own report.
A step that did not run (the scanner errors or prints nothing it should, a rules
file cannot be read) is **unverified**, never an empty list: report
`Unverified: <why>` for it, so the caller does not read "no findings" as clean.
## Add a mechanical rule
On request, or when `retro-it` decides a recurring mistake belongs here,
write a `checks.json` entry in this format:
```json
[
{
"id": "no-console-log",
"severity": "MEDIUM",
"pattern": "console\\.log\\(",
"files": [".ts", ".tsx"],
"message": "Use the project logger."
},
{ "id": "jwt", "disabled": true }
]
```
- `severity`: HIGH blocks the edit; MEDIUM and LOW are reported to the agent.
- `filePattern` instead of `pattern` matches the edited path.
- `{"id": "<built-in id>", "disabled": true}` turns off a built-in rule.
- A line containing `do-it: allow` is skipped; say why whenever you use it.
Show the entry and a line it would catch; add it only when the user agrees.
Then prove it: run `node scripts/scan.mjs` (in this skill's directory) on the
case it targets to show it fires, and on the current tree to show it does not
flood existing code with hits.