artifact-retention

artifact-retention is a skill for Claude Code from avelikiy/great_cto. It costs 140 tokens per session (1,039 once invoked), scanned A, original, MIT.

A cleanup procedure for build files, caches, container images, release folders, and browser-session copies after delivery. It keeps the running version and one previous version for rollback, while measuring freed disk space with df.

In plain words
What is it for?
Use it after releases to clean web and mobile artifacts, container images, caches, and old deployment directories without deleting live data.
Why use it?
Old build copies can fill a machine and break later builds or command output. This procedure removes replaceable data while protecting databases, backups, volumes, and the versions needed to recover.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the great-cto plugin — 38 skills, 21 commands, 73 agents shipped together

Good fit Use it after releases to clean web and mobile artifacts, container images, caches, and old deployment directories without deleting live data.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/avelikiy/great_cto/artifact-retention
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 avelikiy/great_cto --skill artifact-retention
Clone the repo
git clone --depth 1 https://github.com/avelikiy/great_cto

Made for: Claude Code.

Or install great-cto, the plugin that ships this one along with the rest of its 38 skills, 21 commands, 73 agents.

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 artifact-retention

README.md
[![agentmods](https://agentmods.dev/badge/skills/avelikiy/great_cto/artifact-retention/github.svg)](https://agentmods.dev/skills/avelikiy/great_cto/artifact-retention)
Your own site
<a href="https://agentmods.dev/skills/avelikiy/great_cto/artifact-retention"><img src="https://agentmods.dev/badge/skills/avelikiy/great_cto/artifact-retention/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 artifact-retention

Your own site · 80×15
<a href="https://agentmods.dev/skills/avelikiy/great_cto/artifact-retention"><img src="https://agentmods.dev/badge/skills/avelikiy/great_cto/artifact-retention.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 140 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,039 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.00140 $0.01039
Opus 5.5 $0.00056 $0.00416
Sonnet 5.5 $0.00028 $0.00208
Haiku 4.5 $0.00014 $0.00104

Measured 20d ago against content hash 4af77c38bdf5, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

artifact-retention 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 20d 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/artifact-retention/SKILL.md · 68 lines

How it starts

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

artifact-retention — keep what runs and one rollback, measure what you freed

Build machines fill up from copies that already did their job: agent work trees, old DerivedData, Gradle outputs, image tags, browser profiles. A full disk breaks the next build, other people's builds, and even command output. Cleaning is part of "released".

What to keep

Kind Keep Delete
Web build output (dist/, .next/, out/, .vercel/output) current release older release outputs
Mobile artifacts (.ipa, .aab, .apk, .xcarchive) the shipped one + one previous older archives
Mobile caches (DerivedData/<project>-*, android/app/build, .gradle project dir) — (rebuildable) after delivery
Container images <app>:<tag> the image a container uses (running or stopped) + the rollback tag older tags of that app
Release dirs *-<sha> active + one previous older
Hosted deployments (Vercel, Pages, Workers versions) live + previous leave to the host's retention unless asked

Never delete

  • Volumes, databases, backups, pg_wal, data files — even when a tool calls them "reclaimable".
  • The rollback version, even when it is old.
  • Installed tools, not copies: Xcode, simulator runtimes, Android SDK and system images, ~/.gradle/caches, node_modules, installed browsers (ms-playwright), the user's Chrome profile and /Applications.
  • Anything another session or process uses. Check: lsof +D <dir> empty, no running build (pgrep -fl 'xcodebuild|gradle|docker build|buildx'), work tree merged and clean (git merge-base --is-ancestor <head> origin/<main> and no tracked changes).
  • Never by glob over temp roots, never docker system prune, never docker image prune -a.

How

  1. Before: df -k / (and on APFS diskutil apfs list | grep -E 'Capacity (Consumed|In Use)').
  2. List exact paths and tags, each with why it is old and that nothing uses it.
  3. Ask the operator first for anything that is not your own rebuildable build output (other sessions' copies, browser clones, images you did not build). Your own intermediate output of the release you just shipped needs no extra question.
  4. Remove one exact path or tag at a time.
  5. After: df -k / again. Report the df difference. du counts APFS clones and shared image layers as full copies — a "67 GB" folder freed 2 GB. Never promise a du number.

Read the full file on GitHub · 68 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. 20d ago First seen · 68 lines · 140 tokens per session scan A 4af77c38bdf5

Subscribe to this mod's changes

artifact-retention is a skill published in the GitHub repository avelikiy/great_cto (117 stars, last pushed 14d ago), licensed MIT. It adds 140 tokens to every session and 1,039 once invoked, about $0.0006 per session on Opus 5.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-11-11.

Related

artifact-retention compared with skills from other repositories

artifact-retention next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
artifact-retentionavelikiy/great_ctoSkill11714d agoMITA140Claude Code
spec-driftParetofilm/superpowers-gstackSkill5todaynoneA51Claude Code
third-lens-reviewParetofilm/superpowers-gstackSkill5todaynoneA54Claude Code
quality-reviewParetofilm/superpowers-gstackSkill5todaynoneB54Claude Code
boundariesoliver-kriska/claude-elixir-phoenixSkill579todayMITA33Claude Code
multi-lens-reviewthoughtbot/rails-consultantSkill3910d agoMITA39Claude Code
review-promptdoodledood/manifest-devSkill80todayMITA60Claude Code