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-consolidategit clone --depth 1 https://github.com/codesstar/lociWrote 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/commands/codesstar/loci/loci-consolidate)<a href="https://agentmods.dev/commands/codesstar/loci/loci-consolidate"><img src="https://agentmods.dev/badge/commands/codesstar/loci/loci-consolidate.svg" alt="Measured on agentmods" 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 | $0.00000 | $0.01031 |
| Opus 5 | $0.00000 | $0.00515 |
| Sonnet 5 | $0.00000 | $0.00206 |
| Haiku 4.5 | $0.00000 | $0.00103 |
Grade A, and why
loci-consolidate 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 5d 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 — 86 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/loci-consolidate — Memory Consolidation
Consolidate recent memories: review distilled knowledge from the past N days, find cross-domain patterns, and generate insights.
Trigger
- Manual: user runs
/loci-consolidateor/loci-consolidate 7(custom day range) - Auto: first conversation of the day (checked via
.loci/last-consolidation.txt)
Process
-
Gather recent distillations (default: last 24 hours, configurable via argument):
- Scan
decisions/for files with recent dates in frontmatter - Scan
tasks/tasks.jsonfor recently added/completed items; usetasks/active.mdonly as the compact generated view - Scan
me/for recently updated files (checkupdatedfield) - Scan
.loci/activity/<current month>.mdfor recent entries - Scan
projects/index.mdfor relevant project index entries; open a project's repo memory only when the current consolidation clearly needs it - Scan
inbox.mdfor new entries
- Scan
-
If nothing found: Skip silently (auto mode) or report "Nothing to consolidate" (manual mode)
-
Analyze for patterns — Look for:
- Recurring themes across domains ("你最近三个决策都在简化架构")
- Contradictions ("上周说要 focus,这周又加了 3 个新项目")
- Momentum signals ("连续 5 天完成关键任务")
- Cross-project connections ("Loci 的 tag 系统和 CYC 的分类策略在收敛")
- Identity/value shifts ("从 '做更多' 转向 '做更精'")
- Goal progress — compare recent activity against
plan.mdgoals. Calculate rough progress % where possible ("距离 3/15 发布还有 4 天,完成度约 70%,有风险") - Time allocation — estimate time distribution across projects from
.loci/activity/<current month>.mdandtasks/calendar.json. Flag mismatches with stated goals. - Stale tasks — scan
tasks/tasks.jsonfor completed tasks older than 7 days or open tasks untouched for 30+ days. Suggest archiving completed ones and reviewing stale ones.
-
Generate insight entry — Write to
me/insights.mdas a personal reflection, not as a permanent value:## YYYY-MM-DD ### Short title **背景**:What recent evidence produced this thought. **洞察**:The compressed insight. **为什么重要**:Why this matters for the user. **暂定影响**:How it may affect future choices or behavior. **状态**:observingIf an insight has become durable, promote it to
me/values.mdorme/learned.md. If it reflects identity/value/behavior evolution, update the current file first and append old/new/reason tome/evolution.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.
- 5d ago First seen · 86 lines · 0 tokens per session scan A e9044b0e0182
loci-consolidate is a command published in the GitHub repository codesstar/loci (170 stars, last pushed 2d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,031 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
ensoul
Activate Claudicle soul identity in this session. Creates a per-session marker so soul.md, soul state, and session awareness persist through compaction and resume.
tag
Attach manual keyword metatags to the current Claude Code session. These tags supplement the auto-generated Qwen tags in /.claude/session-registry.json and are searchable via /claude-tracker-search --name (and, after the Phase 2 default-mode pre-pass, via the bare /claude-tracker-search ).
quote-search
Search notable phrases captured via /quote or auto-extracted from sessions. Uses FTS5 full-text search or tag-based filtering.
gpd:compact-state
Archive historical entries from STATE.md to keep it under the 150-line target.
gpd:record-insight
Record a project-specific learning or pattern to the insights ledger.
gpd:resume-work
Resume research from previous session with full context restoration.