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 agentmods add skills/kastalien-research/thoughtbox/thoughtbox-refactornpx skills add Kastalien-Research/thoughtbox --skill thoughtbox-refactorgit clone --depth 1 https://github.com/Kastalien-Research/thoughtboxWrote 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/kastalien-research/thoughtbox/thoughtbox-refactor)<a href="https://agentmods.dev/skills/kastalien-research/thoughtbox/thoughtbox-refactor"><img src="https://agentmods.dev/badge/skills/kastalien-research/thoughtbox/thoughtbox-refactor.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.00111 | $0.01016 |
| Opus 5 | $0.00056 | $0.00508 |
| Sonnet 5 | $0.00022 | $0.00203 |
| Haiku 4.5 | $0.00011 | $0.00102 |
Grade A, and why
thoughtbox:refactor 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 6d 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 — 127 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Theseus Refactoring Protocol
Refactoring has a failure mode: scope creep. You start renaming one function and end up restructuring three modules. Theseus prevents this by locking your file scope upfront, requiring explicit justification to expand it, and tracking how often your changes break tests.
Core Mechanics
- Scope: declared file list at init — you can only touch these files
- Visa: explicit request to touch an out-of-scope file (requires justification)
- Checkpoint: submit each logical change for audit before proceeding
- B-counter: tracks test failures — high B means your refactor is causing breakage
- Terminal state: completed, abandoned, or rolled back
Workflow
Phase 1: Declare Scope
Identify every file you expect to touch. Be specific — this is your contract.
// thoughtbox_execute
async () => {
return await tb.theseus({
operation: "init",
scope: ["src/auth/handler.ts", "src/auth/types.ts", "src/auth/middleware.ts"],
description: "Extract token validation into standalone module"
});
}
The session starts with B=0 (no test failures yet).
Phase 2: Work Within Scope
Make changes to declared files. After each logical unit of work:
- Checkpoint the change:
async () => {
return await tb.theseus({
operation: "checkpoint",
diffHash: "abc123", // git diff hash or commit SHA
commitMessage: "refactor(auth): extract TokenValidator class",
approved: true,
feedback: "Clean extraction, no behavior change"
});
}
- Run tests and record outcome:
async () => {
return await tb.theseus({
operation: "outcome",
testsPassed: true,
details: "All 47 auth tests pass"
});
}
If tests fail, B increments. If B reaches 3, stop and reassess — your refactor is causing too much breakage.
Phase 3: Expand Scope (If Needed)
If you discover you need to touch a file outside your declared scope, request a visa:
async () => {
return await tb.theseus({
operation: "visa",
filePath: "src/routes/login.ts",
justification: "Login route imports TokenValidator directly — need to update import path",
antiPatternAcknowledged: true
});
}
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.
- 6d ago First seen · 127 lines · 111 tokens per session scan A 422615e8a222
thoughtbox:refactor is a skill published in the GitHub repository Kastalien-Research/thoughtbox (64 stars, last pushed 1mo ago), licensed MIT. It adds 111 tokens to every session and 1,016 once invoked, about $0.0006 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-08-30.
Other skills, from other repositories
data-charts-tako
Search and visualize the world's data - get charts, insights, and embeddable knowledge cards for finance, economics, demographics, sports, and more.
unity-addressables
Manage Addressables groups, entries, profiles and content builds (com.unity.addressables, reflection-based).
impeccable
Use when the user wants to design, redesign, shape, critique, audit, polish, clarify, distill, harden, optimize, adapt, animate, colorize, extract, or otherwise improve a frontend interface. Covers websites, landing pages, dashboards, product UI, app shells, components, forms, settings, onboarding, and empty states.…
unity-yaml-editing
Last-resort guidance for safely hand-editing Unity YAML.
Threat Hunting & IOC Analysis
IOC extraction, threat intelligence correlation, MITRE ATT&CK mapping, hunt hypothesis generation, and detection rule creation.
render-3d-product-showcase
Assemble a premium 3D product-showcase ad from a config — four beat clips (an orbiting hero rotation, a macro push-in, a physics reveal, a typographic close) normalized to the brand-color canvas, hard-concatenated in order, closed on a deterministic Playwright brand end card, and mixed under one instrumental bed at…