diet-remove
БесплатноБез исполняемых скриптовНе проверенRemove a dependency identified by uzomuzo diet — analysis + issue (default) or direct PR
от future-architect★ 46 звёзд на GitHubОб этом скилле
Diet Remove: $ARGUMENTS
Analyze and plan the removal of dependency $ARGUMENTS, then take action.
Mode selection
- Default (Issue mode): Run Phase 1 analysis, then file a GitHub Issue with the findings and proposed migration plan. Appropriate for external OSS contributions and large projects where you don't own the build environment.
--pr(PR mode): Run the full removal lifecycle locally: analysis → replacement → verification → commit. Use this only when you own the project and can run build/test locally.
Parse $ARGUMENTS for flags, and set TARGET to the dependency itself: drop the flags and their values, and turn a PURL into the name the package manager uses (pkg:golang/github.com/pkg/[email protected] -> github.com/pkg/errors, pkg:npm/%40scope/[email protected] -> @scope/name). Every command below uses $TARGET, never the raw $ARGUMENTS.
Flags:
- If
--pris present → PR mode (direct implementation) - If
--repo owner/repois present → target that repository for the issue - Otherwise → Issue mode (default)
When to use: After /diet-evaluate-removal confirms the dependency is worth removing, or when uzomuzo diet reports it unused or easy (a "trivial" label is only meaningful if coupling was measured -- when every dependency shows trivial and none is unused, re-run diet with the right --source).
Safety principle: Every removal must pass build + vet + test before committing. If any step fails, stop and diagnose — don't force it.
Ecosystem detection
Detect the ecosystem from the PURL scheme or module path (pkg:golang/ → Go, pkg:npm/ → npm, pkg:pypi/ → Python, pkg:maven/ → Maven, pkg:cargo/ → Rust, pkg:githubactions/ → GitHub Actions). Diet measures source coupling for Go, Python, JavaScript/TypeScript, and Java only; for other ecosystems, find the import sites yourself before trusting a "trivial" or "unused" label.
If the ecosystem is not Go, display this notice to the user before proceeding:
Note: This skill's PR-mode commands and common patterns are optimized for Go. Issue mode and IBNC safety checks work for any language, but ecosystem-specific PR-mode guidance (verification commands, edge cases, lockfile handling) is still being developed for {ecosystem}. If you discover surprises or improvements during this removal, please contribute them via an issue or PR to future-architect/uzomuzo-oss.
Then continue with the rest of the flow — the analysis, IBNC checks, and issue template are language-agnostic.
GitHub Actions detection
If the target PURL starts with pkg:githubactions/ or is a GitHub Action name (owner/action):
- Find usage:
grep -rn "{action-name}" .github/workflows/ --include="*.yml" --include="*.yaml" - Assess impact: Count workflow files and jobs affected. Note whether release-critical pipelines are involved.
- Find replacement: Check if an official replacement, maintained fork, or first-party alternative exists (e.g.,
tibdex/github-app-token→actions/create-github-app-token). - Pin strategy: Replacement should use SHA pins with version comments (e.g.,
uses: actions/checkout@<sha> # v4.2.0).
The rest of the flow (duplicate check, issue template, etc.) proceeds identically. In the Usage breakdown table, list workflow files instead of source files.
Phase 1: Pre-flight checks
Before writing any code, run through these checks:
0. Is this an incident rather than a cleanup?
Run uzomuzo scan on the exact version in the SBOM. Diet JSON does not carry these signals:
uzomuzo scan "pkg:npm/[email protected]" --format json \
| jq '.packages[0] | {lifecycle, reason, stable_version, malicious, malicious_check, dormant_release,
direct_advisory_count, transitive_advisory_count, max_cvss3_score, max_cvss4_score}'
maliciouspresent: Stop this flow. Moving off the malicious version comes before any removal plan, and it must not wait for an issue to be triaged. Report the advisory to the user and propose the fix: pin to a version the advisory does not name (or remove the package whenscopeis"package"), and run/diet-assess-riskto list the secrets to rotate (skip that if it already produced the incident verdict). Make the change only in PR mode and only after the user approves it; rotating credentials is the user's action, not yours. For an external project, do not open a public issue that describes an exploitable situation in detail; draft a private report for the maintainers' security contact (SECURITY.md) and send nothing until the user approves it.dormant_releasepresent (npm, shown for 7 days after publication): The version came out after a year of silence. Prefer staying on, or pinning back to, the release before the silence while you plan the removal.- Otherwise continue. (For ecosystems other than npm, PyPI, crates.io, Go, and Maven, uzomuzo does not run the malicious ch
Установить diet-remove в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл diet-remove?
Remove a dependency identified by uzomuzo diet — analysis + issue (default) or direct PR
Как установить скилл diet-remove?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл diet-remove запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic