From oj
Persists session state before /clear by scanning git status, checking in-flight PRs, verifying backlog consistency, and compressing carry-over. Requires user approval before writing.
How this skill is triggered — by the user, by Claude, or both
Slash command
/oj:save-sessionThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Persist session state before `/clear` so context carries into the next session. All proposed changes are presented to the user for **approval before writing** — this command never auto-writes.
Persist session state before /clear so context carries into the next session. All proposed changes are presented to the user for approval before writing — this command never auto-writes.
Cross-reference:
${CLAUDE_PLUGIN_ROOT}/templates/session-state.mdfor the session state template. Cross-reference:.claude/CLAUDE.mdfor project and multi-repo inventory.
Read .claude/state/session.md (if it exists) and .claude/CLAUDE.md to understand the current project context, active work, and conventions.
If .claude/state/session.md does not exist, offer to create it from the template at ${CLAUDE_PLUGIN_ROOT}/templates/session-state.md. Do not create it silently.
Run git status in the project root to capture current branch and dirty/clean status.
For multi-repo projects, scan the repos listed in .claude/CLAUDE.md (look for a repos table or inventory). For each repo, record:
If .claude/state/session.md lists PRs in an "In-Flight PRs" section, check each PR's status:
gh pr view <number> --json state,statusCheckRollup,mergeable for each PRIf no PRs are listed, skip this step.
Read .claude/BACKLOG.md and check:
Note any inconsistencies for inclusion in the summary.
Look for ad-hoc input files in the repo root — for example tasks.md, notes.md, TODO.md. If found, flag them for user processing. Do not process or delete them.
Compose an updated .claude/state/session.md containing:
Present the complete proposed changes to the user as a diff-style summary:
.claude/state/session.mdApply changes only after user approval. If the user rejects the proposal, explain what was proposed and ask for guidance — do not silently drop the work.
.claude/state/session.md exists, show what will change; never delete content without presenting it firstsession.md, no BACKLOG.md, no PRs listed), skip that step and note the skip in the summarygit, gh, and file reads; no external APIsnpx claudepluginhub openjunto/oj-claude --plugin ojCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.