# Cleanup Artifacts

> Use in /implement at the draft→ready boundary, before publish-pr's squash, to delete this branch's transient plan/spec artifacts so they don't ship in the PR. Deletes .claude/plans/<branch>.md (flattened name). Distinct from repo-setup's prune of previously-merged branches' artifacts.

- **Type:** Skill
- **Install:** `agentstack add skill-ethanaubuchon-dossier-tradecraft-cleanup-artifacts`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [ethanaubuchon](https://agentstack.voostack.com/s/ethanaubuchon)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [ethanaubuchon](https://github.com/ethanaubuchon)
- **Source:** https://github.com/ethanaubuchon/dossier-tradecraft/tree/main/skills/cleanup-artifacts

## Install

```sh
agentstack add skill-ethanaubuchon-dossier-tradecraft-cleanup-artifacts
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Cleanup Artifacts

Deletes **this** branch's transient working artifacts — the plan file and any spec scratch — at the draft→ready boundary, so they don't ship in the PR. One of `/implement`'s two distinct cleanups:

- `repo-setup` prunes *previously-merged* branches' worktrees + plan files (at setup).
- `cleanup-artifacts` deletes *this* branch's plan file (at finalize).

Runs **before** `publish-pr`'s squash.

## Input

- **branch** — the current feature branch.

## Steps

1. Delete this branch's plan file: `rm -f .claude/plans/.md`, using the `/`→`-` flattened branch name (`feat/foo` → `.claude/plans/feat-foo.md`, matching `plan-file`).
2. Delete any other transient spec/scratch artifacts the project marks for this branch.

## Output / contract

- **In:** the branch.
- **Out:** working tree with this branch's plan/spec artifacts removed.
- **Side effects:** deletes the plan file. With the default **gitignored** plan location the deletion isn't part of the diff (pure housekeeping); if a project **tracks** plan files, the deletion is a real change — which is why it must run *before* `publish-pr`'s squash, so it folds into the single commit (no plan file in PR history). `publish-pr` stages this deletion with `git add -A` before committing — without that staging the `reset --soft` index would re-commit the tracked plan file.

## Project overrides

- **Plan-artifact location** — a repo that stores plans/specs elsewhere (e.g. `docs/plans/`) overrides the path; keep the flatten rule consistent with `plan-file` and `repo-setup`.

## Future scope

- (none beyond per-project artifact locations.)

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [ethanaubuchon](https://github.com/ethanaubuchon)
- **Source:** [ethanaubuchon/dossier-tradecraft](https://github.com/ethanaubuchon/dossier-tradecraft)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-ethanaubuchon-dossier-tradecraft-cleanup-artifacts
- Seller: https://agentstack.voostack.com/s/ethanaubuchon
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
