Agent skill

Factory Clean

by tikalk in tikalk/adlc-team-skills

A skill your agent uses when the user asks to reclaim project disk space or clean up leftovers — inventories worktrees, containers, dependencies, and processes, reclaiming only user-approved items…

MITAuto-check passedDevelopment

Install Factory Clean

skills CLI
$ npx skills add tikalk/adlc-team-skills --skill factory-clean -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install tikalk/adlc-team-skills factory-clean --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/tikalk/adlc-team-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/factory/factory-clean .claude/skills/factory-clean && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
factory-clean
GitHub stars
141
Token cost
~1k tokens
SKILL.md length
556 words
Files
1
Skills in repo
44
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when the user asks to reclaim project disk space or clean up leftovers — inventories worktrees, containers, dependencies, and processes, reclaiming only user-approved items…

  • Works in 4 steps: Project Ingestion → Live-Work Classification → Inventory Scope → …
  • The user asks to reclaim project disk space
  • SKILL.md covers What this skill does, When to use and Operating Process
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Factory Clean is an agent skill from tikalk/adlc-team-skills. Use when the user asks to reclaim project disk space or clean up leftovers — inventories worktrees, containers, dependencies, and processes, reclaiming only user-approved items; read-only by default.

Its SKILL.md is about 1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Git worktrees. The repository describes itself as: Agent skills for the Agentic SDLC: team lifecycle (team-boot, team-learn, team-init, team-repair), software factory, evals, CDR lifecycle with confidence scoring, and… The licence is MIT.

When your agent uses it

  • The user asks to reclaim project disk space
  • Clean up leftovers — inventories worktrees
  • Reclaiming only user-approved items
  • Read-only by default

Example prompts

  • “/factory-clean”

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Project Ingestion
  2. Live-Work Classification
  3. Inventory Scope
  4. Report and Approval

What it can do on your machine

Read from SKILL.md and the folder at commit 2dbed36. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Factory Clean loads about 1k tokens when it runs. Until then it costs about 53 tokens; SKILL.md has 556 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~53
When it runs · the whole SKILL.md, loaded when a task matches
~1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from tikalk/adlc-team-skills at commit 2dbed36, republished under its MIT licence (© tikalk). 556 words, ~1,037 tokens.

