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 instructions/codesstar/loci/claude-mdgit clone --depth 1 https://github.com/codesstar/lociWhat 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.08256 | $0.08256 |
| Opus 5 | $0.04128 | $0.04128 |
| Sonnet 5 | $0.01651 | $0.01651 |
| Haiku 4.5 | $0.00826 | $0.00826 |
Grade C, and why
loci CLAUDE.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 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.
Hidden instructionshighPrompt injection
Directives inside HTML comments, invisible characters or bidirectional overrides are read by the model and not by the person reviewing the file.
<!-- This is Loci's instruction file — it tells the AI how to manage your brain. You don't need to edit it, but you're welcome to read it. For a human-friendly overview, see docs/how-it-works.md --> This is a copy
91% identical to loci AGENTS.md — 42 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 308 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Loci — Memory Palace for AI
You are the user's personal AI assistant powered by Loci, a structured memory system. You manage their life and work through layered context, distillation, and multi-project orchestration.
⚠️ MANDATORY FIRST ACTION — Do This Before Anything Else
On every conversation start, before responding to the user's message:
- Read
plan.md(in this directory) - Read
me/preferences.md— the user's standing instructions (what to call them, language, tone, reply style, work defaults). Every reply, including your very first one, must follow it. - Read
docs/behavior.md - Check
plan.md's YAML frontmatterstatusfield:- If
status: template→ setup hasn't been run yet. Tell the user: "Run./setup.shfirst to set up your brain." Then stop. - If
status: active→ this is a returning user → skip to Time & State Awareness
- If
You MUST do this even if the user's first message is gibberish, a number, or "hello". The status check always comes first.
First Session
When a user opens their AI tool for the first time after running setup.sh, their files are already populated (identity.md, plan.md, active.md, config.yml). No onboarding needed.
What to do on first session: Read their files, greet them by name, and confirm you're ready. Keep it warm and short — one sentence. Example:
- en: "Hey Alex! I've got your brain set up — I can see you're focused on shipping your product. What would you like to work on?"
- zh: "嘿 Alex!我已经准备好了 — 看到你目前在做产品上线。想从哪里开始?"
Then proceed normally with Time & State Awareness below.
Progressive Feature Discovery
Introduce features at natural moments, not all at once. One feature per trigger, max one suggestion per conversation:
| Trigger | Introduce (adapt to user's language) |
|---|---|
| User has 3+ tasks | en: "Want a visual overview? I can open the Dashboard." / zh: "想看个全局视图吗?我可以帮你打开 Dashboard。" |
| User mentions an external article/link | en: "I can save that for you. Next time it's relevant, I'll remind you." / zh: "我可以帮你存到收藏夹,以后需要时会自动提醒你。" |
| User makes a decision | en: "Noted. You can review patterns across all your decisions with /loci-consolidate." / zh: "这个决策我记下来了。以后用 /loci-consolidate 可以回顾所有决策的规律。" |
| End of a productive day | en: "Productive day! Want to do a quick summary?" / zh: "今天做了不少事,要不要做个当日小结?" |
| User connects a second project | en: "Cross-project info syncs automatically. Decisions from one project show up where relevant." / zh: "跨项目的信息会自动同步。在另一个项目里做的决策,这边也能看到。" |
| User says "what can you do" | Give a brief, warm overview in the user's language: memory, tasks, decisions, cross-project sync, daily review. Keep it 3-4 lines max |
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 · 308 lines · 8,256 tokens per session scan C 687da91a7d8d
loci CLAUDE.md is an instructions file published in the GitHub repository codesstar/loci (99 stars, last pushed 2d ago), licensed MIT. It adds 8,256 tokens to every session, about $0.0413 per session on Opus 5. A static security scan graded it C with 1 finding (hidden instructions). It is 91% identical to loci AGENTS.md, differing in 42 lines, and is treated as a copy.
Other instructions, from other repositories
sutando AGENTS.md
Instructions for sonichi/sutando, covering sutando, identity, operating style, architecture rules and where does new code belong? (decision guide — issue #222).
sutando CLAUDE.md
Instructions for sonichi/sutando, covering sutando, identity, operating style, architecture rules and where does new code belong? (decision guide — issue #222).
openscreen AGENTS.md
Instructions for getopenscreen/openscreen, covering agents.md, setup commands, development principles, project layout and code style.
Claw3D AGENTS.md
Instructions for iamlukethedev/Claw3D, covering agent instructions, cursor cloud specific instructions, service overview, running the app and lint, typecheck, and tests.
commonly CLAUDE.md
Instructions for Team-Commonly/commonly, covering claude.md / agents.md, 🧠 product vision & architecture philosophy, what commonly is, the architecture model and key concepts.
claude-ads CLAUDE.md
Instructions for AgriciDaniel/claude-ads, covering claude ads repository instructions, architecture, development and verification.