fix-knip-unused-exports

fix-knip-unused-exports is a skill for Codex from zacharygcook/agent-skills. It costs 59 tokens per session (435 once invoked), scanned A, original, MIT.

A skill for investigating and fixing Knip reports about exports that are not used. Knip is a code-analysis tool that finds apparently unused files, exports, and dependencies.

In plain words
What is it for?
Use it to search for consumers, inspect package entry points and export maps, remove dead exports or code, and verify the result with analysis, type checks, linting, and tests.
Why use it?
It helps distinguish genuinely dead code from public package interfaces, generated imports, dynamic users, and test-only code before anything is removed.

Skill for Codex

Written for Codex: agents/openai.yaml present.

Good fit Use it to search for consumers, inspect package entry points and export maps, remove dead exports or code, and verify the result with analysis, type checks, linting, and tests.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/zacharygcook/agent-skills/fix-knip-unused-exports
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add zacharygcook/agent-skills --skill fix-knip-unused-exports
Clone the repo
git clone --depth 1 https://github.com/zacharygcook/agent-skills

Made for: Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for fix-knip-unused-exports

README.md
[![agentmods](https://agentmods.dev/badge/skills/zacharygcook/agent-skills/fix-knip-unused-exports/github.svg)](https://agentmods.dev/skills/zacharygcook/agent-skills/fix-knip-unused-exports)
Your own site
<a href="https://agentmods.dev/skills/zacharygcook/agent-skills/fix-knip-unused-exports"><img src="https://agentmods.dev/badge/skills/zacharygcook/agent-skills/fix-knip-unused-exports/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for fix-knip-unused-exports

Your own site · 80×15
<a href="https://agentmods.dev/skills/zacharygcook/agent-skills/fix-knip-unused-exports"><img src="https://agentmods.dev/badge/skills/zacharygcook/agent-skills/fix-knip-unused-exports.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 59 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 435 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00059 $0.00435
Opus 5.5 $0.00024 $0.00174
Sonnet 5.5 $0.00012 $0.00087
Haiku 4.5 $0.00006 $0.00044

Measured 1mo ago against content hash 763c59ac5852, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

fix-knip-unused-exports scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/fix-knip-unused-exports/SKILL.md · 46 lines

What it actually says

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

Category Evidence Preferred fix
Internally used Referenced only in its defining module Remove export
Dead code No real caller Delete it and newly orphaned helpers
Dead barrel entry Re-exported but not consumed Remove the re-export
Test-only seam Export exists only for tests Test public behavior or extract a genuinely shared helper
Real consumer Production/generated/dynamic consumer exists Correct 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.

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 46 lines · 59 tokens per session scan A 763c59ac5852

Subscribe to this mod's changes

fix-knip-unused-exports is a skill published in the GitHub repository zacharygcook/agent-skills (2 stars, last pushed 3mo ago), licensed MIT. It adds 59 tokens to every session and 435 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

doca-debug

Use this skill when the user is debugging any DOCA symptom — a build that won't compile, a link step that can't resolve a doca symbol, a runtime call returning DOCAERROR, a silent service or tool, or a stack trace / valgrind / core dump — and needs the layered ladder (install → version → build → link → runtime →…

NVIDIA/skills · 233 tokens

doca-flow

DOCA Flow packet steering on NVIDIA NICs/DPUs, linked into a C application: match/action pipes, ports, representors, forwarding, hairpin, counters. Trigger on packet steering, classifier, rule-matching, representor, hairpin or 5-tuple-to-queue questions even when "DOCA Flow" is not named. Also covers pipe validation…

NVIDIA/skills · 224 tokens

compute-sanitizer-diagnose-cuda-bugs

Detect and diagnose CUDA correctness bugs with NVIDIA Compute Sanitizer. Routes GPU memory errors, shared-memory data races, uninitialized-memory reads, and synchronization/barrier bugs to the right sub-tool (memcheck, racecheck, initcheck, synccheck) and explains how to build, run, and read the report. Use when…

NVIDIA/skills · 213 tokens

dynamo-interconnect-check

Validate that a Dynamo deployment's NIXL/UCX/NCCL interconnect is ready for disaggregated serving over RDMA/NVLink. Use after recipe-runner brings a deployment up (especially disagg/multi-node) to confirm the KV transport is correct; use troubleshoot for diagnosing already-failed pods.

NVIDIA/skills · 71 tokens

mcore-create-issue

Investigate a failing GitHub Actions run or job and create a GitHub issue for the failure.

NVIDIA/skills · 26 tokens

jetson-print-bsp-info

Use when you need to print Jetson BSP info (L4T version, board configs, rootfs state) from a LinuxforTegra root on the host PC. This is an example skill.

NVIDIA/skills · 49 tokens