Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Wdi Prune Or Archive

ASecurity

Clean up completed closed specs by archiving to `.archive/specs/` or pruning from disk, wrapping lifecycle.py with fail-closed safety. Invoke as `/wdi-prune-or-archive [--spec <id>|--all-closed] [--archive|--prune] [--dry-run]` or bare `/wdi-prune-or-archive` for interactive selection.

4 stars
0 votes
0 copies
0 views
Added 9/23/2026
developmentshellgit

Security Analysis

A100/100

Scanned 9/24/2026

Install to Claude Code

$npx -y skills add wiradeltaid/wdi-method --skill wdi-prune-or-archive --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Wdi Prune Or Archive?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Wdi Prune Or Archive
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/wiradeltaid-wdi-prune-or-archive/badge)](https://www.skillsdirectory.com/skills/wiradeltaid-wdi-prune-or-archive)

More formats (shields.io, HTML) on the badges page.

Download with Pro
Files
SKILL.md
---
name: wdi-prune-or-archive
description: Clean up completed closed specs by archiving to `.archive/specs/` or pruning from disk, wrapping lifecycle.py with fail-closed safety. Invoke as `/wdi-prune-or-archive [--spec <id>|--all-closed] [--archive|--prune] [--dry-run]` or bare `/wdi-prune-or-archive` for interactive selection.
disable-model-invocation: true
---

# WDI Prune or Archive

Standalone housekeeping skill for closed specifications. Moves completed spec directories to
`.archive/specs/<spec-folder>/` or prunes completed tickets from disk using `lifecycle.py`, while
strictly preserving requirement traceability and RTM metadata in `.control/registry/specs.yaml`.

- `/wdi-prune-or-archive` — interactive mode: discovers closed specs in `.scratch/`, presents options,
  and confirms before execution.
- `/wdi-prune-or-archive --spec <id> --archive` — archives `<id>` to `.archive/specs/<spec-folder>/`.
- `/wdi-prune-or-archive --spec <id> --prune` — removes completed `<id>` folder from disk and git.
- `/wdi-prune-or-archive --all-closed --archive` — archives all closed specs in `.scratch/`.
- `/wdi-prune-or-archive --all-closed --prune` — prunes all closed specs in `.scratch/`.
- Add `--dry-run` to any command to simulate without modifying files or git index.

## 0. Preconditions

1. Confirm `.control/registry/index.yaml` exists in the repo root. If it does not, this is not a WDI
   Method product repo — report that and stop.
2. Verify git working tree is clean (`git status --porcelain`). If uncommitted changes exist, stop and
   instruct the maintainer to commit or stash changes before running real archive/prune operations.
   (Exception: `--dry-run` permits an uncommitted tree with an advisory note).

## 1. Discovery & Mode Selection

### A. Interactive Mode (invoked bare: `/wdi-prune-or-archive`)

1. Find closed candidate specs: inspect `.scratch/` directly or run `uv run .constitution/method/scripts/lifecycle.py --dry-run`
   (or grep `specs.yaml` for `status:\s*closed` — MUST NOT dump the entire historical `specs.yaml` into context).
2. Find all specs with `status: closed` whose directory currently resides under `.scratch/`:
   - If no closed specs reside in `.scratch/`: report that `.scratch/` is already clean of closed specs
     and stop.
   - If closed specs are found: list each candidate with its ID, title/release, and folder path.
3. Present the three housekeeping choices to the maintainer:
   - **Archive:** Moves the directory to `.archive/specs/<spec-folder>/` via `git mv` and updates
     `spec_folder` in `specs.yaml`. Preserves full historical audit provenance.
   - **Prune:** Removes the directory via `git rm -r` while keeping the spec row and ticket index
     intact in `specs.yaml`. Recommended when git commit history is sufficient.
   - **Defer:** Leave the directories untouched and exit.
4. Ask whether to apply the action to all eligible specs (`--all-closed`) or a specific `--spec <id>`.
5. Display the exact command that will be executed and request confirmation.

### B. Direct Flag Mode

Parse arguments and map them directly to `lifecycle.py` flags:
- If a positional spec ID is supplied (e.g. `/wdi-prune-or-archive SPEC-1 --archive`), map it to `--spec SPEC-1`.
- Ensure exactly one action is specified: `--archive` OR `--prune`.
- Ensure exactly one scope is specified: `--spec <id>` OR `--all-closed`.
- Pass `--dry-run` if specified.

## 2. Execution via Lifecycle Script

All physical git and filesystem operations **MUST** be executed through `lifecycle.py` to guarantee
atomicity, validation, and rollback:

```powershell
uv run .constitution/method/scripts/lifecycle.py [arguments]
```

`lifecycle.py` enforces authoritative preflights:
- Rejects open or active specs (`status: closed` required).
- Rejects paths outside authorized spec roots.
- Rejects folders currently checked out by active git worktrees.
- Rejects folders cited by active or permanent `.control/memlog/` artifact records.
- Runs post-operation validation (`validate.py --check`) and automatically rolls back all staged and
  worktree changes if validation fails.

## 3. Report and Stop

Display the result of the lifecycle operation verbatim, report updated `spec_folder` paths or pruned
directories, and stop. MUST NOT proceed into further coding, commits, or other skill invocations.

Attribution

wiradeltaidwiradeltaid
View sourceMore from wiradeltaid →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

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

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Browser Extension Developer

Use this skill when developing or maintaining browser extension code in the `browser/` directory, including Chrome/Firefox/Edge compatibility, content scripts, background scripts, or i18n updates.

284722 votes

Seo Optimizer

SEO optimization with keyword analysis, readability assessment, technical validation, content quality. Use for search rankings, blog posts, content audits, or encountering keyword density, readability scores, meta tags, schema markup errors.

2192 votes

Google Official Seo Guide

Official Google SEO guide covering search optimization, best practices, Search Console, crawling, indexing, and improving website search visibility based on official Google documentation

1862 votes

Tanstack Start

Build a full-stack TanStack Start app on Cloudflare Workers from scratch — SSR, file-based routing, server functions, D1+Drizzle, better-auth, Tailwind v4+shadcn/ui. Use whenever the user mentions TanStack Start, asks to scaffold a full-stack Cloudflare app with SSR, wants an SSR dashboard, or asks for a React 19 + Cloudflare Workers app with file-based routing and server functions — even if they don't name TanStack Start specifically. No template repo — Claude generates every file fresh per ...

9881 votes

Pentest

PTES-aligned adversarial security audit for backend, frontend, and mobile applications. Produces a CVSS-scored Hacker Report with verified PoCs and phased remediation.

5491 votes
View all in development →