tp-session-restore

tp-session-restore is a skill for Claude Code, Codex from CurtisThe/three-pillars-plugin. It costs 34 tokens per session (2,046 once invoked), scanned A, original, Apache-2.0.

A session-continuity tool that restores project context from a handoff file and related design documents.

In plain words
What is it for?
Use it at the start of a new session to restore an active design, find the most recently used design, or recover orchestration notes.
Why use it?
It avoids starting a new conversation without knowing the active design, previous decisions, or unfinished work.

Skill for Claude CodeCodex

Part of the three-pillars plugin — 37 skills, 20 agents shipped together

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/curtisthe/three-pillars-plugin/tp-session-restore
Any agent
npx skills add CurtisThe/three-pillars-plugin --skill tp-session-restore
Clone the repo
git clone --depth 1 https://github.com/CurtisThe/three-pillars-plugin

Made for: Claude Code, Codex.

Or install three-pillars, the plugin that ships this one along with the rest of its 37 skills, 20 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for tp-session-restore

README.md
[![agentmods](https://agentmods.dev/badge/skills/curtisthe/three-pillars-plugin/tp-session-restore.svg)](https://agentmods.dev/skills/curtisthe/three-pillars-plugin/tp-session-restore)
Your own site
<a href="https://agentmods.dev/skills/curtisthe/three-pillars-plugin/tp-session-restore"><img src="https://agentmods.dev/badge/skills/curtisthe/three-pillars-plugin/tp-session-restore.svg" alt="Measured on agentmods" height="20"></a>
Per session 34 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,046 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.00034 $0.02046
Opus 5 $0.00017 $0.01023
Sonnet 5 $0.00007 $0.00409
Haiku 4.5 $0.00003 $0.00205

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

Security

Grade A, and why

tp-session-restore 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 5d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/test_session_restore_skill_md.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/tp-session-restore/SKILL.md · 55 lines

How it starts

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

Session Restore

Pick up where the last session left off by loading the handoff and design artifacts.

Argument: {design-name} (optional) — must match an existing directory under three-pillars-docs/tp-designs/ (active) — or, if already completed, under three-pillars-docs/completed-tp-designs/.

If no argument is given, read the first line of .claude/last-design (project root) for the most recently active design name. This file is an MRU stack — one design per line, most recent first. If the file doesn't exist or is empty, list available designs under three-pillars-docs/tp-designs/ and ask the user which one to restore.

Orchestration fallback (no argument only). Top-level fleet / cross-design sessions save their handoff under the reserved orchestration slot (three-pillars-docs/tp-designs/orchestration/, see its README.md), not under any one design. So when the name came from the MRU — no explicit argument — and the resolved design has no handoff.md of its own (e.g. it is seed-only, or its real handoff lives on a worktree branch), but orchestration/handoff.md exists, restore orchestration instead. An explicit {design-name} argument always wins: never override it with the fallback.

Steps

  1. Run first-run preflight per skills/_shared/first-run.md.

  2. Resolve the design name: Use the argument if given, otherwise read the first line of .claude/last-design. If neither is available, list designs and ask.

  3. Resolve the design directory, in order: first three-pillars-docs/tp-designs/{design-name}/ (active). If that's absent, fall back to three-pillars-docs/completed-tp-designs/{design-name}/ (completed) — mirroring /tp-guide, which already scans both dirs. This completed-dir lookup fires for both an explicit {design-name} argument and an MRU-resolved name (contrast the orchestration fallback in step 3, which is MRU-only).

  4. Read handoff.md from the design directory.

    • If the design resolved from completed-tp-designs/{design-name}/ in step 2, frame it as COMPLETED. Completed status is signaled by the resolution source — the dir resolved under completed-tp-designs/ — keyed off design.md's ever-present completed: YYYY-MM-DD frontmatter stamp (written at /tp-design-complete step 6d). Read the completed: date and the surviving artifacts (design.md, plan.md, review.md, etc.) regardless of whether a handoff exists:
      • If handoff.md is present, it may carry the dual archive banner (archived: true frontmatter / the 📦 Archived handoff blockquote, added at /tp-design-complete step 6d1). Treat the banner as enrichment — extra session-prose context surfaced when present — never as the signal that the design is completed; the resolution source + completed: stamp already established that.
      • If handoff.md is missing (the dominant case for legacy archived designs, which deleted the handoff under the old pre-banner behavior), there's nothing to enrich with — still frame the design as completed via its completed: stamp and surviving artifacts. Never print "no prior session to restore" for a completed design, with or without a handoff.
      • If the design is still MRU-top or its lock.json phase == "cleanup-pending", nudge the user toward /tp-post-merge {design-name} to finish teardown once the completion PR has merged.
      • Continue to step 4 against the completed directory.
    • If it resolved from the active tp-designs/{design-name}/ dir and handoff.md exists, continue to step 4.
    • If it's missing from the active dir and the name came from the MRU (no explicit argument): check for three-pillars-docs/tp-designs/orchestration/handoff.md. If it exists, the MRU-top design has no session of its own but a cross-design orchestration handoff does — switch the target to orchestration, read that handoff.md, and tell the user you fell back and why (e.g. "audit-council-fanout has only a seed — restoring the orchestration fleet handoff, which references it"). Continue to step 4 against the orchestration directory.
    • Otherwise (missing from the active dir with no orchestration fallback, and the design did not resolve as completed): tell the user there's no prior session to restore. Check whether other artifacts exist (design.md, plan.md, seed.md) and summarize what's available, then stop. This branch is guarded to genuinely-absent designs only — a completed design never reaches it (see the completed branch above).
    • Resolve/report order recap: active tp-designs/ → completed completed-tp-designs/ → the orchestration fallback (which stays MRU-only and fires only when neither active nor completed resolved). An explicit {design-name} argument always wins over the MRU at every step.
    • No double-report note: the completed-design branch above must not double-report with the step-7.5 closeout nudge — detect_unarchived.py (step 7.5) scans only active tp-designs/*/, so a design that resolved from completed-tp-designs/ here is structurally invisible to that scan. Belt-and-suspenders, not a real mitigation, but worth stating so the two surfaces are never confused.
  5. Read the sibling artifacts that exist in the design directory (design.md, detailed-design.md, plan.md, review.md) — quick scan for context, not deep-dive. (The orchestration slot has none of these — that's expected; its handoff.md is the whole record, so rely on it and move on.)

  6. Read the files mentioned in the handoff's State and Next sections (just a quick scan — don't deep-dive unless something looks wrong).

  7. Read Current Focus: If three-pillars-docs/product_roadmap.md exists and has a ## Current Focus table, read it. Use this to contextualize the design's status within the broader project — is it the top priority? Is it blocking other work?

  8. Inspect the lock per skills/_shared/collaboration.md. If lock.json exists and its owner or branch does not match the current user / current git branch, surface this in the status update ("Heads up: {name} is locked by {owner} on {branch} — you'll need --force-takeover on the next lock-enforcing skill to claim it"). Do not block — session-restore is read-only. 7.5. Closeout nudge (read-only, fail-open): run python3 "$TP_ROOT"/skills/_shared/detect_unarchived.py --repo . --exclude {design-name} --slugs-only (exclude the design being restored — it's the active work, not drift). Any slugs returned are other designs whose three-pillars-docs/tp-designs/{slug}/ dir carries implementation evidence but has not been archived to completed-tp-designs/closeout pending. Mention them in the status (step 8) as "closeout pending — run /tp-design-learn {slug} (or /tp-spike-learn) then /tp-design-complete {slug}"; an unarchived merged design hard-fails the framework's CI check on {default}. Non-blocking, fail-open — the helper always exits 0; a detector error yields no nudge and never breaks the restore. One detector, two surfaces: shared with the hard CI check.

  9. Present a brief status to the user:

    • What design they're working on and which phase
    • What artifacts exist (design ✓, detailed ✓, plan ✓, etc.)
    • What's done vs. what's next
    • Where this design sits in the Current Focus table (if present)
    • Lock status (only surface if the user is not the current owner)
    • Any closeout-pending designs from step 7.5 (if any)
    • Any open questions from last time
  10. Ask if they want to continue where they left off or pivot to something else.

Read the full file on GitHub · 55 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 5d ago First seen · 55 lines · 34 tokens per session scan A ab0e3dc64d2b

Subscribe to this mod's changes

tp-session-restore is a skill published in the GitHub repository CurtisThe/three-pillars-plugin (4 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 34 tokens to every session and 2,046 once invoked, about $0.0002 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-31.

Related

Other skills, from other repositories

media-ingest

Ingest video, audio, PDF, book, screenshot, and GitHub repo content into the brain. Multi-format handling with entity extraction and backlink propagation. Covers video-ingest, youtube-ingest, and book-ingest subtypes.

garrytan/gbrain · 52 tokens

mem0-oss-to-platform

Plan and then execute a migration of a project from the mem0 open-source / self-hosted SDK (the local Memory class) to the mem0 Platform / hosted / managed SDK (the MemoryClient class). Use this whenever a developer wants to move, switch, or migrate their mem0 usage off OSS/self-hosted to the hosted API — e.g.…

mem0ai/mem0 · 273 tokens

Cortex

Operate Cortex, the LifeOS memory system — the typed Knowledge Archive (People, Companies, Ideas, Research with typed related: links) plus recall of prior work sessions, ISAs, and conversations. Search, add, harvest, develop, ingest, distill, graph-navigate, recall. USE WHEN cortex, knowledge, knowledge base, search…

danielmiessler/LifeOS · 196 tokens

agent-memory

../../../engineering/agent-memory/skills/agent-memory/SKILL.md.

alirezarezvani/claude-skills · 0 tokens

memory

Use when the user asks to remember, recall, forget, update, search, or inspect durable OpenSquilla memory, including profile facts in USER.md and long-term notes in MEMORY.md or memory//.md.

opensquilla/opensquilla · 44 tokens

ha-data-stores

Map of Hope Agent's local data stores and safe read-only query workflow. Use when the user asks where Hope Agent stores data, wants to inspect sessions/messages/memory/logs/background jobs/knowledge indexes/settings, asks the model to query local app data, or debugging requires checking persisted state. Trigger…

shiwenwen/hope-agent · 115 tokens