Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

diet-evaluate-removal

БесплатноБез исполняемых скриптовНе проверен

Data-driven deep evaluation of whether a dependency is worth removing

future-architectот future-architect★ 46 звёзд на GitHub

Об этом скилле

Diet Removal Evaluation: $ARGUMENTS

Deep-dive evaluation of whether $ARGUMENTS is worth removing, using a 5-phase data-driven framework. This command picks up where uzomuzo diet leaves off -- diet gives you the priority ranking, this gives you the removal verdict.

When to use: After uzomuzo diet ranks a dependency and you need to decide whether to invest the effort. Works for any difficulty level -- trivial deps get a quick confirmation, hard deps get a concrete migration plan.

Relationship to other skills:

  • uzomuzo diet tells you ranking and difficulty (automated, all dependencies at once)
  • /diet-evaluate-removal tells you whether it's worth removing and how (LLM-powered, one dependency at a time)
  • /diet-assess-risk tells you how dangerous it is to keep (LLM-powered, security focus)
  • /diet-remove executes the removal (LLM-powered, implementation)

Phase 1: Ingest Diet Data

Extract the target dependency's diet JSON entry. Prefer existing JSON over re-running diet.

Option A -- existing diet JSON (preferred):

jq '.dependencies[] | select(.name == "$ARGUMENTS")' diet.json

Option B -- run diet now:

uzomuzo diet --sbom bom.json --source . --format json | jq '.dependencies[] | select(.name == "$ARGUMENTS")'

Check that coupling was actually measured

difficulty and coupling_effort are only meaningful when diet matched imports in the source tree. When source analysis is skipped, fails, or finds no import of any dependency (typically because --source points at the wrong directory; diet logs no imports matched any dependency), diet gives every entry without a scope import_file_count = call_site_count = 0, coupling_effort = 0, difficulty = "trivial", and is_unused = false (tool and runtime entries get a placeholder api_breadth = 1 and show easy). Here "trivial" means "not measured", not "easy to remove".

Detect it across the whole JSON, not from the one entry:

jq '[.dependencies[] | select(.scope == null)]
    | if length == 0 then "undetermined" else all(.import_file_count == 0 and (.is_unused | not)) end' diet.json

true means coupling was not measured. "undetermined" means every dependency has a scope, so this check cannot tell; look at the diet log for no imports matched any dependency. (source_root does not tell you: the CLI fills it with . by default.) Re-run diet with --source pointing at the project root the SBOM was generated from. If that is impossible, write "unmeasured" for Coupling Depth and Production Scope and say so in the verdict.

Example of the trap: {"difficulty": "trivial", "coupling_effort": 0, "is_unused": false, "import_file_count": 0} looks like a free removal, but if every other entry looks the same, nobody has looked at the code yet.

Signals that are not in diet JSON

Diet JSON does not carry the OSV malicious-package check or the npm dormant-release marker. Get them from uzomuzo scan for the exact version in the SBOM:

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}'
Field Meaning for this evaluation
malicious present An OSV advisory names this version (or, with scope: "package", the whole package) as malicious. Stop the evaluation -- see the first row of the Recommendation logic.
malicious_check: "unknown" The malicious lookup failed. Say so in the verdict; do not treat it as clean.
both absent Clean for npm, PyPI, crates.io, Go, and Maven. For any other ecosystem the check did not run: write "not checked".
dormant_release present (npm) This version came out after a year with no releases. Not a finding, but a reason to confirm who published it before trusting it. The marker is shown only for 7 days after publication (until), so its absence on an older version proves nothing; for a version pinned recently, compare its publish date with the previous release yourself.
reason Why scan chose the lifecycle label. Needed to interpret Review Needed (see Security Urgency below).

Required fields to extract

Display ALL of these from the diet JSON. Do NOT re-compute any of them.

Field What it tells you
name / version / ecosystem Dependency identity
purl Canonical package URL identifier
scope Dependency scope: "tool" (build-time-only), "runtime" (reflection/ServiceLoader-loaded)
rank / priority_score Where this dep sits in the removal priority list
difficulty trivial / easy / moderate / hard
exclusive_transitive / total_transitive Deps removed together / total transitive count
stays_as_indirect Whether it remains after remo
Полный SKILL.md на GitHub

Установить diet-evaluate-removal в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл diet-evaluate-removal?

Data-driven deep evaluation of whether a dependency is worth removing

Как установить скилл diet-evaluate-removal?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл diet-evaluate-removal запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить diet-evaluate-removal с