Locus memory palace navigation and management. Use when you need to read from or write to the agent's memory palace: querying what is known about a topic, recording findings from the current session, updating canonical facts, navigating to a specific room, or checking whether consolidation is needed. Also use at the end of any session that produced new knowledge worth retaining.
Locus is a hierarchical markdown-based memory system. Directories are rooms, files are knowledge. The goal is always: minimal context loaded, maximum precision retrieved.
Always start here, regardless of the task.
.locus/ directory~/.locus/ for the global palaceINDEX.md from the palace root.Do not read any other files yet. If running as a GitHub Actions workflow,
set the palace root via the LOCUS_PALACE environment variable or workflow input.
For each relevant room:
<room-name>/<room-name>.md or README.md).Report (internally):
Use when recording a durable, verified fact that persists across sessions.
INDEX.md still accurately describes the room. Update if needed.Use for ephemeral findings or anything not yet confirmed as durable. Always write a session log at the end of any session that touched a room.
<room-name>/sessions/YYYY-MM-DD.md (today's date).
If the file exists, append. Multiple sessions same day: YYYY-MM-DD-2.md.## <HH:MM> — <brief task description>
### Findings
<Specific facts learned.>
### Actions Taken
<What was written or changed, with file references.>
### Consolidation Notes
<What to promote to a canonical file. Be explicit. Leave blank if nothing.>
Only when no existing room fits the information to be stored.
templates/room/room-name.md.INDEX.md with a one-line description and path.INDEX.md remains under 50 lines.After any write, check:
| Condition | Action |
|---|---|
| Room main file > 150 lines | Extract a section into a specialty file |
| Room main file > 200 lines | Must extract before further writes |
sessions/ has > 5 unprocessed logs | Run locus-consolidate |
| Same room accessed 3+ consecutive sessions | Run locus-consolidate |
| INDEX.md > 40 lines | Consider splitting into sub-indices |
At the end of every Locus operation, emit:
Locus: read <N> files (<M> lines). Wrote to <file(s)>. [Consolidation needed: yes/no]
When Locus runs as a Gemini GitHub Actions workflow, use the
google-github-actions/run-gemini-cli action with this skill as the prompt:
- uses: google-github-actions/run-gemini-cli@v0
with:
prompt_file: skills/gemini/locus/SKILL.md
env: |
LOCUS_PALACE=${{ inputs.palace_path }}
For local Gemini CLI use, place in your project's .gemini/ directory:
cp skills/gemini/locus/SKILL.md .gemini/locus-skill.md