From lemur-os
Use at the end of a LemurOS-managed session, or when SessionEnd nudges you, to flip the open SessionLog to `closed`, write its summary, and mirror authored specs/plans to the vault. Dispatches the Librarian — never writes the vault directly.
How this skill is triggered — by the user, by Claude, or both
Slash command
/lemur-os:close-sessionThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
- The SessionEnd hook fires and emits a context message asking you to close the open session.
<project>/docs/specs/ or advanced any plan in <project>/docs/plans/ and want the vault mirror updated now.vault/projects/<slug>/sessions/<sessionId>.md with status: open — there is no session to close.vault/_registry.json for the cwd).Glob vault/projects/<slug>/sessions/*.md (or read the SessionStart hook's emitted path). Read frontmatter; confirm status: open. Extract id.lemurOS:update-task-status invocations); decisions logged (from lemurOS:log-decision calls); spec files authored under <project>/docs/specs/; plan files whose checklist count changed under <project>/docs/plans/.plansAdvanced. For each plan touched, count - [x] and - [ ] lines to derive stepsCompleted and stepsTotal. Use a single Bash invocation like pnpm exec node -e "..." or read each file and tally — do not skip.WriteRequest. Envelope = {operation: "close-session", slug, rationale: "session wrap-up", agent: "<your agent name>", payload: {...}}. Validate locally with the same WriteRequestSchema.parse one-liner used by lemurOS:register-project.Task tool, subagent_type: lemurOS-librarian.register-project:
ok: true — report SHA + verdict DONE.SCHEMA_INVALID — fix payload, retry once. If it fails again, emit ESCALATE.PATH_FORBIDDEN — emit ESCALATE with the librarian's message quoted.CONCURRENT_WRITE — wait 2s, retry up to twice; if still failing, ESCALATE.IO_ERROR — emit BLOCKED; do not retry.A session closing one task transition, one decision, one spec, and one plan with 7/20 steps done in project demo, session 2026-05-12-2330:
{
"operation": "close-session",
"slug": "demo",
"rationale": "session wrap-up",
"agent": "lemurOS-backend-dev",
"payload": {
"sessionId": "2026-05-12-2330",
"summary": "Implemented T-014 (token refresh) end-to-end. One decision logged on cookie storage; spec for the refresh flow authored.",
"tasksTransitioned": ["T-014"],
"decisionsLogged": ["2026-05-12-cookie-storage"],
"specsAuthored": ["docs/specs/2026-05-12-token-refresh.md"],
"plansAdvanced": [
{ "path": "docs/plans/2026-05-12-token-refresh.md", "stepsCompleted": 7, "stepsTotal": 20 }
]
}
}
Expected Librarian success response:
{
"ok": true,
"paths": [
"vault/projects/demo/sessions/2026-05-12-2330.md",
"vault/projects/demo/specs/2026-05-12-token-refresh.md",
"vault/projects/demo/plans/2026-05-12-token-refresh.md"
],
"commitSha": "<40-char SHA>"
}
Specs and plans are written directly by the authoring skills (lemurOS:brainstorming, lemurOS:writing-plans, lemurOS:executing-plans) to the project working tree (architecture §8.10 makes that tree user/agent-writable, so invariant 2 is not violated — only the vault mirror is under the Librarian's exclusive control). The vault mirror at vault/projects/<slug>/{specs,plans}/ is updated only by this skill (at session end) or by /lemur-os:sync (on demand). A session crash before close lags the vault mirror by one session — recoverable by re-dispatching this skill or running /lemur-os:sync.
vault/ or vault/projects/<slug>/ directly.DONE on Librarian ack with ok: true.BLOCKED on IO_ERROR or when no open session can be found.ESCALATE on persistent PATH_FORBIDDEN or repeated SCHEMA_INVALID.Provides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub demurthelemur/lemuros --plugin lemur-os