agentleFS
armenrarmenr/modelmux/.claude/skills/flush/SKILL.md

flush

Skill2 starsChanged 4 months agoMITView on GitHub

Mid-session housekeeping. The main agent updates .agent-docs/now/{status,work-plan,open-questions}.md + log.md to current reality, then continues working in the same session. Does NOT regenerate handoff.md, does NOT archive, does NOT auto-commit. Use when work has progressed and now/* has drifted but you're NOT ending the session.

2 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions2 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 2

    1. ogham-mcp/ogham-superpowers-bridge★ 2same name
    2. choiyounggi/auto-velog★ 1same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository11 other files it gives its agents.

The file

Show its rules and text

We split this skill into the rules it gives an agent

18 rules. About 0 are common, 7 are distinctive, and 11 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 11

    Very specific

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

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

    Stop. File the paperwork. Continue.

    line 12
  2. Distinctive:

    After completing a meaningful chunk of work (a commit, an ADR write, a design discussion, a deliverable landed)

    line 18
  3. Very specific:

    When now/status.md no longer reflects what's actually true

    line 19
  4. Distinctive:

    Before context-switching to a new sub-task within the same session

    line 20
  5. Distinctive:

    When the user asks for "checkpoint" / "let's update state" / "flush" / "any paperwork?"

    line 21
  6. Very specific:

    Before context compaction → use /handoff (regenerates handoff.md + archives — the cross-session bridge)

    line 25
  7. Very specific:

    Before session-end / /clear → use /handoff

    line 26
  8. Very specific:

    If the session touched runtime-facing code, gather minimal verification (a bun run build / bun run lint / bun test test/ result you already …

    line 39
  9. Very specific:

    Update last-modified to today's local date (date +%Y-%m-%d, NEVER date -u — see CONVENTIONS.md).

    line 54
  10. Distinctive:

    Add new questions surfaced this session

    line 65
  11. Very specific:

    Don't wait for /handoff — by then the detail has decayed.

    line 92
  12. Very specific:

    Does NOT regenerate handoff.md (that's /handoff's job)

    line 108
  13. Very specific:

    Does NOT archive to .claude/handoffs/

    line 109
  14. Distinctive:

    Does NOT do cross-session staleness checks — you're still in-session

    line 111
  15. Distinctive:

    All run in the main agent (foreground).

    line 122
  16. Very specific:

    Do NOT run /flush mid-destructive-operation.

    line 128
  17. Very specific:

    Do NOT use /flush as a substitute for /handoff before session-end.

    line 129
  18. Distinctive:

    Do NOT include secret values or regulated / user data.

    line 130

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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

/flush — Mid-session checkpoint (foreground)

Stop. File the paperwork. Continue. Stripped-down sibling of /handoff for the "we're staying in this session" case.

Foreground execution. The agent WITH the session context does the work. See "Why not backgrounded" at the bottom.

When to invoke

  • After completing a meaningful chunk of work (a commit, an ADR write, a design discussion, a deliverable landed)
  • When now/status.md no longer reflects what's actually true
  • Before context-switching to a new sub-task within the same session
  • When the user asks for "checkpoint" / "let's update state" / "flush" / "any paperwork?"

When NOT to invoke

  • Before context compaction → use /handoff (regenerates handoff.md + archives — the cross-session bridge)
  • Before session-end / /clear → use /handoff
  • For trivial updates (single-line edit) — just keep working
  • Repeatedly with nothing material to flush — skip

Steps

1. Pull current state (cheap)

git log --oneline -5    # recent commits
git status -s           # working tree

If the session touched runtime-facing code, gather minimal verification (a bun run build / bun run lint / bun test test/ result you already have; a the TypeScript language server reachability output for a wiring claim) — only what's relevant to the chunk. Don't over-fetch.

2. Rewrite .agent-docs/now/status.md in place

Fleeting doc — overwrite, don't append. Target 80-120 lines. Sections:

  • TL;DR (2-3 sentences synthesizing what changed)
  • Branch (latest commits, ahead/behind, push status)
  • Build / runtime state (workspace/package snapshot + delta-since-prior-status, if relevant)
  • Phase status table (if mid-procedure)
  • Working tree (clean or what's dirty + why)
  • Gates (bun run build / bun run lint / bun test test/ status, toolchain delta)
  • Doc/context system (state)
  • What this means for next steps (pointer to work-plan + handoff)

Update last-modified to today's local date (date +%Y-%m-%d, NEVER date -u — see CONVENTIONS.md).

3. Update .agent-docs/now/work-plan.md if priorities or order changed

  • Mark completed items ✅
  • Surface the IMMEDIATE NEXT ACTION at the top if it shifted
  • Bump last-modified (local)

4. Update .agent-docs/now/open-questions.md if questions resolved or surfaced

  • Move resolved questions to "Recently resolved" with a closure reference (commit hash, ADR-NNNN, runbook section, log entry) — or a short inline ✅ RESOLVED → ADR-NNNN
  • Add new questions surfaced this session
  • Bump last-modified (local)

5. Append entries to .agent-docs/log.md

Newest at top:

## [YYYY-MM-DD] flush | <one-line summary of the chunk just flushed>

<2-3 lines describing what happened>

Plus discrete-sub-work entries as warranted (decision | ..., memory | ..., work | ...).

5.5 Capture anti-assumptions + corrections AS THEY ACCUMULATE (the capture-at-the-moment defense)

/flush is the mid-session net for the knowledge classes /handoff formalizes — capture them NOW so they survive to the next checkpoint instead of living only in chat:

  • Corrections/reversals to filed docs decided this chunk → edit the doc IN PLACE (dated; never leave it wrong). The biggest loss class.
  • Anti-assumptions / traps discovered → a one-liner in status.md or log.md: "looks like X → actually Y" (a unit that looks dead but is load-bearing; a misleading name; a tooling trap; a cross-layer drift the obvious grep misses).
  • Reusable recipes / gates that worked → capture verbatim, as a labeled greppable block (esp. env/build incantations: env vars, flags, version/toolchain pins, lib paths — the recipe IS the reproducibility).
  • Hands-on artifacts / scratch prototypes built OUTSIDE the repo (scratch dirs, throwaway packages, spike harnesses) → note location + pass/fail verdict + keep-or-clean in status.md/log.md, or promote a durable spike to experiments/ (Full profile). They're in no git tree → silently lost otherwise.
  • Ephemeral workflow / temp-dir outputs worth keeping → rescue the synthesis to reference/ (or note the durable transcript path + resume command); temp dirs clear.
  • Operator rulings this chunk → the work-plan decisions area + log.md decision | ....
  • Inter-party obligation changes this chunk (a promise made / received, a receivable settled) → if now/obligations.md exists, update it in place (ADR-0012) — the mid-session mutate that keeps the ledger true between handoffs; otherwise the ledger rides the handoff ## Obligations section, swept at /handoff.

Don't wait for /handoff — by then the detail has decayed.

6. Index lint (OPTIONAL — Standard profile only)

If the doc linter hook is installed (Standard profile), run python3 .claude/hooks/lint-docs.py --root .agent-docs. For any drifting dir THIS session touched, fix the drift as a byproduct (entry shape per CONVENTIONS.md index template). Untouched dirs: leave for /handoff. If fixed, append a lint | ... op line to log.md. If the hook isn't installed, skip this step.

7. Report

  • "/flush complete — N files updated"
  • One-line summary per file changed
  • "Continuing with <next action>" — keep momentum

DO NOT auto-commit. The operator stays in control of git.

What /flush deliberately does NOT do

  • Does NOT regenerate handoff.md (that's /handoff's job)
  • Does NOT archive to .claude/handoffs/
  • Does NOT auto-commit
  • Does NOT do cross-session staleness checks — you're still in-session

Relationship to /orient, /sitrep, and /handoff

SkillWhenWhat it does
/orientSession start, after time awayReads now/handoff.md, checks staleness + state-file health, surfaces a 12-line brief
/flushMid-session checkpointUpdates now/* + log.md (UPDATE-IN-PLACE), keeps going
/sitrepBefore risky ops, phase gates, pre-compactionWrites a WRITE-ONCE 10-point zero-loss checkpoint to checkpoints/ (dead-ends + rejected alternatives)
/handoffSession end, pre-compaction, ~80% contextUpdates now/* + log.md, consumes the latest sitrep, regenerates handoff.md, archives prior

All run in the main agent (foreground). None delegates to subagents.

/flush vs /sitrep. The lightweight "keep now/* current and keep working" role is /flush (editable, UPDATE-IN-PLACE); the zero-loss "freeze the investigation rationale" role is /sitrep (WRITE-ONCE to checkpoints/, never edited, mandated dead-ends + rejected-alternatives). Use /flush for routine drift; use /sitrep when losing the conversation would lose reasoning you cannot cheaply re-derive.

Anti-patterns

  • Do NOT run /flush mid-destructive-operation. Wait for it to finish.
  • Do NOT use /flush as a substitute for /handoff before session-end.
  • Do NOT include secret values or regulated / user data. Reference paths.
  • Do NOT delegate /flush to a sub-agent. See below.

Why not backgrounded (design lesson)

A sub-agent has zero session context — the whole point of /flush is to capture what the main agent has been doing. Briefing a sub-agent on what to write IS the flush work. Sub-agent permissions are also narrower (Write often denied). The async UX gain is illusory. Foreground is the right shape; the cost is a few-second pause, the benefit is reliability. /handoff follows the same principle.

Design rationale

The session-lifecycle contract lives in standing-rules-core.md (§Context lifecycle). /flush is the capture-at-the-moment primary defense; the /handoff conversation-residue sweep is the net.

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.