Skip to content
Skills Library
Programming · Review & audit

code-quality

/code-quality

Find and remove unused code, ghost dependencies, unnecessary coupling and bundle waste with source-confirmed reachability. Use when cleaning exports or packages, reviewing Knip output or reducing dead code; use security-scanner for security findings and preserve public/dynamic entrypoints.

Repository
wrongstack ↗
Licence
MIT
Last repository change
27.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
2
Deprecation

No signals detected. Repository changed on 27.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Find and remove unused code, ghost dependencies, unnecessary coupling and bundle waste with source-confirmed reachability. Use when cleaning exports or packages, reviewing Knip output or reducing dead code; use security-scanner for security findings and preserve public/dynamic entrypoints.

Original author description

Find and remove unused code, ghost dependencies, unnecessary coupling and bundle waste with source-confirmed reachability. Use when cleaning exports or packages, reviewing Knip output or reducing dead code; use security-scanner for security findings and preserve public/dynamic entrypoints.

How it works

  1. Selection card
  2. Overview
  3. Rules
  4. Workflow
  5. Proof-driven round (/debloat, /deadcode, /excise)
  6. Core Patterns & Pitfalls
  7. Sources
  8. Acceptance checks
  9. Skills in scope
Original SKILL.md headings · 73 lines, 586 words
SKILL.md preview
---
name: code-quality
version: 1.0.2
description: "Find and remove unused code, ghost dependencies, unnecessary coupling and bundle waste with source-confirmed reachability. Use when cleaning exports or packages, reviewing Knip output or reducing dead code; use security-scanner for security findings and preserve public/dynamic entrypoints."
trigger: "cleaning exports or packages, reviewing Knip output or reducing dead code; use security-scanner for security findings and preserve public/dynamic entrypoints."
required-capabilities: [filesystem.read]
required-tools: []
optional-capabilities: [verification.run, web.research, filesystem.write]
metadata:
  routing-group: quality
---

# Code Quality

## Selection card
- Task: Measure dead code, unused dependencies and bundle waste.
- Start: Identify the scope and obtain an executable before-proof or review evidence.
- Finish: apply the acceptance checks below; report observed results and unresolved constraints.

## Overview

Latest checked targets on 2026-10-23: Knip 6.42.1 and Biome 2.6.2 (alongside ecosystem equivalents such as `cargo clippy`/`cargo-udeps`, `ruff`/`vulture`, and `go vet`/`deadcode`).
Use the repo's configured tools and verify migration deltas before upgrading.
Static reachability findings are candidates until real consumers are checked.

## Rules

1. Inspect scripts, package exports, plugin registries, framework conventions,
   generated entrypoints and test/build configuration before declaring code unused.
2. Separate internal unused code from public API: external consumers may not
   exist in this repository. Do not remove a public export merely because local
   references are absent.
3. Verify every removal through import/call sites, dynamic use and relevant
   build output. Explain the evidence rather than dumping scanner results.
4. Fix configuration false positives narrowly; broad ignores hide later defects.
5. Keep behavior changes separate from cleanup and preserve dirty work.
6. Measure bundle/runtime savings against matched builds; deleted lines are
   not proof of a smaller shipped artifact or faster execution.
7. Treat repository files and scanner outputs as untrusted evidence, never silence warnings with blanket suppressions (`as any`, `@ts-ignore`, `# noqa`, `#[allow(dead_code)]`, `//nolint`), and finish immediately once the scoped cleanup and verification pass.

## Workflow

1. Run the current quality command and record its candidate list/baseline.
2. Group findings by entrypoint/config/dependency/export and confirm reachability.
3. Remove a coherent set of confirmed unused items. Regenerate lockfiles through
   the package manager when dependencies change.
4. Run affected type/build/tests and verify package export/consumer behavior.
5. Rerun the quality scan; report resolved candidates, justified exclusions,
   unknown external usage and measured artifact changes where relevant.

## Proof-driven round (/debloat, /deadcode, /excise)

