Skip to content
Agentmart
Submit a tool

then-die

Close this terminal window after the work, if it all went fine.

Skill by victorrentea

IndexedUnlicense★ 2
Write a review

Chalk Labs

Need help deploying then-die?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/victorrentea-then-die

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Close this terminal window after the work, if it all went fine.

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found
Runs as
Shell scripts

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/then-die

What's inside

Skill name
then-die
Description
Close this terminal window after the work, if it all went fine.
License
Unlicense
Instructions
86 lines in SKILL.md · view on GitHub

Before installing

  • Ships executable scripts

Files (2)

  • SKILL.md
  • die.sh

SKILL.md (first lines)

# Then die

The user is walking away and does not intend to read this window again. Do the
work they asked for, and if it ended cleanly, close the window behind you.

## The bargain

Closing the window destroys everything on screen, including the summary you would
otherwise have written — anything printed after the closing command is never seen.
So the window may only close when there is **nothing left for the user to read**.

Finish the entire task first. Then, as the **very last tool call of the turn**:

```bash
bash "${CLAUDE_PLUGIN_ROOT}/skills/then-die/die.sh" close "one-line summary of what was done"
```

The summary argument is appended to `~/.claude/then-die.log` (timestamp, working
directory, text) — it is the only trace the user gets of a turn that closed itself,
so write it as the one line you would want to read tomorrow. The full transcript
survives too: `claude --resume` in the same folder reopens the session.

## Die only if ALL of these hold

- Every part of the requested work is **finished**, not partially done or deferred.
- Nothing failed: builds, tests, linters, deploys you ran all passed. If you did
  not run the checks the change obviously called for, that counts as unfinished.
- You have **no question** for the user — no ambiguity you resolved by guessing
  and wanted to flag, no "I assumed X, tell me if that's wrong".
- You have **no warning** — nothing surprising found, no risk introduced, no
  follow-up the user needs to know about, no unrelated breakage discovered.
- Nothing is still running that the user might want to watch, and no output
  matters that exists only on this screen.
- The turn produced no result that is **only** useful on screen (a diff you were
  asked to read out, an answer to a question, a table of findings). If the user
  asked to be *told* something rather than to have something *done*, stay.

## Otherwise: stay alive

If any condition fails, **do not run the script**. Report normally, ending with a
plain line saying why the window is still open — e.g. "Not closing: 2 tests fail"
or "Not closing: needs your call on the migration order". That sentence is the
whole point of staying; do not bury it.

Staying is never a failure of the skill. A window left open with a real question
in it is exactly right; a window closed over a broken build is the one outcome
that costs the user something.

## Rules

- Invocation is the user's alone (`disable-model-invocation`). Never wire it into
  a Stop hook and never offer it — a turn that "felt complete" is not a reason.
- Never close early to signal progress — one turn, one death, at the very end.
- Never claim success just to be allowed to close. If in doubt, stay.
- The turn's real outcome still gets written normally before the call, even though
  the window eats it: the transcript keeps it, and the user may resume.

## Checking

```bash
bash "${CLAUDE_PLUGIN_ROOT}/skills/then-die/die.sh" where
```

Dry run: prints the terminal app, the resolved tty, the login shell, the window id
and which method `close` would use — without closing anything. If it prints
`method: NONE`, the session's own window cannot be resolved; `close` will refuse
and change nothing, so just report the result normally.

## Notes

- macOS only. The window closed is **this session's own**, never the frontmost
  one — resolved by walking up the process tree to the outermost tty, so a second
  Claude session in another window is never killed by mistake.
- On Apple Terminal the tty is matched to a tab and the window is closed by its
  stable id. Everywhere else (iTerm2, Ghostty, WezTerm, Warp, VS Code's panel) the
  login shell on that tty is sent SIGHUP — that closes the tab, and the window with
  it if it was the last tab, without ever quitting the whole app. Closing VS Code
  itself, in particular, is not something this does.
- The kill is detached and delayed ~0.4s so the tool call returns success before
  the process running it disappears; the closing is never reported as a failure.
- Inside `tmux` this ends the client, not the tmux session — reattach and the work
  is still there.
- Overrides: `THEN_DIE_TERMINAL_APP`, `THEN_DIE_WINDOW_ID` (Apple Terminal window
  id), `THEN_DIE_LOG` (default `~/.claude/then-die.log`), `THEN_DIE_DELAY`.

From victorrentea/skills, Unlicense.

Signals

Stars
2
Forks
2
Open issues
0
Last commit (this folder)
Aug 14, 2026 (2 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
Unlicense
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from victorrentea

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get then-die running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying then-die?

CallGet help
Cite this page

then-die skill. Agent Mart. https://agentmart.dev/skills/victorrentea-then-die (last updated 2026-10-24)