agentsclimarketplace

Fix knip unused exports

Skill zacharygcook/agent-skills/skills/fix-knip-unused-exports

Resolve Knip unused-export findings by classifying each symbol before editing and preferring dead-code deletion, local visibility, or deliberate package contracts over suppression. Use for unused exports, exported types, barrel re-exports, test-only exports, and apparent false positives.From its SKILL.md

Install
npx -y skills add zacharygcook/agent-skills --skill fix-knip-unused-exports

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

2.1 KB, 371 tokens by cl100k_base, as published. Nobody here has run it

Fix Knip Unused Exports

Unused-export reports are small but easy to “fix” incorrectly. Search the whole repository, classify the contract, then make the smallest truthful change.

Workflow

  1. Run the repository's Knip command from its expected root.
  2. Search each symbol globally and separately outside tests.
  3. Inspect package entry points, export maps, generated imports, and dynamic consumers.
  4. Classify the finding.
  5. Apply the preferred fix.
  6. Rerun Knip plus focused typecheck, lint, and tests.

Classification

CategoryEvidencePreferred fix
Internally usedReferenced only in its defining moduleRemove export
Dead codeNo real callerDelete it and newly orphaned helpers
Dead barrel entryRe-exported but not consumedRemove the re-export
Test-only seamExport exists only for testsTest public behavior or extract a genuinely shared helper
Real consumerProduction/generated/dynamic consumer existsCorrect Knip entry/config/export metadata

Do not add broad ignores, dummy imports, speculative barrel exports, or @public comments solely to silence the tool.

Contract Checks

Before removing a package export, inspect:

  • package.json exports and types;
  • workspace consumers and build scripts;
  • framework conventions for discovered files;
  • code generation and dynamic import strings;
  • documentation examples that form a supported API.

When deleting a value, remove stale tests, imports, docs, and adjacent helpers only after confirming they have no independent use. Preserve intentional public APIs even when the current monorepo has no internal consumer; document that decision in Knip configuration narrowly.

Handoff

Report each classification, the change made, any intentional suppression, and validation results.

What ships with it: 1 file

279 B alongside SKILL.md

agents/

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.