Token导航 LogoToken导航TokenDH.com
研究检索执行命令github未标认证来源可访问许可证需确认审计通过

configure-dead-code配置死代码

Agent Skill

configure-dead-code 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

1,344

周安装

56

GitHub Stars

28

下载量

448
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:configure-dead-code(配置死代码)
来源仓库:https://github.com/laurigates/claude-plugins
仓库路径:skills/configure-dead-code
安装命令:
npx skills add https://github.com/laurigates/claude-plugins --skill configure-dead-code
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/laurigates/claude-plugins --skill configure-dead-code

简介

configure-dead-code 用于配置死代码检测工具链,支持 knip、vulture 和 cargo-machete。

  • 适用于代码库清理与技术债务识别场景。
  • 可辅助排查误报并制定迁移策略。configure-dead-code 属于研究检索类 Skill,可作为该场景下的辅助能力补充。
  • 包含系统命令执行,需确认其对构建流程的影响。
  • 建议先备份再执行大规模清理操作。

SKILL.md

/configure:dead-code

Check and configure dead code detection tools.

When to Use This Skill

Use this skill when...Use another approach when...
Setting up dead code detection for a new projectRunning an existing dead code scan (knip, vulture)
Auditing whether Knip, Vulture, or cargo-machete is configured correctlyManually removing specific unused exports or imports
Migrating between dead code detection toolsDebugging why a specific file is flagged as unused
Adding dead code checks to CI/CD pipelinesReviewing dead code findings one by one
Standardizing dead code detection across a monorepoConfiguring linting rules (/configure:linting instead)

Context

  • Project root:!pwd
  • Package files:!find. -maxdepth 1 \(-name 'package.json' -o -name 'pyproject.toml' -o -name 'Cargo.toml' \)
  • Knip config:!find. -maxdepth 1 \(-name 'knip.json' -o -name 'knip.config.*' \)
  • Vulture config:!find. -maxdepth 1 \(-name '.vulture' -o -name 'vulture.ini' \)
  • Pre-commit:!find. -maxdepth 1 -name '.pre-commit-config.yaml'
  • Project standards:!find. -maxdepth 1 -name '.project-standards.yaml'

Parameters

Parse from command arguments:

  • --check-only: Report compliance status without modifications (CI/CD mode)
  • --fix: Apply fixes automatically without prompting
  • --tool <knip|vulture|deadcode|machete>: Override tool detection

Dead code detection tools:

  • JavaScript/TypeScript: Knip (finds unused files, exports, dependencies)
  • Python: Vulture or deadcode (finds unused code)
  • Rust: cargo-machete (finds unused dependencies)

Execution

Execute this dead code detection compliance check:

Step 1: Detect project language and existing tools

Check for language and tool indicators:

IndicatorLanguageTool
knip.json or knip.config.*JavaScript/TypeScriptKnip
package.json with knipJavaScript/TypeScriptKnip
pyproject.toml [tool.vulture]PythonVulture
.vulture or vulture.iniPythonVulture
Cargo.tomlRustcargo-machete

Use WebSearch or WebFetch to verify latest versions before configuring.

Step 2: Analyze current configuration

For the detected tool, check configuration completeness:

Knip:

  • Config file exists (knip.json or knip.config.*)
  • Entry points configured
  • Ignore patterns set
  • Plugin configurations
  • Workspace support (monorepo)
  • CI integration

Vulture:

  • Configuration file exists
  • Minimum confidence set
  • Paths configured
  • Ignore patterns
  • Allowlist file (if needed)

cargo-machete:

  • Installed as cargo subcommand
  • Workspace configuration
  • CI integration

Step 3: Generate compliance report

Print a formatted compliance report:

Dead Code Detection Compliance Report
======================================
Project: [name]
Language: [TypeScript | Python | Rust]
Tool: [Knip 5.x | Vulture 2.x | cargo-machete 0.6.x]

Configuration:
  Config file             knip.json                  [EXISTS | MISSING]
  Entry points            configured                 [CONFIGURED | AUTO-DETECTED]
  Ignore patterns         node_modules, dist         [CONFIGURED | INCOMPLETE]
  Plugin support          enabled                    [ENABLED | N/A]

Detection Scope:
  Unused files            enabled                    [ENABLED | DISABLED]
  Unused exports          enabled                    [ENABLED | DISABLED]
  Unused dependencies     enabled                    [ENABLED | DISABLED]
  Unused types            enabled                    [ENABLED | DISABLED]

Scripts:
  dead-code command       package.json scripts       [CONFIGURED | MISSING]

Integration:
  Pre-commit hook         .pre-commit-config.yaml    [OPTIONAL | MISSING]
  CI/CD check             .github/workflows/         [CONFIGURED | MISSING]

Overall: [X issues found]

If --check-only, stop here.

Step 4: Configure dead code detection (if --fix or user confirms)

Apply configuration based on detected language. Use templates from REFERENCE.md:

  1. Install tool (e.g., bun add --dev knip, uv add --group dev vulture)
  2. Create config file with entry points, exclusions, and plugins
  3. Add scripts to package.json or create run commands
  4. Add CI workflow step (warning mode, not blocking)

Step 5: Update standards tracking

Update .project-standards.yaml:

standards_version: "2025.1"
last_configured: "[timestamp]"
components:
  dead_code: "2025.1"
  dead_code_tool: "[knip|vulture|deadcode|machete]"
  dead_code_ci: true

Step 6: Print final report

Print a summary of changes applied, run an initial scan if possible, and provide next steps for reviewing findings.

For detailed configuration templates and usage examples, see REFERENCE.md.

Agentic Optimizations

ContextCommand
Quick compliance check/configure:dead-code --check-only
Auto-fix all issues/configure:dead-code --fix
Run Knip scan (JS/TS)npx knip --reporter compact
Run Vulture scan (Python)vulture. --min-confidence 80
Run cargo-machete (Rust)cargo machete
CI mode (JSON output)npx knip --reporter json

Flags

FlagDescription
--check-onlyReport status without offering fixes
--fixApply all fixes automatically without prompting
--tool <tool>Override tool detection (knip, vulture, deadcode, machete)

Examples

# Check compliance and offer fixes
/configure:dead-code

# Check only, no modifications
/configure:dead-code --check-only

# Auto-fix with Knip
/configure:dead-code --fix --tool knip

Error Handling

  • No language detected: Cannot determine appropriate tool, error
  • Tool installation fails: Report error, suggest manual installation
  • Configuration conflicts: Warn about multiple tools, suggest consolidation
  • High number of findings: Suggest starting with allowlist

See Also

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

33.94%
按下载量换算152

Claude

31.56%
按下载量换算141

Cursor

19.35%
按下载量换算87

Gemini CLI

9.21%
按下载量换算41

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/laurigates/claude-plugins --skill configure-dead-code 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills