Skip to content
Back to skills

Second Wind

ASecurity

Save a full handoff of this session and free the context. The Stop hook checks the handoff on disk and then sends /clear through HERDR when nothing runs in the background, or /compact when /loop, cron, /goal, background agents or monitors run, so they keep running. Typed by the operator, picked from the threshold menu, or started by the Stop hook in unattended mode. For an always-clear reset use /clear-handover; for a save without freeing context use /handover.

  • 2 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 17, 2026
ai-agentspythongobash

Works with

  • terminal

Security analysis

A100/100

Scanned November 26, 2026

npx -y skills add HEADING-OS-Official/heading-os --skill second-wind --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Second Wind?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Second Wind
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/heading-os-official-second-wind/badge)](https://www.skillsdirectory.com/skills/heading-os-official-second-wind)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: second-wind
description: "Save a full handoff of this session and free the context. The Stop hook checks the handoff on disk and then sends /clear through HERDR when nothing runs in the background, or /compact when /loop, cron, /goal, background agents or monitors run, so they keep running. Typed by the operator, picked from the threshold menu, or started by the Stop hook in unattended mode. For an always-clear reset use /clear-handover; for a save without freeing context use /handover."
disable-model-invocation: false
allowed-tools: "Read, Bash(date:*), Bash(.venv/bin/python scripts/checkpoint-paths.py:*)"
argument-hint: "[note]"
metadata:
  author: Misha Hanin
  email: misha.hanin@headingos.com
  version: "1.0"
x-heading-capability:
  what: >
    Saves a full handoff and frees the context without stopping background
    work: /clear when nothing runs in the background, /compact otherwise.
  how: >
    Type /second-wind [note], or pick it from the threshold menu. The skill
    writes the handoff with one command; the Stop hook verifies it and sends
    the command through HERDR.
  when: >
    At the 45% or 55% menu, or whenever the context feels heavy. For an
    always-clear reset use /clear-handover; for a save only use /handover.
x-heading-routing:
  category: Operations
  label: /second-wind [note]
  triggers:
    - NEVER auto-trigger from a message. Explicit `/second-wind [note]`, the threshold menu, or the Stop hook's unattended continuation.
  exclusions:
    - always clear -> /clear-handover
    - save without freeing context -> /handover
  router: manual
---

# /second-wind

Save a full handoff, then free the context. The Stop hook
`.claude/hooks/checkpoint-offer.py` decides HOW, at the moment it runs, never
at the moment the menu was shown:

- nothing in the background: `/clear`, and a new session reads the handoff;
- `/loop`, cron, `/goal`, background agents or monitors running, or a state the
  hook cannot read: `/compact`, and the same session reads the handoff.
  `/compact` keeps them running; `/clear` would stop them.

A skill cannot type a built-in command. So this skill does the writing, and the
hook does the sending after it has checked the handoff on disk. The design and
its measurements: the spec `2026-10-14-second-wind-design/spec.md` under the
registry name `drafts`.

## Procedure

### Step 0a - Can the hook send?

```bash
.venv/bin/python scripts/checkpoint-paths.py --preflight
```

It prints one line and writes nothing. On exit 1, tell the operator that line
in one sentence. Then go on, because the handoff is still worth saving; the
operator types the command after you save it.

### Step 0 - Cold read, before the start stamp

Run the cold read now: items 1 to 4 of Step 2 of
`.claude/skills/handover/SKILL.md`. First read `handoff_mode` from
`.venv/bin/python scripts/checkpoint-paths.py --json`, which writes nothing. In
`assembled` mode the draft is the short part, and the records file goes in as
context, as that step says. Write the draft and dispatch the `goldfish`
agent. Then triage its reply and apply every FIX to the draft. The agent runs
in the background, and its reply arrives only after a turn ends. So this step
may take a turn of its own.

Do it before Step 1, never after it. Step 1 records the start, and the Stop hook
checks the archive at the first turn end after that start, once. MEASURED
2026-10-27: a run dispatched the agent after Step 1 and ended its turn to wait.
The hook found no archive, 94 s before the write, and consumed the request.

### Step 1 - Get this session's paths, in second-wind mode

```bash
.venv/bin/python scripts/checkpoint-paths.py --kind second-wind
```

`--kind second-wind` names the archive `_handoff_second-wind_` and records the
moment this run started. The Stop hook accepts only a handoff written after
that moment. Use every path exactly as printed.

### Step 2 - Write the handoff with one command

Follow Step 2 of `.claude/skills/handover/SKILL.md` exactly, with `--kind
second-wind`, and pass the draft from Step 0 on stdin; do not run the cold read
again. Run Steps 1, 2 and 3 in ONE turn, with no turn end between them. Read `.claude/skills/handover/references/handoff-template.md`
first. Use the title `# Handoff - second-wind` and `Trigger: second-wind`. The
next session may have nothing else, so fill every section, and run the
template's self-check. If `$ARGUMENTS` is not empty, put it under `## User note`.

Two sections are required here and the hook refuses to send anything without
the first:

<!-- Russian on purpose: the Russian resume lines the operator reads after /clear. -->
- `## Safe resume`: the three lines the template gives, `none` where a line has
  nothing. List open tasks from the task list under `Next action` or `## Next
  steps`, because `/clear` loses the task list.
- `## Resume`: two or three lines in the operator's language, shown on screen
  after `/clear` before he types anything. When he writes Russian, open with
  "Продолжаю с того места, где остановились: ...". No paths and no pinned
  items here: the hook adds the working file's two paths itself, from
  `## Working file`.
- `## Working file`: one line with the full Linux path, nothing else. Add it
  when the operator acts on a main file next (drafts, a deliverable, a report).
  After `/clear` the hook shows it and its Windows path after the
  line that says where the work stopped. Leave the section out when there is no such file.

<!-- Russian on purpose: the Russian resume lines the operator reads after /clear. -->
```bash
.venv/bin/python scripts/checkpoint-paths.py --write --kind second-wind <<'HANDOFF'
# Handoff - second-wind
...the sections from the template, Safe resume included...

## Working file

<the full Linux path of the file the operator acts on next; leave this section out when there is none>

## Resume

Продолжаю с того места, где остановились: <the objective, in one clause>.
Остановились: <where the work stopped>.
Дальше: <the next step>.
HANDOFF
```

A non-zero exit names what is wrong; fix it and run the command again. A
stderr line saying "the Stop hook will refuse to reset" names what the
`## Safe resume` block lacks; add it and run the command again.

### Step 3 - End the turn

Reply with ONE line: the full path of the archive. Then stop. The Stop hook
runs when this turn ends, checks the files and the background, sends `/clear`
or `/compact`, and prints one sentence. It says sent, not sent yet (it is
tried again at the next pause), or not sent (type the command yourself). Nothing is lost in
any of the three.

When it says "not sent yet", the hook tries again at the next quiet pause.
That covers three causes: the operator typed, no terminal was found, or herdr
did not answer (HOS-315, HOS-386). It sends while the handoff is
still fresh. A stale handoff (3 events or 60 minutes of work) is rewritten
first: Steps 1 and 2, without the cold read. After three such
refusals in a row it stops and says so.

## NEVER

- Never type or request `/clear` or `/compact` yourself
- Never write the archive, a pointer or a header line by hand; `--write` writes them
- Never write into another session's pointer directory
- Never end the turn between Step 1 and the write in Step 2
- Never continue other work after Step 3

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.