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/codesstar/loci/loci-settingsgit 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.00000 | $0.00719 |
| Opus 5 | $0.00000 | $0.00360 |
| Sonnet 5 | $0.00000 | $0.00144 |
| Haiku 4.5 | $0.00000 | $0.00072 |
Grade A, and why
loci-settings 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.
What it actually says
Configure how this connected project writes local memory and what gets summarized in the Loci brain index.
Steps:
-
Check connection: Check for
.loci/memory.mdin current directory. If not found, offer once at the end of the exchange: "这个项目还没有本地记忆。要不要我帮你在这里留个记忆?" If the user says yes, follow the "Connecting a serious project" rule in the main instructions. -
Check existing config: Read
.loci/config.jsonif it exists. If it does, show current settings and ask what to change. If not, proceed with fresh setup. -
Collect settings using AskUserQuestion tool. Three questions, one at a time:
Q1: "Enable Loci project memory for this repo?"
- Yes (default) — Write project memory locally in this repo
- No — Pause project memory updates for this repo
Q2: "What should be summarized in the brain index? (toggle items)" Show defaults and let user toggle:
insight— lessons learned, non-obvious findings (default: ON)milestone— shipped features, completed phases (default: ON)decision— only if promoted to brain-level significance (default: OFF)architecture— only if it affects other projects (default: OFF) User can add custom tags too (e.g. "meeting-notes", "user-feedback").
Q3: "Any rules about what should NEVER sync? (e.g. 'never sync client names', 'skip internal jokes'). Say 'no' to skip." → Free text, optional. Stored as a note in config for the AI to respect.
Note at the end: "The project's full memory stays in this repo. Env variables, secrets, debug logs, and dependency updates are never summarized into the brain."
-
Save config: Write
.loci/config.jsonin current directory:{ "version": 1, "brain": "<path from .loci/memory.md frontmatter>", "project_memory": { "enabled": true, "index_tags": ["insight", "milestone"], "local_tags": ["local", "debug", "wip"], "auto_index": true } }brainpath is read from.loci/memory.mdfrontmatterindex_tagsandlocal_tagsare derived from the user's answers in Q2- If user provided exclusion rules in Q3, add
"exclusions": ["..."]to the config
-
Apply rules: If the project has a CLAUDE.md, update the
<!-- loci:project:start v1 -->block. If no CLAUDE.md exists, create one withtemplates/project-claude-block.md. -
Confirm with summary:
Settings saved to .loci/config.json Brain: <brain path> Local memory: enabled Brain index summaries: insight, milestone Local tags: local, debug, wip Exclusions: [if any] Full memory owner: this repo Never indexed: env/secrets, debug logs, deps You can re-run /loci-settings anytime to change these.
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 · 61 lines · 0 tokens per session scan A c773f33339f0
loci-settings is a command published in the GitHub repository codesstar/loci (99 stars, last pushed 2d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 719 tokens. 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.
Other commands, from other repositories
doc
Use this command to create a new feature doc, how-to, concept, reference, or troubleshooting guide — it scaffolds the file, frontmatter, structure, and sidebar entry.
doncheli-close
Close session with audit, learnings and context for next session.
book-stay
Choose and book a hotel (or stay) — quiz preferences, generate shortlist, verify rates, hand off booking, fan out references across the vault.
oops
Capture a mistake and its lesson - "only get something wrong once".
shop
Purchase decision support — clarify what the user actually needs and why via an interactive quiz, then research fresh candidates and recommend.
OPSX: Onboard
Guided onboarding - walk through a complete OpenSpec workflow cycle with narration.