agentleFS
trevorbyrumtrevorbyrum/claude-skills-suite/skills/save/SKILL.md

save

Skill1 starsChanged 5 months agoMITView on GitHub

Saves session state, optionally commits and clears. Refreshes project-plan status and snapshots to the local artifact DB. Invoke with /save or when user says "wrap up", "save session", "done for today", or "compact".

36 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use load, ingest and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • TheLatentSpaceLabSkill

    load

    Load a document into memory for RAG

    Also in 4 projects that use this

  • JaimeGBASkill

    ingest

    Digest an external source (article, paper, transcript, URL, book chapter) and integrate its content into the knowledge base

    Also in 8 projects that use this

  • ArtemXTechSkill

    query

    Query data from this vault. USE WHEN user asks about projects, clients, tasks, daily notes. Use grep to extract frontmatter - do NOT read full files.

    Also in 4 projects that use this

  • szweibelSkill

    idea

    Generate a wide field of options when the user is brainstorming, exploring, expanding, or pressure-testing — not recommending or implementing

    Also in 3 projects that use this

  • GoogleSkill

    dashboard

    Configures and launches the GKE Capacity & Triage Dashboard scoped to a GCP project ID, GKE cluster name, or target ML workload ID. Uses the configure-and-launch-dashboard action and launch-workload-dashboard workflow to verify local dashboard health, discover cluster capacity, trigger live scans, and generate deep-linked URLs. Use when the user types "/dashboard", says "launch dashboard", "open dashboard", "show capacity", or "view triage dashboard" with a project, cluster, or workload. Don't use for general workload log querying or automated failure attribution (use the troubleshoot skill).

    Also in 4 projects that use this

  • Microsoft AzureSkill

    lint

    Run all linting and spell checking for TypeScript and Rust code. Run this before committing to catch style issues, clippy warnings, and misspellings.

    Also in 5 projects that use this

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 2 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 31 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If ambiguous → AskUserQuestion: "Compact only, or commit + clear?"

    line 43
  2. Distinctive:

    Run the light path inline.

    line 49
  3. Distinctive:

    Skip if: no work units completed and no decisions changed.

    line 62
  4. Very specific:

    All snapshots written by /save and its hooks share the save skill namespace:

    line 75
  5. Very specific:

    Before completing, read and follow ../../references/cross-cutting-rules.md.

    line 128

“Common” is measured: kept by at least 6 in 10 of the 31 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Save

Preserve session state before compacting or clearing context. Refreshes project-plan.md status if work was completed during the session. Two end-states:

  • Compact (default) — snapshot to DB, then /compact
  • Clear — /github-sync → snapshot to DB → /clear

A heavy doc-refresh (full architecture or scope rewrite) is on-demand only.

Inputs

  • Current session state (what was done, what's open, files touched)
  • project-plan.md, project-context.md in repo root
  • Prior compact records in artifact DB
  • Git working tree state

Outputs

  • db_write 'save' 'compact' 'claude/<ISO-8601>' "$COMPACT_CONTENT" — append-only snapshot
  • Updated project-plan.md status section (light) or both docs (heavy refresh)
  • /compact or /clear executed at the end

Instructions

Phase 0: Detect mode

Detect from the user's words:

TriggerMode
/save (no args)compact
"compact", "save session"compact
"wrap up", "done for today", "switching projects", "clear"clear
"update docs", "sync docs", "evolve"heavy refresh → ask: compact or clear after?

If ambiguous → AskUserQuestion: "Compact only, or commit + clear?"

HARD GATE (clear mode only) — WAIT FOR USER RESPONSE before any /github-sync or /clear. Clear-mode loses the conversation context; the user must explicitly accept that before any commit or clear runs. Compact mode does not need this gate (recoverable).

Phase 1: Doc refresh (light by default)

Run the light path inline. Heavy path only if user explicitly asked for doc update.

Light refresh:

  1. Detect completed work since last save. Compare:
    • Latest db_read_all 'iterate' 'changelog' entries (if /iterate ran)
    • Git log since last save compact label timestamp
    • Files modified in this session
  2. Update project-plan.md status section. Mark completed work units; add a one-line changelog entry at top:
    - YYYY-MM-DD: completed WU-N, WU-N+1; in progress: WU-N+2
  3. Update project-context.md only if a Key Decision changed in this session (rare). Otherwise leave alone.
  4. Skip if no work units completed and no decisions changed.

Heavy refresh (user asked explicitly): Read references/doc-refresh.md.

Phase 2: Branch to compact or clear

  • Compact mode → read references/compact.md
  • Clear mode → read references/clear.md

Both reference files cover: snapshot template, DB write, subagent review, and the terminal /compact or /clear.

DB Namespace Contract

All snapshots written by /save and its hooks share the save skill namespace:

Writerskillphaselabel pattern
User-invoked compact (this skill)savecompactclaude/<ISO-8601>
PreCompact hooksavesnapshothook/<ISO-8601>

/iterate Phase 1 reads save/compact and save/snapshot for session-wake context.

Legacy backwards-compat: Sessions saved before the meta-context-save → save rename are stored under the meta-context-save namespace. /iterate falls back to that namespace if save/compact or save/snapshot returns empty — no data loss from the migration.

References (on-demand)

  • references/compact.md — snapshot template, DB write, subagent review, /compact
  • references/clear.md — same chain plus prepended /github-sync, ends with /clear
  • references/doc-refresh.md — heavy doc-refresh (discussion, cross-check). Use only when the user asks explicitly.

Examples

User: /save
→ Compact mode. Phase 1 light-updates plan status. Phase 2 reads compact.md:
  snapshot, review, /compact.
User: I'm done for the day
→ Clear mode. Phase 1 light-updates. Phase 2 reads clear.md:
  /github-sync → snapshot → review → /clear.
User: update docs, we switched from REST to GraphQL
→ Heavy refresh. Phase 1 reads doc-refresh.md: discussion
  → context update → plan update → cross-check. Then ask: compact or clear?
  Then continue to Phase 2.
User: switching to a different project
→ Clear mode. Phase 1 light-updates current project (emphasis on
  "Next Task Context" in the changelog entry so returning is seamless).
  Phase 2 reads clear.md.
User: /save (working tree is clean, no work done)
→ Compact mode. Phase 1 skips (nothing changed). Phase 2 writes a minimal
  snapshot ("session was read-only, no changes"). /compact.

Before completing, read and follow ../../references/cross-cutting-rules.md.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.