inject

A command for adding text to a SuperBrain vault, a collection of linked notes organized by projects, decisions, and other categories.

In plain words
What is it for?
Use it to manually add text the system cannot observe, update the daily note, link related notes, or append content to an existing project note.
Why use it?
It preserves short input directly and sorts longer or multi-topic input into relevant notes, with a direct capture fallback if language-model processing fails.

Command

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 commands/m3talux/superbrain/inject
Clone the repo
git clone --depth 1 https://github.com/m3talux/superbrain
Per session 123 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 824 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00123 $0.00824
Opus 5 $0.00062 $0.00412
Sonnet 5 $0.00025 $0.00165
Haiku 4.5 $0.00012 $0.00082

Measured 3d ago against content hash 078b4677d306, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

inject 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 3d 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.

commands/inject.md · 55 lines

How it starts

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

/superbrain:inject

Manual ingestion path. Auto-capture remains the default — this is for content SuperBrain can't observe.

What it does

  1. Validates input (non-empty, alphanumeric, ≤32 KB).
  2. Auto-detects mode: verbatim for ≤200 chars with no blank-line separator; distill otherwise. Flags --verbatim / --distill override.
  3. Verbatim: writes a single capture/<date>-<slug>.md (or projects/<slug>.md append if --project is passed). No LLM call.
  4. Distill: pulls top-5 related vault notes via recall, lists existing project slugs, calls Sonnet 4.6 with the inject-specific prompt, parses the envelope, routes each item via the same route() the session distiller uses.
  5. Updates today's daily note. Logs to ~/.superbrain/inject.log.
  6. On LLM failure or empty envelope, falls back to verbatim capture — input is never lost.

Safety rails

  • Inject NEVER creates a new project note. Unknown project slugs are downgraded to capture/. (Project notes are created only by /superbrain:discover.)
  • Inject NEVER reshapes preferences. Preference items emitted by the model are dropped.
  • --project <slug> always wins over anything the model emits.
  • Concurrent with an active session checkpoint? Inject takes the same lock and waits up to 5 s.

How to invoke

Step 1 — gather the user's text. The slash command argument string is in $ARGUMENTS. If $ARGUMENTS is empty, ask the user what they'd like to inject before running the command.

Step 2 — invoke the CLI. Pass the argument string straight through; the CLI parses flags itself.

node "${CLAUDE_PLUGIN_ROOT}/dist/bin/sb-inject.js" $ARGUMENTS

If the user wants to inject the contents of a file (e.g. a meeting summary they pasted into ~/Downloads/meeting.md), use --from-file:

node "${CLAUDE_PLUGIN_ROOT}/dist/bin/sb-inject.js" --from-file "<path>"

Step 3 — when the call returns, surface the output verbatim (it lists the rel paths of every note written) so the user knows where each piece landed.

Read the full file on GitHub · 55 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. 3d ago First seen · 55 lines · 0 tokens per session scan A 078b4677d306

Subscribe to this mod's changes

inject is a command published in the GitHub repository m3talux/superbrain (41 stars, last pushed 22d ago), licensed MIT. It adds 123 tokens to every session and 824 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.