Skip to content
Agentmart
Submit a tool

unix-clean

Archive completed ticket latches and reset .state/ directory to clean slate (bounded active slots, archive rotated at 20 logs).

Skill by john20xdoe

IndexedMIT
Write a review

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/john20xdoe-unix-clean

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

Archive completed ticket latches and reset .state/ directory to clean slate (bounded active slots, archive rotated at 20 logs). Usage: /unix-clean

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

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/unix-clean

What's inside

Skill name
unix-clean
Description
Archive completed ticket latches and reset .state/ directory to clean slate (bounded active slots, archive rotated at 20 logs). Usage: /unix-clean
License
MIT
Instructions
12 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# Unix State Clean

## Direct Execution Protocol
Execute latch cleanup directly using native workspace file tools (`write_to_file`, `view_file`, `list_dir`).
Do NOT invoke shell commands (`run_command`) or python scripts—native tool execution avoids IDE execution permission prompts.

---

## Step-by-Step Procedure

### 1. Read Active Ticket
Check `.state/10_ticket.md`:
* If present, read `Ticket-ID` from header (fallback: `previous`).
* If not present, skip archiving step.

### 2. Archive Active Latches
If `.state/10_ticket.md` exists:
* Read contents of each active latch on disk (`10_ticket.md`, `20_plan.md`, `30_tdd_red.md`, `40_impl_green.md`, `99_next_action.md`).
* Append to `.state/archive/<ticket-id>.log`:
  ```
  === ARCHIVED <ISO-timestamp> ===
  === <filename> ===
  <content>
  ```
* Enforce rotation cap: if `.state/archive/` contains > 20 `.log` files (excluding `_rotated.log`), append oldest beyond 20 to `_rotated.log` and delete them.

### 3. Clear Transient Slots
* Delete existing transient files:
  - `.state/10_ticket.md`
  - `.state/20_plan.md`
  - `.state/30_tdd_red.md`
  - `.state/40_impl_green.md`
  - `.state/99_next_action.md`
* Delete any files inside `.state/artifacts/`.
* **Preserve** immutable files: `.state/00_governance.md`, `.state/.gitignore`, `.state/Makefile`.

### 4. Confirmation Output
Confirm cleanup:
```
Active latches cleaned.
```

---

## CLI Fallback
If invoked outside agent environment or in shell scripts:
```bash
python3 ~/.gemini/config/skills/unix-primitives/scripts/state_manager.py clean
```

From john20xdoe/unix-primitives, MIT.

Signals

Stars
0
Forks
0
Open issues
0
Last commit (this folder)
Oct 22, 2026 (8 days ago)

From GitHub (fetched Oct 24, 2026).

Details

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

More from john20xdoe

Cite this page

unix-clean skill. Agent Mart. https://agentmart.dev/skills/john20xdoe-unix-clean (last updated 2026-10-24)