All skills
simota avatar

/sweep

@965f4f9
by shingo imotasimota/agent-skills85 stars
15

Detecting unnecessary files, unused code, and orphaned files, and proposing safe deletion. Not for removal execution (Builder), repo structure (Grove), or scope cutting (Void).

Use this Skill: https://skilld.dev/gh/simota/agent-skills/sweep

This session only. Nothing lands on disk.

referenceimports-cleanup.md

≈644 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Import Cleanup Decisions

Load for imports; apply reference/cleanup-protocol.md. Resolve configured lint/compiler/bundler tools instead of copying a versioned tool catalog.

Candidate Decision / evidence
Hard-unused binding ≥95 candidate confidence only after source/test/docs verification and module-initialization checks. An unused binding does not mean its import has no side effects.
Side-effect import Protect binding-free imports (ImportDeclaration.specifiers.length === 0), CSS/polyfills/decorator registration, and side effects of bound imports. Never auto-remove.
Type-only usage Propose import type only after checking emitted JS and required initialization under the actual compiler/module settings; promotion can remove module execution.
Duplicate imports Consolidate only when import kind, attributes, module semantics and initialization ordering remain equivalent.
Barrel Preserve published exports/entry points and external consumers. For internal-only barrels, measure the actual compiler/bundle cost before proposing direct imports; no assumed speedup or purity annotation on arbitrary re-exports.

Cycles

Use the configured graph tool and distinguish runtime from type-only edges. Original triage bands: HIGH = load-time 2-cycle; MEDIUM = 3+-node cycle; LOW = exclusively type-only cycle. Confirm actual initialization behavior; node count alone does not prove a runtime failure. Send structural cycle remediation to Atlas with the graph and evidence. Replacing an edge with lazy loading does not prove the architectural cycle disappeared.

Batch Verification and Output

Handoff to Builder; cap each import-edit batch at 50 imports per file and the SKILL's ≤10 files. Preserve required initialization; run the same build, tests and lint; compare emitted bundle size and cycle graph (must not increase). Report missing baseline/unsupported checks rather than claiming improvement. Public API changes require separate confirmation.

Output: Scope, Language, actual tools/configuration; counts and paths for HardUnused, SideEffect, Duplicate, TypeOnly, cycles by severity and Barrels; per-item confidence/guard evidence; before/after build, tests, lint, bundle and cycle results; Builder execution / Atlas structural handoff.

Canonical emit semantics: https://www.typescriptlang.org/tsconfig/verbatimModuleSyntax.html (checked 2026-09-17). Verify the installed compiler's behavior; do not conflate the introduction of type import syntax with availability of verbatimModuleSyntax.

Source: SKILL.md on GitHub

1 alert13d5 checks · Risk SAFE
  • Gen Agent Trust Hub13d

    The skill 'sweep' is a highly structured agent designed for repository maintenance and dead code elimination. It includes robust safety protocols, such as mandatory backup branch creation, explicit user confirmation for all deletions, and a multi-signal confidence scoring system to prevent accidental data loss. The skill utilizes reputable, well-known developer tools across multiple languages and explicitly protects sensitive files like environment variables, licenses, and lockfiles. No malicious patterns, obfuscation, or exfiltration attempts were detected.

  • Socket13d

    No alerts

  • Snyk13d

    Risk: LOW · No issues

  • Runlayer6mo

    7/14 files flagged

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 965f4f9. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 days ago.

Activeupdated 2 weeks ago

README badge

README badge for simota/agent-skills/sweep