afc:clean

afc:clean is a skill for Claude Code from jhlee0409/all-for-claudecode. It costs 12 tokens per session (1,553 once invoked), scanned A, original, MIT.

A cleanup phase for a feature-development pipeline. It removes that feature’s pipeline files, scans for unused code, checks continuous integration (automated build and test checks), updates memory, and releases the pipeline lock.

In plain words
What is it for?
Cleaning up after a feature pipeline, removing its temporary specifications, checking for dead code, and running final CI verification.
Why use it?
It finishes work left by earlier planning, implementation, and review phases while limiting cleanup to the selected feature’s files. It also checks that the project remains in a usable state.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: model in frontmatter; reads .claude/ paths.

Part of the afc plugin — 29 skills, 12 agents, 19 hooks shipped together

Good fit Cleaning up after a feature pipeline, removing its temporary specifications, checking for dead code, and running final CI verification.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jhlee0409/all-for-claudecode/clean
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add jhlee0409/all-for-claudecode --skill clean
Clone the repo
git clone --depth 1 https://github.com/jhlee0409/all-for-claudecode

Made for: Claude Code.

Or install afc, the plugin that ships this one along with the rest of its 29 skills, 12 agents, 19 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for afc:clean

README.md
[![agentmods](https://agentmods.dev/badge/skills/jhlee0409/all-for-claudecode/clean/github.svg)](https://agentmods.dev/skills/jhlee0409/all-for-claudecode/clean)
Your own site
<a href="https://agentmods.dev/skills/jhlee0409/all-for-claudecode/clean"><img src="https://agentmods.dev/badge/skills/jhlee0409/all-for-claudecode/clean/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for afc:clean

Your own site · 80×15
<a href="https://agentmods.dev/skills/jhlee0409/all-for-claudecode/clean"><img src="https://agentmods.dev/badge/skills/jhlee0409/all-for-claudecode/clean.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 12 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,553 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00012 $0.01553
Opus 5 $0.00006 $0.00776
Sonnet 5 $0.00002 $0.00311
Haiku 4.5 $0.00001 $0.00155

Measured 9d ago against content hash c01f2dfebb7f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

afc:clean scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/clean/SKILL.md · 131 lines

How it starts

The opening of the file, as written. The whole thing — 131 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/afc:clean — Pipeline Cleanup

Runs the clean phase independently: artifact cleanup, dead code scan, CI verification, memory update, and pipeline flag release. Equivalent to Phase 5 of /afc:auto. Use after manually running spec/plan/implement/review phases.

Arguments

  • $ARGUMENTS — (optional) Feature name to clean up. Defaults to the currently active pipeline feature.

Prerequisites

  • Pipeline must be active (afc_state_is_active) OR a feature name must be provided
  • If pipeline is active, the current phase should be review or later

Execution Steps

1. Resolve Feature

"${CLAUDE_SKILL_DIR}/../../scripts/afc-pipeline-manage.sh" phase clean
  • If pipeline is active: read feature from state
  • If $ARGUMENTS provides a feature name: use that (for manual cleanup without active pipeline)
  • If neither: exit with error — "No active pipeline and no feature specified. Usage: /afc:clean [feature-name]"

Set PIPELINE_ARTIFACT_DIR = .claude/afc/specs/{feature}/

2. Artifact Cleanup (scope-limited)

  • Delete only the .claude/afc/specs/{feature}/ directory created by the current pipeline
  • If other .claude/afc/specs/ subdirectories exist, do not delete them (only inform the user of their existence)
  • Do not leave pipeline intermediate artifacts in the codebase

3. Dead Code Scan

Prefer external tooling over LLM judgment for dead code detection:

  • Run {config.gate} / {config.ci} — most linters detect unused imports/variables automatically
  • If the project has dedicated dead code tools (e.g., eslint --rule 'no-unused-vars', ts-prune, knip), use them first
  • Only fall back to LLM-based scan for detection that static tools cannot cover (e.g., unused exports across module boundaries)
  • Remove empty directories from moved/deleted files
  • Detect unused exports (re-exports of moved code from original locations etc.)

4. Final CI Gate

  • Run {config.ci} final execution
  • Auto-fix on failure (max 2 attempts)

Read the full file on GitHub · 131 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 131 lines · 12 tokens per session scan A c01f2dfebb7f

Subscribe to this mod's changes

afc:clean is a skill published in the GitHub repository jhlee0409/all-for-claudecode (7 stars, last pushed 5mo ago), licensed MIT. It adds 12 tokens to every session and 1,553 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.