loci

A persistent memory system for an AI assistant that stores structured information, identity, and task plans across conversations. It uses a local memory directory called a brain.

In plain words
What is it for?
Use it to set up and maintain long-term assistant memory, including personal details, priorities, plans, and daily tasks.
Why use it?
It prevents important context from being lost between conversations and gives the assistant a continuing task record.

Skill for Claude CodeCodex

Install

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.

agentmods
npx agentmods add skills/codesstar/loci/skill
Any agent
npx skills add codesstar/loci --skill skill
Clone the repo
git clone --depth 1 https://github.com/codesstar/loci

Made for: Claude Code, Codex.

Per session 21 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,107 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00021 $0.01107
Opus 5 $0.00010 $0.00553
Sonnet 5 $0.00004 $0.00221
Haiku 4.5 $0.00002 $0.00111

Measured 2d ago against content hash be160bdabbfa, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

loci 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.

integrations/openclaw/skill/SKILL.md · 111 lines

How it starts

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

Loci — Memory Palace for AI

⚠️ FIRST: Check if brain exists

Run this check before doing anything else:

  1. Check if ~/.loci/brain-path exists → read the path inside → verify plan.md exists there
  2. If not, check if ~/loci/plan.md exists
  3. If neither exists → run Bootstrap below
  4. If found → read plan.md. If status: template → run First-Time Setup. If status: active → brain is ready, skip to Daily Use

Bootstrap (auto-install for new users)

The user doesn't need to do anything. You handle it:

# Clone Loci brain template
git clone --depth 1 https://github.com/codesstar/loci.git ~/loci

# Remove git remote (user's data stays private)
cd ~/loci && git remote remove origin

# Register brain location
mkdir -p ~/.loci
echo "$HOME/loci" > ~/.loci/brain-path

After cloning, run First-Time Setup below. Tell the user:

  • "我在帮你设置记忆系统,只需要回答几个问题。"

First-Time Setup

When plan.md has status: template:

  1. Detect the user's language from their messages. Ask in that language.
  2. Ask these questions (can ask all at once):
    • What's your name?
    • What do you do? (Developer / Designer / Creator / Student / Other)
    • What's your most important focus right now?
    • What hours do you usually work? (Morning / Daytime / Evening / Night owl / Irregular)
    • Preferred language? (English / 中文 / Mix)
  3. Generate initial files from answers:
    • me/identity.md — name, role, current season
    • plan.md — mission + focus as first goal (set status: active)
    • tasks/active.md — first task from their focus
  4. Done. Say: "Your brain is ready. From now on, I'll remember the important things."

Daily Use

Brain path: read from ~/.loci/brain-path, or default ~/loci/

At conversation start, read L1 files before responding:

  • plan.md — life direction
  • tasks/active.md — current tasks
  • tasks/daily/YYYY-MM-DD.md — today's plan (if exists)
  • inbox.md — recent items only

Distillation — what to save where

Read the full file on GitHub · 111 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. 2d ago First seen · 111 lines · 21 tokens per session scan A be160bdabbfa

Subscribe to this mod's changes

loci is a skill published in the GitHub repository codesstar/loci (99 stars, last pushed 2d ago), licensed MIT. It adds 21 tokens to every session and 1,107 once invoked, about $0.0001 per session on Opus 5. 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.

Related

Other skills, from other repositories

collaboration-intelligence

Maintain and use a cross-channel collaboration map of rooms, people, agents, agent owners, relationships, expertise, ownership, roster, priority/VIP handling, and recent context. Trigger when a task or message carries room/channel/sender/member metadata; the user asks who is in a room, what it is for, who owns or…

sonichi/sutando · 208 tokens

schedule-crons

Re-create all session cron jobs for Sutando. Run this on startup or after a session restart.

sonichi/sutando · 0 tokens

task-orphan-check

Resolve orphan tasks left in /tasks/ from a previous session that crashed mid-execution. Classifies each live task as done / fresh / stale by cross-referencing per-side-effect markers, then archives or recovers as appropriate. Runs once on startup; safe to re-invoke.

sonichi/sutando · 65 tokens

agent-room-ops

One skill, multiple tools. Everything an agent does in a room beyond its task inbox lives here as a tool, so the parity capabilities are self-evidently one collection (not N scattered skills). Each tool is a thin gateway-only client verb sharing gateway.py; the gateway/broker (box-side) owns the platform creds and…

sonichi/sutando · 0 tokens

engine-conflict-resolve

Ask Sutando to resolve a conflicted update of a Sutando checkout. When pulling the latest release/main conflicts with local changes, Sutando reproduces the merge in a scratch git worktree, resolves the conflicts there, proposes the resolution to the owner, and fast-forwards the live checkout only after explicit…

sonichi/sutando · 87 tokens

email-find

Locate a specific email when the obvious searches fail. Use when the user is confident an email exists but a targeted query returned nothing.

sonichi/sutando · 29 tokens