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 commands/shenchangmin/cairnkit/flow-importgit clone --depth 1 https://github.com/shenchangmin/cairnkitWhat 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 | $0.00019 | $0.00782 |
| Opus 5 | $0.00010 | $0.00391 |
| Sonnet 5 | $0.00004 | $0.00156 |
| Haiku 4.5 | $0.00002 | $0.00078 |
Grade A, and why
flow-import 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 2d 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 — 58 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/flow-import
Make an existing project's implicit knowledge explicit as baseline draft entries.
Start or resume
Run cairn --root . import show. Resume when it succeeds. Run
cairn --root . import init only when exit 2 specifically reports that no import is in
progress; for any other error, surface it and stop.
The engine's current step is the source of truth:
| step | role mandate | required output |
|---|---|---|
doc-collect |
doc-collector |
docs/knowledge-import/01-sources.md |
codebase-profile |
codebase-profiler |
docs/knowledge-import/02-profile.md |
knowledge-build |
knowledge-builder |
docs/knowledge-import/knowledge-candidates.json and docs/knowledge-import/03-summary.md |
Isolated dispatch for every step
Before each dispatch, resolve the plugin root exactly as the router did. Read the complete role
mandate from resources/agents/<role>.md when resources/agents/ exists; otherwise read
agents/<role>.md. Never use .codex/agents, ~/.codex/agents, a copied global mandate, or a
same-named project or global profile.
Use a named role only when the host explicitly exposes that role as part of this cairnkit plugin.
Installed Codex always uses a fresh generic worker with fork_turns="none". Supply only the full
mandate, the original user request, current import step, exact allowed write scope from the
mandate, and required output paths. Tell the worker not to edit
docs/knowledge-import/import-state.json; the parent advances through cairn.
Confirm the worker inherits the required write access before dispatch. If not, stop; do not elevate permissions, never substitute the parent for the role, and never advance a failed dispatch.
After the worker returns, run the check for the current step:
test -f "docs/knowledge-import/01-sources.md" && test ! -L "docs/knowledge-import/01-sources.md" && test -s "docs/knowledge-import/01-sources.md"
test -f "docs/knowledge-import/02-profile.md" && test ! -L "docs/knowledge-import/02-profile.md" && test -s "docs/knowledge-import/02-profile.md"
test -f "docs/knowledge-import/knowledge-candidates.json" && test ! -L "docs/knowledge-import/knowledge-candidates.json" && test -s "docs/knowledge-import/knowledge-candidates.json"
test -f "docs/knowledge-import/03-summary.md" && test ! -L "docs/knowledge-import/03-summary.md" && test -s "docs/knowledge-import/03-summary.md"
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.
- 2d ago First seen · 58 lines · 19 tokens per session scan A d424336b1121
flow-import is a command published in the GitHub repository shenchangmin/cairnkit (1 stars, last pushed 1mo ago), licensed MIT. It adds 19 tokens to every session and 782 once invoked, about $0.0001 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-31.
Other commands, from other repositories
issue-amend
Re-snapshot the active issue's scope from the spec, clear verified and reviewed receipts, and record the change as a permanent amendment.
init
Scaffold a new MindBase project (v2 layout). Usage: /mb:init [template] [-- mission ...].
q-research
Read the research-mode skill's SKILL.md for the full ruleset before proceeding. Follow all constraints, the source lookup cascade, the token budget, and the "what counts as cited" rules exactly.
graphify
Turn your vault into a clustered knowledge graph with HTML and JSON outputs.
genesis
Initialize cortex vault — set up config, vault structure, and rebuild index.
export-project
Export a single registered Gnosys project to a portable .json.gz bundle (round-trips with gnosys import project).