Borrowing it
Nothing to install: this file belongs to Roukh/shapa-llm. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/Roukh/shapa-llm/main/AGENTS.mdgit clone --depth 1 https://github.com/Roukh/shapa-llmWrote 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/instructions/roukh/shapa-llm/agents-md)<a href="https://agentmods.dev/instructions/roukh/shapa-llm/agents-md"><img src="https://agentmods.dev/badge/instructions/roukh/shapa-llm/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.
<a href="https://agentmods.dev/instructions/roukh/shapa-llm/agents-md"><img src="https://agentmods.dev/badge/instructions/roukh/shapa-llm/agents-md.svg" alt="Reviewed on agentmods" width="80" 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.11337 | $0.11337 |
| Opus 5.5 | $0.04535 | $0.04535 |
| Sonnet 5.5 | $0.02267 | $0.02267 |
| Haiku 4.5 | $0.01134 | $0.01134 |
Grade D, and why
shapa-llm AGENTS.md scanned grade D with 3 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 7d 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.
Downloads and executes remote codehighSupply chain
curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.
- `install.sh` wires hooks, MCP and the skill from a clone. `bootstrap.sh` is the `curl | sh` installer. Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
- Touched by the installers: Claude Code `settings.json`, `~/.codex/config.toml`, `opencode.json` (merged with `jq`), and Obsidian when present; `shapa harness` additionally edits user-level files only, each backed up on Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
- Hosted store (opt-in): `remote.py` (`shapa remote`), `remotesync.py` (wiki keys, scope, the hook mode), `remotehttp.py` (stdlib `urllib` client, injectable transport), `sync.py` (snapshot, classify, exchange), `syncapp How it starts
The opening of the file, as written. The whole thing — 83 lines — stays where its author put it; the contents beside it link to each section on GitHub.
shapa-llm
Source of the shapa tool: an operational-memory engine for LLM agents (one SQLite database per wiki holding the work ledger and memory/rule/issue rows, ranked recall, self-healing maintenance). This file is for agents working on the tool itself. The note schema a wiki follows is shapa/assets/AGENTS.md, which shapa init installs into every wiki; this repo's own wiki is .shapa/.
Navigation
shapa/is the engine package;cli.pyis theshapacommand (python3 -m shapafrom a clone).- Wiki resolution and discovery:
config.py,registry.py(~/.shapa/wikis.json). - Read path:
bootstrap.py(SessionStart, the order is in Contracts;--fullfor the old overview),fetch.py,rank.py,bm25.py,embed.py,get.py. - Code map and partitions:
codemap.py(shapa map: a bounded, incremental graph of the checkout in the derived.shapa-code.db; Python byast, JS/TS by regex),partition.py(shapa partition, the MCP toolpartition, the session-start line). Local only; the Worker holds none of it. - Focus and skills (documents told apart by tags, no new kind):
focus.py(shapa focus: northstar, three fires, promotion),skills.py(shapa skill: versions, activation, lessons from rows,uproot,match),skillmirror.py(shapa skill mirror: skill FILES into those versions; run byupgradeand the session catch-up ofcommit --hook); the lean gate (one document per project) isdb.add_doc. The Worker'sskills.tsandskillmatch.tsserve them and the MCPskill_match. - Learning loop (documents of rows, no new kind):
learn.py(shapa learn: repeat detection when a correction is filed,pending,applywith its merge, supersede, conflict, churn and meta-cap guards,split,principles, the session-start helpers),node.py(shapa node: each repo wiki's node in the global wiki, and the promotion candidates) andmetrics.py(shapa metrics: per-device raw events in the gitignored index, daily snapshots inmetrics_daily, the roll-up, latency against record count,frustration).ledger.record_correctioncalls both.learnimport.pyisshapa learn import(the operator's curated file of principles, mistakes and memories for one wiki, one transaction, privileged CLI only, no MCP tool). - Hierarchy (data in TOML, nothing named in code):
hierarchy.py(shapa hierarchy,shapa repo, the MCP toolshierarchyandrepo: level names, repo types and the tree in<global wiki>/shapa.toml, each repo's type,read_stageandglobal_accessin<repo wiki>/shapa.toml, the session-start line, a small TOML writer besidetomllib). The Worker reads it from the repo's node (hosted/src/nodes.ts). - Central brain (the global wiki as the operator's one brain):
stages.py(shapa stage: the baseline),tasks.py(shapa tasks, standalonehuman_task/agent_task),projectfile.py(shapa project, templateassets/project-template.md),relate.py(shapa tags,shapa related,fetch --tag). - Database (format 4, schema 2):
db.py(schema, work ledger, rows, documents, tombstones, sweep, worktree resolution),docs.py(shapa doc),ledger.py(shapa ledger/row/correctionand the git and harness triggers),migrate4.py(format 3 to 4),commit.py(shapa commit: the wiki commits itself on the default branch, as a SessionEnd/SessionStart hook). - Write path:
capture.py(Stop hook),redact.py(masks secrets),pii.pyandpiitable.py(the personal-data gate and its one pattern table,assets/pii-patterns.json, byte-copied tohosted/src/pii-patterns.json; the Worker twin ishosted/src/pii.tsandpiigate.ts),memlog.py(format-3 log, and the derived index that also mirrors database rows),save.py. - Index and daemon:
store.py,serve.py. MCP server:mcp.py. - Hosted store (opt-in):
remote.py(shapa remote),remotesync.py(wiki keys, scope, the hook mode),remotehttp.py(stdliburllibclient, injectable transport),sync.py(snapshot, classify, exchange),syncapply.py(the one-transaction apply step),syncrec.py(wire records, validation of server input, note file safety),syncstate.py(credentials, per-wiki state and lock),dbsync.py(explicit-id upserts, relabel). The Worker itself ishosted/; the contract is.shapa/arch/hosted.md. - System prompt per harness:
harness.py(shapa harness install|uninstall|status|watch: composesassets/prompts/core.mdplusassets/prompts/adapters/<harness>.mdinto~/.shapa/prompts/and wires it),harnesswatch.py(hashes and heading lists of the harness defaults, offline),hookcap.py(caps the SessionStart hook output;cli.pyroutesshapa bootstrapthrough it). - Maintenance:
maintain.py,heartbeat.py,score.py. Format:frontmatter.py,nodes.py,validate.py,upgrade.py,status.py,reconfigure.py(the session-start restructure directive; its prompt isassets/prompts/reconfigure.md),upkeep.py(the session-start upkeep directive). Opt-in importer:memri_import.py.
- Wiki resolution and discovery:
shapa/assets/ships into user wikis:AGENTS.md(schema and wiki marker),placement.md, thearch/index.mdtemplate,prompts/(the shared core and the per-harness adapters thatshapa harnessinstalls, never into a wiki) andskills/shapa-upgrade(installed into harnesses, never into a wiki).tests/is the pytest suite, with fixtures undertests/fixtures/.tests/test_parity.pyreads the Worker's constants fromhosted/srcand holds them equal to the Python ones (baseline budget, project template, section keys, system tags, caps, precedence sentence): change one side and it names the other.install.shwires hooks, MCP and the skill from a clone.bootstrap.shis thecurl | shinstaller..shapa/is this repo's wiki:shapa.dbholds its work ledger and rows (shapa ledger,shapa row list),arch/the design docs..github/workflows/test.ymlis CI.
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.
- 7d ago Changed · +3 lines · +1,573 tokens per session 11d6f1f363da
- 9d ago Changed · +4 lines · +3,581 tokens per session 5a797333de85
- 10d ago Changed · +291 tokens per session dd90ccc50d9b
- 15d ago Changed · +13 lines · +3,886 tokens per session ba3d908881dc
- 1mo ago Changed · +1 lines · +194 tokens per session ef07dad9029b
- 1mo ago Changed · +2 lines · +229 tokens per session 60ddee4d21bc
- 1mo ago First seen · 60 lines · 1,583 tokens per session scan D 9b3e0bb10f84
shapa-llm AGENTS.md is an instructions file published in the GitHub repository Roukh/shapa-llm (2 stars, last pushed 8d ago), licensed MIT. It adds 11,337 tokens to every session, about $0.0453 per session on Opus 5.5. A static security scan graded it D with 3 findings (downloads and executes remote code, reads agent configuration directories, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-03.
shapa-llm AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| shapa-llm AGENTS.mdRoukh/shapa-llm | Instructions file | 2 | 8d ago | MIT | D | 11,337 | Claude Code, Codex, OpenCode |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 196k | today | MIT | A | 9,887 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 144k | today | MIT | A | 7,230 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 196k | today | MIT | A | 5,685 | GitHub Copilot |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 150k | yesterday | MIT | A | 4,680 | Codex, OpenCode |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 196k | today | MIT | A | 3,303 | GitHub Copilot |
| deepseek-harness AGENTS.mddeepseek-ai/deepseek-harness | Instructions file | 289k | 2d ago | MIT | A | 4,393 | Codex, OpenCode |