Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add Rune-kit/rune --skill logic-guardiangit clone --depth 1 https://github.com/Rune-kit/runeWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/rune-kit/rune/logic-guardian)<a href="https://agentmods.dev/skills/rune-kit/rune/logic-guardian"><img src="https://agentmods.dev/badge/skills/rune-kit/rune/logic-guardian/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/rune-kit/rune/logic-guardian"><img src="https://agentmods.dev/badge/skills/rune-kit/rune/logic-guardian.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00060 | $0.03091 |
| Opus 5.5 | $0.00024 | $0.01236 |
| Sonnet 5.5 | $0.00012 | $0.00618 |
| Haiku 4.5 | $0.00006 | $0.00309 |
Grade A, and why
logic-guardian scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 270 lines — stays where its author put it; the contents beside it link to each section on GitHub.
logic-guardian
Purpose
Complex projects (trading bots, payment systems, game engines, state machines) contain interconnected logic that AI agents routinely destroy by accident. The pattern is always the same: new session starts, agent doesn't know existing logic, rewrites or deletes working code, project regresses. logic-guardian breaks this cycle by maintaining a machine-readable logic manifest, enforcing a pre-edit gate on logic files, and validating that edits don't silently remove existing logic. It is the "institutional memory" for business logic.
Triggers
/rune logic-guardian— manual invocation (scan project, generate/update manifest)- Auto-trigger: when
cookorfixtargets a file listed in.rune/logic-manifest.json - Auto-trigger: when
surgeonplans refactoring on logic-heavy modules - Auto-trigger: when
.rune/logic-manifest.jsonexists in project root
Calls (outbound connections)
scout(L2): scan project to discover logic files and extract function signaturesverification(L3): run tests after logic edits to confirm no regressionhallucination-guard(L3): verify that referenced functions/imports actually exist after editjournal(L3): record logic changes as ADRs for cross-session persistencesession-bridge(L3): save manifest state so next session loads it immediately
Called By (inbound connections)
cook(L1): Phase 1.5 — when complex logic project detected, load manifest before planningfix(L2): pre-edit gate — before modifying any file in the manifestsurgeon(L2): pre-refactor — before restructuring logic modulesteam(L1): validate logic integrity across parallel workstreamsreview(L2): check if reviewed diff removes or modifies manifested logic
Workflow
Phase 0 — Load Manifest + Invariants
- Use
Readon.rune/logic-manifest.json - If file exists:
- Parse manifest, display summary: "Loaded logic manifest: N components, M functions, K parameters"
- Proceed to step 4 (load invariants)
- If manifest does NOT exist:
- Announce: "No logic manifest found. Scanning project to generate one."
- Proceed to Phase 3 (Generate)
- Obtain invariants (seeded by
onboard— see onboard Step 5.4):- Preferred: consume the
invariants.loadedsignal emitted bysession-bridgeat session start (contains pre-parsedrules[]+ stats). No second file read needed. - Fallback: if no signal was emitted this session,
Read.rune/INVARIANTS.mddirectly and invokeskills/session-bridge/scripts/load-invariants.jsto parse. - Entries come from
## Danger Zones,## Critical Invariants,## State Machine Rules,## Cross-File Consistency, and## Auto-detected (new). Archived rules are automatically excluded by the loader. - Each entry follows the
WHAT / WHERE / WHYcontract frominvariants-template.md. - Treat
INVARIANTS.mdas the primary source of cross-file rules — the JSON manifest covers component-level signatures; INVARIANTS.md covers rules that span files (shared constants, state transitions, mirrored schemas). - If the file is absent, log WARN: "INVARIANTS.md not found — run
rune onboardto seed baseline rules." Do not block. - Cache parsed rules keyed by glob so Phase 2 can match the edit target in O(rules × globs) time.
- Preferred: consume the
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 8d ago First seen · 270 lines · 60 tokens per session scan A f93021da68bd
logic-guardian is a skill published in the GitHub repository Rune-kit/rune (96 stars, last pushed yesterday), licensed MIT. It adds 60 tokens to every session and 3,091 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-22.
logic-guardian compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| logic-guardianRune-kit/rune | Skill | 96 | yesterday | MIT | A | 60 | Claude Code |
| criticism-self-criticismHughYau/qiushi-skill | Skill | 4.0k | 2d ago | MIT | A | 197 | Claude Code |
| fix-pr-review-looprichkuo/rk-skills | Skill | 50 | today | MIT | A | 90 | Claude Code |
| validate-issuerichkuo/rk-skills | Skill | 50 | today | MIT | A | 55 | Claude Code |
| fable-validate-looprichkuo/rk-skills | Skill | 50 | today | MIT | A | 102 | Claude Code |
| refactorsmallnest/goal-workflow | Skill | 303 | 2mo ago | MIT | A | 71 | Claude Code |
| walkthroughsmallnest/goal-workflow | Skill | 303 | 2mo ago | MIT | A | 131 | Claude Code |