find-simplifications

Detects dead code, orphan files, and unused exports across the qwen-code repository with evidence-first proofs.

27.5k|3.0k|Updated Jun 26, 2025
One-click install
npx skills add https://github.com/QwenLM/qwen-code --skill find-simplifications
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: find-simplifications
Source: https://github.com/QwenLM/qwen-code/tree/main/.qwen/skills/find-simplifications
Command: npx skills add https://github.com/QwenLM/qwen-code --skill find-simplifications

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Large repositories accumulate dead surface over time: files nothing imports, components reachable only from their own tests, orphaned i18n locale keys, stale allowlist entries, and exports no consumer uses. Manually proving something is truly unused is error-prone because consumers hide in build scripts, runtime loaders, published packages, and store manifests that no import grep can see.

Core Features & Use Cases

  • Repo-wide dead surface survey: Sweeps the qwen-code codebase for six candidate classes (orphan files, dead components with tests, stale registry rows, orphan locale keys, added-then-removed scaffolding, unused exports) using an eight-step proof protocol covering recency gates, published-surface reachability, full-corpus greps, and hidden-consumer checks.
  • Issue-first governance workflow: Files candidates as comments on a tracking issue and only lands deletions after explicit maintainer assent, keeping a tombstone ledger so declined candidates are never re-proposed.
  • Guarded landing phase: Re-verifies evidence against current origin/main, deletes the surface plus its tests, snapshots, locale keys, and docs rows, then runs build, typecheck, lint, and targeted vitest gates before opening a single-candidate PR.
  • Use Case: A maintainer asks for a quarterly cleanup sweep; the skill surveys packages/cli/src, proves three components have no production consumer, files them on the tracking issue, and later lands the one a maintainer approved as a single focused PR.

Quick Start

Ask the agent to run the find-simplifications survey over the qwen-code repository and file any dead-code candidates it proves on the tracking issue.

Frequently Asked Questions about find-simplifications

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find dead code in a large TypeScript monorepo?

Run the survey phase, which greps the full corpus for six candidate classes including orphan files, dead components, and unused exports. Each candidate must pass an eight-step proof protocol covering recency, published-surface reachability, and hidden consumers before it is filed.

How does the skill prove a symbol has no consumers?

It runs a full-corpus ripgrep excluding tests and snapshots, then checks hidden-consumer channels like build scripts, dynamic imports, string-keyed lookups, generated artifacts, and protocol mirrors. A candidate whose consumers cannot all be named is dropped, not downgraded.

Can this skill delete code from published npm packages?

No. Everything under packages/core/src, packages/audio-capture, packages/channels, the SDKs, and shipped extensions is report-only territory because consumers import from registries or tarballs. Deletions are only landed in landable territory like packages/cli/src internals and scripts.

Why does the skill file an issue instead of opening a PR directly?

Unrequested batch deletions get closed, so the survey phase only files candidates as comments on a tracking issue. A deletion PR is opened only after a maintainer explicitly approves one candidate, and the issue doubles as a tombstone ledger preventing re-proposals.

What happens if a candidate was recently added to the repo?

The recency gate dates every surface with git log pickaxe or fixed-string search and silently drops anything younger than about 90 days. Young surface is treated as a feature still being wired up, not dead code.

When should I use this instead of the bundled /simplify or /review skills?

Use this skill for repo-wide accumulated surface with no diff to anchor on. The bundled /simplify handles the diff you just wrote, /review judges an existing change, and /repo-hygiene handles provable defects rather than correct-but-unused code.