Download SKILL.mdSave it as .claude/skills/factory-clean/SKILL.md (or your agent's skills folder).
name
factory-clean
description
Use when the user asks to reclaim project disk space or clean up leftovers — inventories worktrees, containers, dependencies, and processes, reclaiming only user-approved items; read-only by default.

factory-clean

What this skill does

factory-clean is the resource-reclamation engine of the software factory. It answers two questions and acts on the second: what is this project costing this machine right now, and what can be reclaimed without destroying work or interrupting an agent that is still running?

It operates as a Kind-B control-plane skill that reads the run registry, identifies active worktrees, and cleans up discarded/stale artifacts.


When to use

  • After multiple parallel runs, to see which worktrees are safely removable and reclaim disk space.
  • To clean up abandoned or stale locks and leases.
  • To verify that no uncommitted or unpushed work is accidentally lost.

When NOT to use:

  • For routine code development or PR review (use factory-mission or factory-review).
  • To force-delete unpushed git commits or uncommitted files (this skill never deletes unsafe work).

Operating Process

1. Project Ingestion

Determine the project in scope (defaulting to the current repository). Identify its state root, run registry, and worktree root (.adlc/worktrees/).

2. Live-Work Classification

Before displaying any candidate for deletion, read the local state file and the comment bus (if tracker-integrated, via comment bus and lease markers). Classify every resource into one of these five liveness states:

  • in use — owned by a run whose lease is live (heartbeat_ts + ttl_seconds > now), or a path held open by an active process. Protected. Never offer for deletion.
  • holds work — a worktree with uncommitted changes or commits not on its remote, or a registry entry marked retained. Protected. Show exactly what it holds. Never delete.
  • stale — registered, lease is past its TTL, nothing is unsaved, and no running process holds its path or has it as a working directory. Candidate for deletion.
  • orphan — no registry entry exists, but canonical containment plus deterministic project, skill, and run ownership labels prove this skill family created it. Candidate for deletion.
  • unknown — ownership or liveness cannot be determined. Protected. Display to the user but do not offer for deletion.

Note: Liveness classification is read from this skill family's own registry. Disclose in the report that other local processes or IDE checkouts are invisible and protected as unknown.

Show full SKILL.md (208 more words)Show less
3. Inventory Scope

Scan and measure the sizes/counts of:

  1. Skill Worktrees & Clones: worktrees under .adlc/worktrees/, managed clones under .adlc/clones/.
  2. Git Artifacts: stale worktree registrations, loose-object and pack sizes. (Local user branches and global git caches are ignored and protected).
  3. Project Dependency & Build Output: dependency directories (node_modules, .venv), build and distribution output, coverage and test artifacts.
  4. Skill State, Scratch, & Logs: per-run temporary directories, snapshots, and log files. (Saved identity mappings, project conventions, schemas, and configurations are always protected).
  5. Processes & Ports: dev servers, port-forwards, and background workers holding this project's ports or files.
4. Report and Approval
  1. Present the inventory grouped, each group sorted by reclaimable size, with a per-group and overall total. State clearly what is protected and why.
  2. Ask the user to select exact candidate identifiers within each group. Default to selecting nothing.
  3. Show the exact commands that will run.
  4. Re-verify liveness immediately before each deletion: if a run started or gained unsaved work since the inventory, skip it and report the conflict.
  5. Delete one item at a time, stopping at the first error rather than continuing through a broken assumption.
  6. Report what was reclaimed, what was skipped, and the actual space recovered (measured again, not assumed).

© tikalk, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/factory/factory-clean of tikalk/adlc-team-skills.

Open the folder on GitHubat commit 2dbed36

Compare with similar skills

Factory Clean next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Factory Clean compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Factory Clean this skilltikalk/adlc-team-skills141—~1kAutomated safety check: PassMIT
Finishing a Development Branchobra/superpowers296k5 repos~1.9kAutomated safety check: PassMIT
Migrate Core Code to Submodulestinyhumansai/openhuman41k—~2.6kAutomated safety check: PassGPL-3.0
Finishing A Development Branchfarm-fe/farm5.6k33 repos~1.8kAutomated safety check: PassMIT
Git Worktree Cleanuplobehub/lobehub83k—~2.8kAutomated safety check: PassCustom licence
Keep Codex Fastvibeforge1111/keep-codex-fast1.6k—~3.1kAutomated safety check: PassMIT

Similar skills

  • Walks the last step of a branch: confirm tests pass, detect the git environment, ask how to integrate, carry out your choice and clean up the worktree.

    296k GitHub starsUsed in 5 repos~1.9k tokens
    DevelopmentAuto-check passed
  • Migrate Core Code to Submodules

    tinyhumansai/openhuman

    Plans and carries out moving non-host-specific code and its tests from the OpenHuman core into vendored tiny submodule libraries, then releases the submodule and re-pins the host.

    41k GitHub stars~2.6k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • A skill your agent uses when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for…

    5.6k GitHub starsUsed in 33 repos~1.8k tokens
    DevelopmentAuto-check passed
  • Git Worktree Cleanup

    lobehub/lobehub

    Audits stale Git worktrees and branches with a bundled script, classifies each one, and deletes only after you approve the exact candidates.

    83k GitHub stars~2.8k tokensUpdated today
    DevelopmentAuto-check passed
  • Keep Codex Fast

    vibeforge1111/keep-codex-fast

    A skill your agent uses when Codex feels slow or bloated, when local sessions/logs/worktrees/config have grown over time, or when a user wants safe maintenance for Codex Desktop/CLI state.

    1.6k GitHub stars~3.1k tokensUpdated 5 mo ago
    DevelopmentAuto-check passed
  • Pre-Release PR Triage

    jamiepine/voicebox

    Sorts a backlog of open pull requests into must-merge, candidate, superseded and deferred, writes a triage doc and works the merge loop before a release.

    57k GitHub stars~3.1k tokensUpdated today
    DevelopmentAuto-check passed

More from tikalk/adlc-team-skills

All 44 skills in this repo
  • Team Boot

    tikalk/adlc-team-skills

    A skill your agent uses when a session starts or resumes after compaction (auto via the sessionstart and sessioncompact event hooks) and the team AI directives context — constitution, CDR index…

    141 GitHub stars~2.2k tokensUpdated yesterday
    Auto-check passed
  • Architect Clarify

    tikalk/adlc-team-skills

    A skill your agent uses when ADRs need review, gaps need filling, or ADR status must be approved as Accepted before architecture generation.

    141 GitHub stars~4.7k tokensUpdated yesterday
    Auto-check passed
  • Change Clarify

    tikalk/adlc-team-skills

    A skill your agent uses when reviewing, accepting, rejecting, or deferring ChDRs mined by change-init, validating inferred decisions against their git and issue evidence before promotion to project…

    141 GitHub stars~2.9k tokensUpdated yesterday
    Auto-check passed
  • Change Init

    tikalk/adlc-team-skills

    A skill your agent uses when you want guided mining of git history, structured change-story clustering, or comprehensive rationale recovery before documenting.

    141 GitHub stars~3.5k tokensUpdated yesterday
    Auto-check passed
  • Change Publish

    tikalk/adlc-team-skills

    A skill your agent uses when accepted ChDRs are ready for promotion from drafts to project memory at docs/adlc/memory/chdr/ and the boot-facing chdr.md index needs regenerating.

    141 GitHub stars~2k tokensUpdated yesterday
    Auto-check passed
  • Evals Analyze

    tikalk/adlc-team-skills

    A skill your agent uses when evaluation results need triage and loop-closing — spec failures route to deterministic checks or context rules, generalization failures to the evaluator backlog.

    141 GitHub stars~1.2k tokensUpdated yesterday
    Auto-check passed

Categories

Questions about Factory Clean

What does Factory Clean do?

A skill your agent uses when the user asks to reclaim project disk space or clean up leftovers — inventories worktrees, containers, dependencies, and processes, reclaiming only user-approved items…. Factory Clean is an agent skill from tikalk/adlc-team-skills. Use when the user asks to reclaim project disk space or clean up leftovers — inventories worktrees, containers, dependencies, and processes, reclaiming only user-approved items; read-only by default.

When should I use Factory Clean?

Factory Clean fits situations like: the user asks to reclaim project disk space; clean up leftovers — inventories worktrees; reclaiming only user-approved items; read-only by default.

How do I install Factory Clean in Claude Code?

Run `npx skills add tikalk/adlc-team-skills --skill factory-clean -a claude-code`. Or copy the skill folder (skills/factory/factory-clean in tikalk/adlc-team-skills) into .claude/skills/factory-clean in your project. Claude Code loads it when a task matches its description.

How do I install Factory Clean in Codex?

Run `npx skills add tikalk/adlc-team-skills --skill factory-clean -a codex`. Or copy the skill folder (skills/factory/factory-clean in tikalk/adlc-team-skills) into .agents/skills/factory-clean in your project. Codex loads it when a task matches its description.

Can I use Factory Clean in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add tikalk/adlc-team-skills --skill factory-clean -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/factory-clean, .gemini/skills/factory-clean, .github/skills/factory-clean and .opencode/skills/factory-clean in your project.

What does Factory Clean need to run?

SKILL.md names no scripts, command-line tools or credentials: Factory Clean is instructions for the agent only.

Does Factory Clean access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Factory Clean safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Factory Clean use?

Factory Clean is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Factory Clean use?

About 1k tokens (SKILL.md is roughly 4.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Factory Clean?

Skills that share tags, products or a category with Factory Clean: Finishing a Development Branch (obra/superpowers, 296k stars), Migrate Core Code to Submodules (tinyhumansai/openhuman, 41k stars), Finishing A Development Branch (farm-fe/farm, 5.6k stars) and Git Worktree Cleanup (lobehub/lobehub, 83k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Factory Clean?

tikalk (a GitHub organization) maintains it in tikalk/adlc-team-skills, which has 141 GitHub stars. The repository holds 44 skills in this directory. The repository was last updated on October 6, 2026.

Source: tikalk/adlc-team-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.