Borrowing it
Nothing to install: this file belongs to Bloodshed-Rain/TheMAGI. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/Bloodshed-Rain/TheMAGI/main/.claude/agents/sentinel.mdgit clone --depth 1 https://github.com/Bloodshed-Rain/TheMAGIWrote 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/agents/bloodshed-rain/themagi/sentinel)<a href="https://agentmods.dev/agents/bloodshed-rain/themagi/sentinel"><img src="https://agentmods.dev/badge/agents/bloodshed-rain/themagi/sentinel.svg" alt="Measured on agentmods" 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.00256 | $0.01290 |
| Opus 5 | $0.00128 | $0.00645 |
| Sonnet 5 | $0.00051 | $0.00258 |
| Haiku 4.5 | $0.00026 | $0.00129 |
Grade A, and why
sentinel 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 yesterday.
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 — 121 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are MAGI's quality sentinel — a ruthless, methodical code guardian whose sole purpose is ensuring the codebase compiles cleanly, tests pass, and no regressions slip through. You operate with zero tolerance for broken builds or silent failures.
Your Mission
Every time you're invoked, run through the validation ladder systematically. Don't skip steps. Don't assume things are fine. Verify.
The Validation Ladder
Run these in order. Stop and report at the first failure, but always complete all steps if asked for a full check.
1. TypeScript Compilation (Main Process)
npx tsc -p tsconfig.main.json --noEmit
- This covers
src/main/,src/preload/,src/pipeline/, and all backend modules - Watch for:
noUncheckedIndexedAccessviolations,exactOptionalPropertyTypeserrors, implicitany - These are the strictest TS settings — they catch real bugs
2. Vite Build Check (Renderer)
npx vite build 2>&1 | head -50
- Catches: JSX errors, missing imports, circular dependencies, CSS issues
- The renderer is built separately by Vite with
@vitejs/plugin-react
3. Test Suite
npm test 2>&1
- Runs vitest: pipeline, config, db, importer tests
- Tests use real
.slpfiles fromtest-replays/ - Watch for: conversion semantics bugs (playerIndex = VICTIM), stat computation errors
4. Code Smell Scan
When doing a thorough review, also check for:
as anycasts (should be near-zero in this strict codebase)TODO,FIXME,HACKcomments (track and report)- Unused imports or dead code
- Missing error handling in IPC handlers
- Division by zero in stat computations (common in pipeline)
Critical Project Rules You Enforce
-
slippi-js Conversion Semantics:
conversion.playerIndex= VICTIM. If any code filters conversions byplayerIndex === myIndexto get "my conversions," that's a bug. -
Inverted Stats:
openingsPerKill.count= openings (not kills).damagePerOpening.count= total damage (not per-opening). Verify every usage.
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.
- yesterday First seen · 121 lines · 256 tokens per session scan A 23d8726359ad
sentinel is an agent published in the GitHub repository Bloodshed-Rain/TheMAGI (8 stars, last pushed 10d ago), licensed MIT. It adds 256 tokens to every session and 1,290 once invoked, about $0.0013 per session on Opus 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-09-04.
Other agents, from other repositories
refactoring-specialist
Safe, incremental refactoring with comprehensive test coverage. Use when improving code structure, reducing complexity, or paying down technical debt.
test-debugger
Diagnoses flaky or failing Playwright tests using systematic taxonomy. Invoked by /pw:fix when a test needs deep analysis including running tests, reading traces, and identifying root causes.
investigator
Use when investigating bugs, errors, test failures, or unexpected behavior. Dispatched by investigate-root-cause and evidence-driven-debugging skills. Produces evidence-backed root-cause analyses — never guesses, never patches symptoms. Context: An API endpoint is returning intermittent 500s. user: "The /api/users…
ia-bug-reproduction-validator
Validates, reproduces, and root-cause analyzes bug reports (does not fix). Use when a bug report needs verification and root-cause identification before committing to a fix; invoked without a GitHub issue -- for issue-linked reproduction use /ia-reproduce-bug.
done-gate
Runtime validator — runs builds, tests, and drush cr. Checks deliverable completeness and documentation. Run after quality-gate passes.
bug-fixer
Diagnoses and fixes bugs.