mscodebase-intelligence: Command for OpenCode

.opencode/command/redteam.md

redteam is a command for OpenCode from ManSio/mscodebase-intelligence. It costs 12 tokens per session (437 once invoked), scanned A, original, MIT.

A red-team command for trying to break a design before it ships. It examines failure cases such as races, boundary inputs, dependency failures, time-of-check versus time-of-use problems, and metrics that can be gamed.

In plain words
What is it for?
Use it to challenge new code or a proposed design before implementation or release, and to record attacks that the current safeguards do not handle.
Why use it?
Passing tests and author confidence can still leave serious defects. Deliberately attacking the design exposes missing defences and guards that cannot demonstrate when they would fail.

Command for OpenCode

Written for OpenCode: installed under .opencode/.

This is ManSio/mscodebase-intelligence's own configuration. It tells OpenCode how to work on mscodebase-intelligence 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 mscodebase-intelligence configures →

Reuse

Borrowing it

Nothing to install: this file belongs to ManSio/mscodebase-intelligence. 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/ManSio/mscodebase-intelligence/main/.opencode/command/redteam.md
Clone the repo
git clone --depth 1 https://github.com/ManSio/mscodebase-intelligence

Made for: OpenCode.

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 redteam

README.md
[![agentmods](https://agentmods.dev/badge/commands/mansio/mscodebase-intelligence/redteam/github.svg)](https://agentmods.dev/commands/mansio/mscodebase-intelligence/redteam)
Your own site
<a href="https://agentmods.dev/commands/mansio/mscodebase-intelligence/redteam"><img src="https://agentmods.dev/badge/commands/mansio/mscodebase-intelligence/redteam/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.

agentmods 80×15 button for redteam

Your own site · 80×15
<a href="https://agentmods.dev/commands/mansio/mscodebase-intelligence/redteam"><img src="https://agentmods.dev/badge/commands/mansio/mscodebase-intelligence/redteam.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 12 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 437 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.00012 $0.00437
Opus 5.5 $0.00005 $0.00175
Sonnet 5.5 $0.00002 $0.00087
Haiku 4.5 $0.00001 $0.00044

Measured 26d ago against content hash 67c01f94e07d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

redteam 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 26d 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.

.opencode/command/redteam.md · 46 lines

What it actually says

You are running the RED TEAM phase. You are not the author here. Assume the work is wrong until the attack fails to land.

Rules of engagement

  • Attack the design, not the author's confidence. "This is well-tested" is not a defence.
  • Cover at least 3 of 5 categories: concurrency/races · boundaries · dependency failure · TOCTOU · abuse of the metric.
  • At least 2 attacks without a defence means the plan is not ready. Do not start coding. Say so and stop.
  • A control that cannot fail is worthless. For each guard, name the input that would make it fail. If you cannot, that is a finding.
  • Your own first draft is a target too. Most real defects found this way are in the code written minutes ago.

What usually actually breaks

  • the tool reports a plausible number over an empty or partial population
  • the reason a gate fired is never asserted — only the verdict is
  • two "independent" checks share an author, a rule, or a population
  • the metric can be raised without changing the thing it measures
  • a missing dependency looks identical to a small result
  • state that outlives the test it belongs to (a cached .pyc, a snapshot taken from an already-dirty file, a finally that restores the corrupted version)

Output

## RED TEAM — <subject>

| # | category | attack | defence | status |
|---|---|---|---|---|
| RT1 | TOCTOU | | | 🔴 / 🟡 / ✅ |

**Attacks without a defence:** N — code is blocked until this is 0.
**Attacks that found a real defect in our own code:** N (list them first)

If an attack found a defect in your own recent work, that is the headline. Do not bury it under the ones that failed.

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. 26d ago First seen · 46 lines · 12 tokens per session scan A 67c01f94e07d

Subscribe to this mod's changes

redteam is a command published in the GitHub repository ManSio/mscodebase-intelligence (3 stars, last pushed 5d ago), licensed MIT. It adds 12 tokens to every session and 437 once invoked, about $0.0000 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-10-04.