agent-browser
Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking…
Run knip to find and remove unused files, dependencies, and exports. Use for cleaning up dead code and unused dependencies.
$ npx -y skills add brianlovin/agent-config --skill knip --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/knipContext preview
The summary Claude sees to decide when to auto-load this skill.
Run knip to find and remove unused files, dependencies, and exports. Use for cleaning up dead code and unused dependencies.
name: knip description: Run knip to find and remove unused files, dependencies, and exports. Use for cleaning up dead code and unused dependencies.
Run knip to find and remove unused files, dependencies, and exports from this codebase.
1. Check if knip is available:
2. Knip does NOT remove unused imports/variables inside files — that's a linter's job. Knip finds unused files, dependencies, and exports across the project.
Always follow this configuration-first workflow. Even for simple "run knip" or "clean up codebase" prompts, configure knip properly before acting on reported issues.
npx knip
Focus on **configuration hints** before anything else. These appear at the top of the output and suggest config adjustments to reduce false positives.
Fix configuration hints before addressing reported issues. Common adjustments:
Re-run knip after each config change. Repeat until configuration hints are resolved and false positives are minimized.
Once the configuration is settled, work through reported issues. Prioritize in this order:
1. **Unused files** — address these first ("inbox zero" approach removes the most noise) 2. **Unused dependencies** — remove from package.json 3. **Unused devDependencies** — remove from package.json 4. **Unused exports** — remove or mark as internal 5. **Unused types** — remove, or configure `ignoreExportsUsedInFile` (see below)
Re-run knip after each batch of fixes. Removing unused files often exposes newly-unused exports and dependencies.
When reviewing or creating a knip config, follow these rules:
Use `--production` to focus on production code only:
npx knip --production
This excludes test files, config files, and other non-production entry points. Do NOT use `project` or `ignore` patterns to exclude test files — use `--production` instead.
Use the AskUserQuestion tool to clarify before deleting these.
Once configuration is settled and you're confident in the results:
# Auto-fix safe changes (removes unused exports and dependencies) npx knip --fix # Auto-fix including file deletion npx knip --fix --allow-remove-files
Only use `--fix` after the configuration-first workflow is complete.
If knip exits with code 2 (unexpected error like "error loading file"):
# Basic run npx knip # Production only (excludes test/config entry points) npx knip --production # Auto-fix what's safe npx knip --fix # Auto-fix including file deletion npx knip --fix --allow-remove-files # JSON output for parsing npx knip --reporter json
My agent configuration for Claude Code and Codex.
Repo: brianlovin/agent-config
Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking…
Use Bun instead of Node.js, npm, pnpm, or vite. Provides command mappings, Bun-specific APIs, and development patterns.
Guide a user end-to-end through setting up Chrome Web Store API release automation in any repository. Use when asked to walk someone through OAuth/CWS…
Remove AI-generated code slop from the current branch. Use after writing code to clean up unnecessary comments, defensive checks, and inconsistent style.
Generate a complete set of favicons from a source image and update HTML. Use when setting up favicons for a web project.
Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express…