matrix-build

matrix-build is a skill for Claude Code, Codex from Rosenfan/Matrix. It costs 24 tokens per session (518 once invoked), scanned C, original, MIT.

A workflow for implementing an already-approved Matrix plan in small slices, with tests written around observable behavior when appropriate. TDD, or test-driven development, means using tests to guide changes to code.

In plain words
What is it for?
Use it during the build phase of a Matrix project to inspect the approved contract, implement vertical slices, invoke relevant debugging or testing capabilities, and document the result.
Why use it?
It limits implementation to the approved scope and records evidence about what was built, helping prevent unplanned design changes or unrelated edits.

Skill for Claude CodeCodex

Install

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.

agentmods
npx agentmods add skills/rosenfan/matrix/matrix-build
Any agent
npx skills add Rosenfan/Matrix --skill matrix-build
Clone the repo
git clone --depth 1 https://github.com/Rosenfan/Matrix

Made for: Claude Code, Codex.

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 matrix-build

README.md
[![agentmods](https://agentmods.dev/badge/skills/rosenfan/matrix/matrix-build.svg)](https://agentmods.dev/skills/rosenfan/matrix/matrix-build)
Your own site
<a href="https://agentmods.dev/skills/rosenfan/matrix/matrix-build"><img src="https://agentmods.dev/badge/skills/rosenfan/matrix/matrix-build.svg" alt="Measured on agentmods" height="20"></a>
Per session 24 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 518 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. Scan, not verified.
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 $0.00024 $0.00518
Opus 5 $0.00012 $0.00259
Sonnet 5 $0.00005 $0.00104
Haiku 4.5 $0.00002 $0.00052

Measured today against content hash 55dad363ad35, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

matrix-build scanned grade C with 1 finding 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 today.

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.

Harvests environment variableshighData exfiltration

Enumerating or grepping the environment for keys collects credentials unrelated to what the mod says it does.

- invoke `wizard` only to generate and statically verify human-run shell steps required by the Contract; never execute the wizard end-to-end or collect secrets.
.claude/skills/matrix-build/SKILL.md · 48 lines

How it starts

The opening of the file, as written. The whole thing — 48 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Matrix Build

Run node <matrix-skill-directory>/scripts/matrix-runtime.mjs inspect and implement only its approved Contract. Full and legacy-full read proposal/design/plan. lightweight reads the approved compact proposal and must not backfill Design artifacts.

Write build evidence and user-facing explanations in artifact_language; preserve any Runtime-required English heading tokens.

Prim

Use Matrix's own implementation and test discipline.

Arch

  • invoke tdd when the change modifies observable behavior at a testable seam;
  • invoke diagnosing-bugs only when an actual failure exists and root cause is not established;
  • invoke writing-for-agents when the approved Contract changes agent-facing instructions;
  • invoke wizard only to generate and statically verify human-run shell steps required by the Contract; never execute the wizard end-to-end or collect secrets.

Resolve an in-progress merge/rebase through Matrix-owned conflict handling. Do not invoke raw resolving-merge-conflicts, because it can stage, continue, and commit outside Matrix lifecycle ownership. Never invoke implement inside an active Change.

Announce each triggered capability and reason. No companion may commit, review, transition, archive, or broaden scope. A correctly installed capability gets at most one Matrix-owned fallback for that same capability; record the Skill, failure, fallback, and evidence. Installation-integrity failure stops the phase.

Scope Discipline

If implementation exposes a scope or design change, stop and run; a lightweight change is upgraded to full by this Return:

node <matrix-skill-directory>/scripts/matrix-runtime.mjs return design --reason design-gap

Then enter $matrix-design; do not amend the plan silently. The Runtime preserves old verification evidence in revision history and requires fresh evidence after the redesigned plan returns to Build.

Process

  1. Implement the approved plan in bounded vertical slices.
  2. Use only triggered Arch capabilities.
  3. Record common facts under ## Build evidence. Hotfix also requires ## Reproduction evidence and ## Root cause; tweak also requires ## Scope evidence.
  4. Run the guard and transition, then enter $matrix-verify.

Read the full file on GitHub · 48 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. today Changed · +3 lines scan A → C 55dad363ad35
  2. 4d ago First seen · 45 lines · 24 tokens per session scan A 5d7536188d9d

Subscribe to this mod's changes

matrix-build is a skill published in the GitHub repository Rosenfan/Matrix (5 stars, last pushed 3d ago), licensed MIT. It adds 24 tokens to every session and 518 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it C with 1 finding (harvests environment variables). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.