Agent skill

Knip

by brianlovin in brianlovin/agent-config

Run knip to find and remove unused files, dependencies, and exports.

No licenceAuto-check passedDevelopment

Install Knip

skills CLI
$ npx skills add brianlovin/agent-config --skill knip -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install brianlovin/agent-config knip --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/brianlovin/agent-config.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/knip .claude/skills/knip && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
knip
GitHub stars
376
Token cost
~1.4k tokens
SKILL.md length
694 words
Files
1
Skills in repo
12
Repo updated
First seen
Licence
None found

At a glance

Run knip to find and remove unused files, dependencies, and exports.

  • Works in 6 steps: Understand the project → Run knip and read configuration hints… → Address hints by adjusting knip.json → …
  • Cleaning up dead code and unused dependencies
  • SKILL.md covers Setup, Workflow, Configuration Best Practices and Production Mode, plus 5 more sections
  • Calls npx and npm

What it does

Knip is an agent skill from brianlovin/agent-config. Run knip to find and remove unused files, dependencies, and exports. Use for cleaning up dead code and unused dependencies.

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development. It works with npm. The repository describes itself as: My coding agent config.

When your agent uses it

  • Cleaning up dead code and unused dependencies

Example prompts

  • “/knip”

Requirements

  • Node.js

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Understand the project
  2. Run knip and read configuration hints first
  3. Address hints by adjusting knip.json
  4. Repeat steps 2-3
  5. Address actual issues
  6. Re-run and repeat

What it can do on your machine

Read from SKILL.md and the folder at commit 1a9819e. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npx
    • npm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npx and npm, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Knip loads about 1.4k tokens when it runs. Until then it costs about 32 tokens; SKILL.md has 694 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~32
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

Without a licence we can't republish the file, so here is its outline and opening line. It has 694 words (~1,425 tokens).

“Run knip to find and remove unused files, dependencies, and exports from this codebase.”

— opening of SKILL.md by brianlovin
name
knip

Read the full SKILL.md on GitHub

Files

Just SKILL.md in skills/knip of brianlovin/agent-config.

Open the folder on GitHubat commit 1a9819e

Compare with similar skills

Knip next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Knip compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Knip this skillbrianlovin/agent-config376—~1.4kAutomated safety check: PassNone
Install Anti-Slop Oxlint Rulesdmmulroy/anti-slop5.3k1 repos~2.2kAutomated safety check: PassMIT
Nx Run Tasksnomcopter/react-mosaic4.8k8 repos~613Automated safety check: PassCustom licence
Get API Docs with chubandrewyng/context-hub14k2 repos~775Automated safety check: PassMIT
Migrate Internal Package into GhostTryGhost/Ghost55k—~3.8kAutomated safety check: PassMIT
Open Code Review CLIalibaba/open-code-review44k—~3.1kAutomated safety check: PassApache-2.0

Similar skills

  • Installs, updates or migrates the vendored anti-slop Oxlint plugin in a repository, keeping local rule changes and the plugin's license and provenance files.

    5.3k GitHub starsUsed in 1 repo~2.2k tokens
    DevelopmentAuto-check passed
  • Nx Run Tasks

    nomcopter/react-mosaic

    Helps with running tasks in an Nx workspace. An agent skill from nomcopter/react-mosaic.

    4.8k GitHub starsUsed in 8 repos~613 tokens
    DevelopmentAuto-check passed
  • Get API Docs with chub

    andrewyng/context-hub

    Fetches current documentation for third-party APIs and SDKs with the chub CLI before the agent writes code against them, instead of relying on remembered API shapes.

    14k GitHub starsUsed in 2 repos~775 tokens
    DevelopmentAuto-check passed
  • Moves a package from another TryGhost repository into Ghost as an internal workspace package while keeping its Git history, with checkpoints for the steps that need an administrator.

    55k GitHub stars~3.8k tokensUpdated today
    DevelopmentAuto-check passed
  • Open Code Review CLI

    alibaba/open-code-review

    Runs the ocr command-line tool to review Git changes, a commit or a branch comparison with an AI model, returning line-level comments and optionally applying fixes.

    44k GitHub stars~3.1k tokensUpdated 3 days ago
    DevelopmentAuto-check passed
  • Cutting A Release

    TriliumNext/Trilium

    A skill your agent uses when cutting, preparing, or debugging a Trilium release — bumping the monorepo version, tagging, or diagnosing a failed "Release" workflow run.

    38k GitHub stars~3.2k tokensUpdated today
    DevelopmentAuto-check passed

