Lerim
Query persistent project context and past decisions before starting agent work.
Installation
- Make sure Claude is on your device and in your terminal.
Skills load from
~/.claude/skills/when Claude Code starts up — so you need it on your machine first. If you don't have it yet, install it once with the command below, then runclaudein any terminal to verify.One-time setupnpm i -g @anthropic-ai/claude-codeAlready have it? Skip ahead.
- Paste into Claude Code or into your terminal.
This copies the whole skill folder into
~/.claude/skills/lerim-lerim-dev/— the SKILL.md plus any scripts, reference docs, or templates the skill ships with. Safe default: works for every skill.Faster alternative (instruction-only skills)
Skips the clone and grabs only the SKILL.md file. Don't use this if the skill ships Python scripts, reference markdowns, or asset templates — they won't be downloaded and the skill will fail when it tries to load them.
Quick install (SKILL.md only)Sign up to copy - Restart Claude Code.
Quit and reopen Claude Code (or any other agent that loads from
~/.claude/skills/). New skills are picked up on startup. - Just ask Claude.
Skills auto-activate when your request matches the skill's description — no slash command needed. Trigger phrases live in the skill's own frontmatter; you can read them in the “What this skill does” section above.
Prefer to read the source first? Open on GitHub.
When Claude uses it
Query Lerim's persistent project context before agent work. Use it to check prior decisions, constraints, preferences, and historical context through exact queries or synthesized answers.
What this skill does
Lerim
Use this skill when you need project context before or during agent work.
Lerim stores durable context from past agent sessions and exposes it through a small CLI/API surface. The important distinction is:
lerim context-brief showfor instant precomputed startup contextlerim working-memory showfor recent short-term project movementlerim queryfor exact deterministic retrievallerim answerfor retrieval plus synthesislerim statusfor runtime health, project counts, and queue state
Resolve the command
Before running Lerim, resolve the command. Some Codex or automation shells have the package available through uvx but do not have a plain lerim shim on PATH.
if command -v lerim >/dev/null 2>&1; then
LERIM=(lerim)
elif command -v uvx >/dev/null 2>&1; then
LERIM=(uvx lerim)
elif [ -x "$HOME/.local/bin/uvx" ]; then
LERIM=("$HOME/.local/bin/uvx" lerim)
else
echo "Lerim is not runnable from this shell; install a command shim with: uv tool install lerim"
fi
Do not treat lerim: command not found as Lerim being unavailable until the uvx lerim fallback has been tried. In examples below, replace lerim with the resolved command.
When to use
- At the start of a chat or task when past project context may change the work
- When a decision, constraint, or preference may already have precedent
- When debugging and you want prior facts or earlier decisions
- When you need current vs historical truth from stored records
- Skip Lerim for self-contained tasks where past project context would not help
Fast path
Start with the smallest tool that answers the question:
- Use
lerim context-brief showat startup for long-term project context. - Use
lerim working-memory showwhen recent continuation context may matter. - Use
lerim queryfor counts, latest rows, date windows, and exact inspection. - Use
lerim answerwhen you need a synthesized explanation or semantic retrieval. - Use
lerim statusorlerim queuewhen the question is operational rather than semantic.
Examples:
"${LERIM[@]}" context-brief show
"${LERIM[@]}" context-brief status
"${LERIM[@]}" working-memory show
"${LERIM[@]}" working-memory status
"${LERIM[@]}" query records count --kind decision
"${LERIM[@]}" query records list --kind constraint --limit 10
"${LERIM[@]}" answer "What do we already know about the auth flow?"
"${LERIM[@]}" answer "What changed recently about storage and why?"
"${LERIM[@]}" status --json
Context Brief flow
Context Brief is the long-term startup path. It is generated ahead of time by the daemon
or by lerim context-brief refresh, so show, status, and path should be
fast local reads. show prepends live DB freshness before printing the static
markdown snapshot.
flowchart TD
A["Agent starts in a workspace"] --> B["lerim context-brief show"]
B --> C{"Current markdown exists?"}
C -- "yes" --> D["Read generated durable context"]
C -- "no" --> E["lerim context-brief status"]
E --> F["Run or suggest refresh"]
D --> G{"Need exact or deeper context?"}
G -- "exact" --> H["lerim query"]
G -- "synthesis" --> I["lerim answer"]
G -- "no" --> J["Continue work"]
Working rules
- Context Brief is a generated markdown view of SQLite records, not durable state.
- Read the live freshness block. If it reports changed DB records and newest context matters, suggest
lerim context-brief refresh. - Use
lerim context-brief statusto see dynamic age, DB record-change count, current path, latest run, and suggested action. - Use
lerim context-brief pathwhen another tool needs the stable Markdown path. - Working Memory is a separate generated markdown view over recent record versions.
- Use
lerim working-memory showfor short-term continuation context and superseded/replacement decisions. - Treat Working Memory as context, not as a todo list. The current user prompt decides what to do next.
- Do not hardcode project IDs. Run commands from inside the workspace or pass
--project <name-or-path>. - Treat validation/build/check results inside Context Brief as historical persisted evidence; rerun relevant checks after edits.
- Expect a fixed section order: Summary, Start Here, Continuation Handoff, Decisions, Constraints & Preferences, Project Facts, Open Risks / Review Queue, Follow-up Queries, Sources.
- Treat Start Here as deterministic Lerim guidance, not model synthesis.
- Trust Continuation Handoff only when it cites recent episode evidence; otherwise use the current chat, workspace state, and relevant checks for live implementation status.
- Prefer
queryoveranswerwhen the question is exact. - Prefer
answerover manual browsing when the question needs synthesis across records. - Treat Lerim as the context layer, not as a place to manually edit durable state during normal agent work.
- Query Lerim through its CLI/API instead of inspecting storage directly.
- If the runtime is down, say so plainly and use the workspace directly rather than pretending Lerim answered.
Operational notes
lerim upruns the local service in Docker.lerim serveruns the local API directly without Docker.lerim dashboardis only a transition message; the hosted UI lives on Lerim Cloud.- Local durable context is stored in the global SQLite store.
Read more when needed
Open cli-reference.md only when you need:
- full command syntax
- runtime vs host-only command behavior
- less common commands like
queue,retry,skip,skill, orauth
Related skills
App Store Listing Audit
coreyhaines31
Analyze your app listing against best practices and get a prioritized optimization plan.
Co-Marketing Partnerships
coreyhaines31
Find ideal partners and plan joint marketing campaigns with other companies.
Cold Email Writer
coreyhaines31
Write B2B cold emails and follow-up sequences designed to get replies.
Community-Led Growth
coreyhaines31
Build and grow online communities to drive product adoption and customer loyalty.