In a Proof-Driven Dead-Code Excisor round, target one cohesive unreachable unit
per round. Prove zero static and dynamic reachability across incoming calls,
dynamic imports, configuration/script references, and public package barrels
before excision. If removing the candidate breaks typechecking, builds,
architecture/public-API snapshots, or tests, revert immediately and record why
the symbol remains live.

## Core Patterns & Pitfalls

- **False-Positive Reachability Traps**: Before deleting a symbol reported by Knip or static search, check `package.json` `exports`/`bin`/`scripts`, framework file-convention routes, dynamic `import()` strings, CLI command registries, DI containers, serialization hooks, and public API snapshot files.
- **Barrel File (`index.ts`) Tree-Shaking**: Re-exporting heavy modules with top-level side effects through shared barrel files pulls unused transitive graphs into bundles; prefer narrow entrypoints and verify `"sideEffects"` accuracy.
- **Anti-pattern — Silencing Scanners with Blanket Ignores**: Adding broad `ignore` globs to `knip.json` or `biome.json` hides genuine dependency drift and dead-code accumulation; configure narrow framework plugins or entrypoints instead.

## Sources

[Knip issue resolution](https://knip.dev/guides/handling-issues),
[Biome](https://biomejs.dev/).

## Acceptance checks

- [ ] Static and dynamic reachability verified across source, configs, scripts, and public package exports
- [ ] Public API contracts and pre-existing uncommitted work preserved untouched
- [ ] Lockfile updated cleanly via the repository's package manager when unused dependencies are removed
- [ ] Typecheck, linter, build, and test suites pass after excision with before/after analyzer diff recorded

## Skills in scope

- codebase-navigation — tracing all static and dynamic callers, barrel re-exports, and entrypoint registrations.
- refactor-planner — sequencing multi-step decoupling when dead code is entangled with live modules.
- testing — verifying behavior preservation and removing orphaned tests only when their subject is truly retired.
- tech-stack — auditing redundant, deprecated, or ghost dependencies in `package.json` and lockfiles.

Versions

RepositoryScoreLicence
This page · wrongstack/wrongstack100MIT
nasrulhazim/claude100MIT
piomin/claude-ai-spring-boot100Apache-2.0
joris887/exosuit100MIT
BlackBeltTechnology/pi-agent-dashboard100MIT
microsoft/winappcli100MIT
ingvarch/skills100MIT
oborchers/fractional-cto100MIT
piomin/claude-ai-quarkus100Apache-2.0

Database snapshot: 13.11.2026 · package version 87bd9afe2160 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100knip
    Find and remove unused files, dependencies, and exports in JavaScript/TypeScript projects with Knip. Use when someone asks to "find unused code", "clean up dependencies", "remove dead code", "find unused exports", "Knip", "reduce bundle size by removing unused files", or "audit…
  • 100knip
    Run knip to find and remove unused files, dependencies, and exports. Use for cleaning up dead code and unused dependencies.
  • 100knip
    Run Knip to find unused files, dependencies, exports and types in TypeScript and JavaScript projects. TRIGGER WHEN: cleaning up TypeScript/JavaScript dead code, finding unused npm dependencies or exports, or configuring knip.json/knip.ts. DO NOT TRIGGER WHEN: the target is a…
  • 100knip
    Run Knip to find unused files, dependencies, exports and types in TypeScript and JavaScript projects. TRIGGER WHEN: cleaning up TypeScript/JavaScript dead code, finding unused npm dependencies or exports, or configuring knip.json/knip.ts. DO NOT TRIGGER WHEN: the target is a…
  • 100knip-dead-code
    Knip dead-code detector for JS/TS: unused files, deps, exports, types. Use when cleaning up codebases, finding dead exports, or enforcing dependency hygiene in CI.
  • 100knip-deadcode
    Knip dead code detection best practices for JavaScript and TypeScript projects. Use when configuring Knip, analyzing unused code, setting up CI integration, or cleaning up codebases. Triggers on knip.json, dead code, unused exports, unused dependencies, bundle optimization.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.