mycelium: Instructions file for Codex

AGENTS.md

mycelium AGENTS.md is an instructions file for Codex, OpenCode from krapie/mycelium. It costs 4,934 tokens per session, scanned C, original, MIT.

Repository instructions for Mycelium, a local tool that stores and reuses context from AI coding sessions through a terminal interface and command line. It explains the project’s purpose, layout, and coding conventions for agents working in the repository.

In plain words
What is it for?
Use it when working on Mycelium to find the right documentation, understand its context-management stages, follow its module structure, and account for how different coding agents read instruction files.
Why use it?
AI coding sessions can lose useful decisions and background when models or projects change. These instructions help an agent understand the repository before editing it.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions Claude Code.

This is krapie/mycelium's own configuration. It tells Codex and OpenCode how to work on mycelium 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 mycelium configures →

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is const { thingUnderTest } = await import('../src/whatever.js'); // dynamic, not static.

Reuse

Borrowing it

Nothing to install: this file belongs to krapie/mycelium. 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/krapie/mycelium/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/krapie/mycelium

Made for: Codex, 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 mycelium AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/krapie/mycelium/agents-md/github.svg)](https://agentmods.dev/instructions/krapie/mycelium/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/krapie/mycelium/agents-md"><img src="https://agentmods.dev/badge/instructions/krapie/mycelium/agents-md/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 mycelium AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/krapie/mycelium/agents-md"><img src="https://agentmods.dev/badge/instructions/krapie/mycelium/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 4,934 This file is loaded in full into every session.
When invoked 4,934 The same file — it is already loaded in full.
Security scan C 1 finding. 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.04934 $0.04934
Opus 5.5 $0.01974 $0.01974
Sonnet 5.5 $0.00987 $0.00987
Haiku 4.5 $0.00493 $0.00493

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

Security

Grade C, and why

mycelium AGENTS.md 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 4d 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

4. Never run a destructive `mycelium cleanup reset`/`rm -rf ~/.mycelium` type command against the real store while verifying a change — use `mycelium demo` (isolated `~/.mycelium-demo`) or a temp `MYCELIUM_HOME` instead.
AGENTS.md · 132 lines

How it starts

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

AGENTS.md

Orientation for an AI coding agent (Claude Code, Codex, Cursor, or similar) working in this repository. If you're a human, README.md and docs/ are the better starting point — this file is dense and reference-oriented on purpose.

This follows the AGENTS.md standard — read natively by Codex and other AGENTS.md-aware tools. Claude Code does not read AGENTS.md on its own (confirmed against Anthropic's own docs — it only ever auto-loads CLAUDE.md), so CLAUDE.md in this repo's root just imports this file via @AGENTS.md. That's also exactly the gap src/reuse.js's injectAgentsMd() needs to account for when writing to a target project — see that file's own doc comment.

What this tool is

Mycelium is a local-first Context Lifecycle TUI for AI coding-agent sessions. It manages context produced by AI collaboration through four stages — Capture → Organize → Learn → Reuse — implemented as a terminal UI (neo-blessed) plus a CLI, both reading/writing a plain-file store under ~/.mycelium/.

Why it exists

AI coding sessions (Claude Code, Codex, Kiro, OpenCode, ...) accumulate fast and lose context across three axes:

  • Model boundaries — switching agents mid-task loses everything the previous agent knew (see Handoff below).
  • Time — a session from three weeks ago is unfindable without search/organization.
  • Space — nothing links related sessions across a project's lifetime unless something builds that structure.

Mycelium's answer: capture every session losslessly into a neutral schema, organize it (LLM-assisted, human-confirmed) into folders, learn from finished sessions (auto-summarize, extract project knowledge), and reuse that knowledge — injected into AGENTS.md for the next agent, or composed into a handoff prompt when switching agents mid-task. See docs/features.md for the full capability catalog and docs/architecture.md for design principles (local-only, model-agnostic, human-first, minimal dependencies).

Read the full file on GitHub · 132 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. 4d ago Changed · +3 lines · +110 tokens per session c1635f1b68ed
  2. 8d ago Changed · +1 lines · +59 tokens per session 883e689a1a60
  3. 13d ago Changed · +1 lines · +73 tokens per session 36e3cde8e378
  4. 16d ago Changed · +2 lines · +61 tokens per session 080999a083ef
  5. 1mo ago Changed · +2 lines · +63 tokens per session c191265c99a5
  6. 1mo ago First seen · 123 lines · 4,568 tokens per session scan C 7d99ea50158f

Subscribe to this mod's changes

mycelium AGENTS.md is an instructions file published in the GitHub repository krapie/mycelium (42 stars, last pushed 2d ago), licensed MIT. It adds 4,934 tokens to every session, about $0.0197 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other instructions, from other repositories