Skip to content

feat: add /upkeep:trim skill for unused dependency weight - #23

Merged
llbbl merged 2 commits into
mainfrom
feat/trim-skill
Aug 23, 2026
Merged

feat: add /upkeep:trim skill for unused dependency weight#23
llbbl merged 2 commits into
mainfrom
feat/trim-skill

Conversation

@llbbl

@llbbl llbbl commented Aug 23, 2026

Copy link
Copy Markdown
Owner

Summary

  • add a fourth skill, /upkeep:trim, answering what the existing three don't: what's in the dependency tree that we don't use, and what does it cost
  • register the skill in the plugin marketplace description and README (skill list, repo-structure tree, "all four skills")

Why

/upkeep:deps answers "what is outdated." /upkeep:audit answers "what is vulnerable." Neither surfaces a dependency that is perfectly current, carries no advisories, and is still pure dead weight.

Motivating case: libsql-search ships a text-embedding library that transitively installs sharp + libvips (~15.6 MB of native binaries) because @huggingface/transformers declares sharp as a hard dependencies entry. Nothing in that project's source touches it. deps would not flag it (not outdated), and audit only reported the advisories it dragged along -- which had been baselined and stopped being read.

Design

The skill is the entry point and procedure; heavy per-package investigation delegates to the js-dep-analyst agent. Dependency investigation is read-heavy -- trees, parent manifests, registry lookups -- so the caller should get the verdict back rather than the dumps.

No new CLI commands. upkeep detect, upkeep imports <pkg> (AST usage analysis), and upkeep audit already cover the CLI-side steps, consistent with the existing guidance to only add binary support when native tooling output is hard to consume or needs cross-tool normalization.

Heuristics the skill encodes

Each of these was a real mistake or discovery from the motivating investigation:

  • the package manager does not change the dependency graph -- npm/pnpm/yarn/bun resolve the same manifests to the same tree, so switching installers to shed a dependency does not work
  • "not built" is not "not installed" -- build-script settings control whether install scripts run, not whether bytes land on disk
  • a caret range can strand you on a vulnerable version; when a published fix is unreachable the blocker is usually an intermediate package's range, which reframes "remove it" into the much cheaper "override it"
  • a baseline comment is not a diagnosis -- in the motivating case one of two baselined advisories came from an unrelated package two levels away from where the comment claimed
  • check upstream before designing a local workaround
  • "no good lever exists today" is a legitimate outcome

Validation

  • just lint
  • just test (405 pass / 15 skip / 0 fail)
  • .claude-plugin/marketplace.json validated as JSON

Closes #22

llbbl added 2 commits August 23, 2026 14:51
Adds a fourth skill answering the question the existing three do not:
what is in the dependency tree that we do not use, and what does it
cost. /upkeep:deps answers "what is outdated," /upkeep:audit answers
"what is vulnerable" -- neither surfaces a dependency that is current,
has no advisories, and is still dead weight.

Motivating case: libsql-search ships a text-embedding library that
transitively installs sharp + libvips (~15.6 MB of native binaries)
because @huggingface/transformers declares sharp as a hard dependency,
even though nothing in the project's source touches it.

The skill is the entry point and procedure; heavy per-package
investigation delegates to the js-dep-analyst agent (llbbl/claude-agents)
so the caller gets a verdict back instead of tree/manifest/registry
dumps. No new CLI commands -- upkeep detect, upkeep imports, and
upkeep audit already cover the CLI-side steps.

Encodes several heuristics from the motivating investigation: the
package manager doesn't change the dependency graph, "not built" isn't
"not installed," a caret range can strand a fix behind an intermediate
package's range (making override cheaper than removal), a baseline
comment isn't a diagnosis, check upstream before designing a local
workaround, and "no good lever exists today" is a legitimate outcome.

Also registers the skill in README.md (skill list, repo-structure
tree, "all four skills") and .claude-plugin/marketplace.json (plugin
description).
This PR adds skills/trim/SKILL.md, which carries a version:
frontmatter field, but the version tooling hardcoded the skill list
rather than globbing it — update-all-versions, set-version, and
show-versions each named only deps/audit/quality. Left as-is, the
trim skill would have stayed pinned at 0.4.3 while every other
version-bearing file moved on, the same drift class as the
.claude-plugin/marketplace.json bug fixed in #14.

Adds trim to all three recipes and to the version-bearing file list
in docs/RELEASING.md.

Note the git add lines in commit-version and the auto-release
workflow already use the skills/*/SKILL.md glob, so staging was
never the gap — only the sed lines that write the version were.

Verified: deliberately set the trim skill to version 9.9.9, ran
just version-sync, and confirmed it was corrected back to 0.4.3;
just show-versions now lists all eight version-bearing files in
agreement; just lint clean.
@llbbl
llbbl merged commit 9091717 into main Aug 23, 2026
3 checks passed
@llbbl
llbbl deleted the feat/trim-skill branch August 23, 2026 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add /upkeep:trim skill for finding unused dependency weight

1 participant