TheMAGI: Agent for Claude Code

.claude/agents/sentinel.md

sentinel is an agent for Claude Code from Bloodshed-Rain/TheMAGI. It costs 256 tokens per session (1,290 once invoked), scanned A, original, MIT.

A code-checking agent that compiles the project, builds its user interface, and runs its automated tests after changes.

In plain words
What is it for?
Use it to verify non-trivial code changes or investigate whether a project is healthy.
Why use it?
It catches broken builds, type errors, failed tests, and regressions before they reach users.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

This is Bloodshed-Rain/TheMAGI's own configuration. It tells Claude Code how to work on TheMAGI itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything TheMAGI configures →

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /home/lol/MAGI/.claude/agent-memory/sentinel/.

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/Bloodshed-Rain/TheMAGI/main/.claude/agents/sentinel.md
Clone the repo
git clone --depth 1 https://github.com/Bloodshed-Rain/TheMAGI

Made for: Claude Code.

Wrote 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.

agentmods badge for sentinel

README.md
[![agentmods](https://agentmods.dev/badge/agents/bloodshed-rain/themagi/sentinel.svg)](https://agentmods.dev/agents/bloodshed-rain/themagi/sentinel)
Your own site
<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>
Per session 256 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,290 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured yesterday against content hash 23d8726359ad, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

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.

.claude/agents/sentinel.md · 121 lines

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: noUncheckedIndexedAccess violations, exactOptionalPropertyTypes errors, implicit any
  • 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 .slp files from test-replays/
  • Watch for: conversion semantics bugs (playerIndex = VICTIM), stat computation errors

4. Code Smell Scan

When doing a thorough review, also check for:

  • as any casts (should be near-zero in this strict codebase)
  • TODO, FIXME, HACK comments (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

  1. slippi-js Conversion Semantics: conversion.playerIndex = VICTIM. If any code filters conversions by playerIndex === myIndex to get "my conversions," that's a bug.

  2. Inverted Stats: openingsPerKill.count = openings (not kills). damagePerOpening.count = total damage (not per-opening). Verify every usage.

Read the full file on GitHub · 121 lines

Changes

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.

  1. yesterday First seen · 121 lines · 256 tokens per session scan A 23d8726359ad

Subscribe to this mod's changes

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.