More from brianlovin/agent-config

All 12 skills in this repo
  • Chrome Webstore Release Blueprint

    brianlovin/agent-config

    Guide a user end-to-end through setting up Chrome Web Store API release automation in any repository.

    376 GitHub starsUsed in 1 repo~2.2k tokens
    Auto-check: notes
  • Electron Wrapper

    brianlovin/agent-config

    Wrap a Bun web app into an Electron desktop app with native window management, auto-updates, code signing, and CI/CD distribution.

    376 GitHub stars~2.3k tokensUpdated 6 mo ago
    Auto-check passed
  • Favicon

    brianlovin/agent-config

    Generate a complete set of favicons from a source image and update HTML.

    376 GitHub starsUsed in 1 repo~2.2k tokens
    Auto-check: notes
  • Playwriter

    brianlovin/agent-config

    Control the user's currently open Chrome tab through the Playwriter CLI (no new browser launch).

    376 GitHub starsUsed in 1 repo~594 tokens
    Auto-check passed
  • Rams

    brianlovin/agent-config

    Run accessibility and visual design review on components. An agent skill from brianlovin/agent-config.

    376 GitHub starsUsed in 1 repo~801 tokens
    Auto-check passed
  • Reclaude

    brianlovin/agent-config

    Refactor CLAUDE.md files to follow progressive disclosure principles.

    376 GitHub starsUsed in 1 repo~981 tokens
    Auto-check passed

Works with

Categories

Questions about Knip

What does Knip do?

Run knip to find and remove unused files, dependencies, and exports. Knip is an agent skill from brianlovin/agent-config. Run knip to find and remove unused files, dependencies, and exports.

When should I use Knip?

Knip fits situations like: cleaning up dead code and unused dependencies.

How do I install Knip in Claude Code?

Run `npx skills add brianlovin/agent-config --skill knip -a claude-code`. Or copy the skill folder (skills/knip in brianlovin/agent-config) into .claude/skills/knip in your project. Claude Code loads it when a task matches its description.

How do I install Knip in Codex?

Run `npx skills add brianlovin/agent-config --skill knip -a codex`. Or copy the skill folder (skills/knip in brianlovin/agent-config) into .agents/skills/knip in your project. Codex loads it when a task matches its description.

Can I use Knip in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add brianlovin/agent-config --skill knip -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/knip, .gemini/skills/knip, .github/skills/knip and .opencode/skills/knip in your project.

What does Knip need to run?

Going by SKILL.md and its folder, Knip needs the command-line tools its instructions call (npx and npm). Our summary lists: Node.js.

Does Knip access the network?

SKILL.md contains no URLs. Its commands use npx and npm, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Knip safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Knip use?

No licence was found for Knip or its repository. Without one, default copyright applies: ask the author before reusing or redistributing it.

How many tokens does Knip use?

About 1.4k tokens (SKILL.md is roughly 5.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Knip?

Skills that share tags, products or a category with Knip: Install Anti-Slop Oxlint Rules (dmmulroy/anti-slop, 5.3k stars), Nx Run Tasks (nomcopter/react-mosaic, 4.8k stars), Get API Docs with chub (andrewyng/context-hub, 14k stars) and Migrate Internal Package into Ghost (TryGhost/Ghost, 55k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Knip?

brianlovin (a GitHub user) maintains it in brianlovin/agent-config, which has 376 GitHub stars. The repository holds 12 skills in this directory. The repository was last updated on March 25, 2026.

Source: brianlovin/agent-config on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.