04_clean_artifacts_skill

This skill safely removes build artifacts like bin and obj, respects gitignore, and frees disk space while avoiding source deletion.
  • PowerShell

20

GitHub Stars

2

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill sounder25/google-antigravity-skills-library --skill 04_clean_artifacts

  • clean_artifacts.ps11.7 KB
  • SKILL.md1.2 KB

Overview

This skill removes ignored build artifacts (bin, obj, node_modules) to reclaim disk space and resolve ghost build errors. It performs a safe, workspace-wide cleanup that respects .gitignore and avoids removing source files. The operation supports dry-run mode and reports the deleted paths and space reclaimed.

How this skill works

The skill first prefers a git-based safe removal using git clean -fdX when the repository is available. If git is not usable, it falls back to deleting only explicit target folders (default: bin, obj, node_modules) and never removes source code files. It logs every candidate path, supports a dry run for review, and summarizes reclaimed space after completion.

When to use it

  • After switching branches or pulling large merges to remove stale build outputs
  • When encountering inexplicable build errors that persist after rebuilds
  • To free disk space in developer workspaces or CI agents
  • Before creating a clean snapshot or packaging a project
  • As part of a recovery step when CI jobs report inconsistent artifacts

Best practices

  • Run with --dry-run first to verify what will be deleted
  • Prefer running inside a git repository so git clean -fdX can be used safely
  • Limit targets to known build folders; avoid adding generic patterns
  • Review console logs immediately after execution to confirm expected deletions
  • Automate in CI only when you can restore or reproduce important artifacts from source

Example use cases

  • Developer runs clean artifacts after switching feature branches to remove old bin/obj files that cause linker errors
  • CI job executes the skill on a fresh agent to ensure no leftover node_modules distort dependency resolution
  • Workspace maintenance task reclaims tens of GBs from cached build outputs before a disk quota warning
  • Troubleshooting step: run dry-run to list stale folders before committing to deletion

FAQ

No. The skill is designed never to delete source code file types and prefers git clean -fdX, which removes only untracked ignored files.

What if my repository has no git metadata?

The skill falls back to deleting only explicitly listed target folders (default: bin, obj, node_modules) and logs each removal for review.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational