Token导航 LogoToken导航TokenDH.com
研究检索external-serviceclawhub未标认证来源可访问clear审计提醒

deadcodedeadcode 搜索

Agent Skill

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

总安装

2,280

周安装

95

GitHub Stars

公开资料未说明

下载量

760
OpenClaw

安装说明

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

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

请帮我安装这个 Agent Skill:deadcode(deadcode 搜索)
来源仓库:https://github.com/suhteevah/deadcode
安装命令:
openclaw skills install deadcode
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

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

ClawHubOpenClaw
openclaw skills install deadcode

简介

死代码和未使用的导出检测器 - 扫描 JavaScript/TypeScript、Python、Go、Java 和 CSS 来查找死代码、孤立文件、未使用的导出和代码残渣

SKILL.md

name
deadcode
description
Dead code and unused export detector — scans JavaScript/TypeScript, Python, Go, Java, and CSS for dead code, orphan files, unused exports, and code cruft
homepage
https://deadcode.pages.dev
metadata
user-invocable
true
disable-model-invocation
false

DeadCode -- Dead Code & Unused Export Detector

DeadCode scans source files for dead code, unused exports, orphan files, unreachable code paths, and code cruft across JavaScript/TypeScript, Python, Go, and CSS/SCSS. It uses regex-based pattern matching against 60+ dead code patterns, lefthook for git hook integration, and produces markdown reports with actionable cleanup recommendations.

Commands

Free Tier (No license required)

deadcode scan [file|directory]

One-shot dead code scan of files or directories.

How to execute:

bash "<SKILL_DIR>/scripts/deadcode.sh" scan [target]

What it does:

  1. Accepts a file path or directory (defaults to current directory)
  2. Auto-detects language types (JavaScript/TypeScript, Python, Go, CSS/SCSS)
  3. Finds all source files matching known patterns
  4. Runs 60+ dead code patterns against each file
  5. Runs file-level checks for orphan detection and structural issues
  6. Calculates a dead code score (0-100) per file and overall
  7. Outputs findings with: file, line number, check ID, severity, description, recommendation
  8. Exit code 0 if score >= 70, exit code 1 if too much dead code found
  9. Free tier limited to 5 source files per scan

Example usage scenarios:

  • "Scan my code for dead code" -> runs deadcode scan .
  • "Check this file for unused exports" -> runs deadcode scan src/utils.ts
  • "Find dead code in my Python project" -> runs deadcode scan src/
  • "Are there orphan files in my repo?" -> runs deadcode orphans .

Pro Tier ($19/user/month -- requires DEADCODE_LICENSE_KEY)

deadcode hooks install

Install git pre-commit hooks that scan staged source files before every commit.

How to execute:

bash "<SKILL_DIR>/scripts/deadcode.sh" hooks install

What it does:

  1. Validates Pro+ license
  2. Copies lefthook config to project root
  3. Installs lefthook pre-commit hook
  4. On every commit: scans all staged source files for dead code, blocks commit if critical/high findings, shows cleanup advice

deadcode hooks uninstall

Remove DeadCode git hooks.

bash "<SKILL_DIR>/scripts/deadcode.sh" hooks uninstall

deadcode report [directory]

Generate a markdown dead code report with findings, severity breakdown, and cleanup steps.

bash "<SKILL_DIR>/scripts/deadcode.sh" report [directory]

What it does:

  1. Validates Pro+ license
  2. Runs full scan of the directory
  3. Generates a formatted markdown report from template
  4. Includes per-file breakdowns, dead code scores, cleanup priority
  5. Output suitable for code reviews and tech debt tracking

deadcode orphans [directory]

Find orphan files that are never imported or referenced by any other file.

bash "<SKILL_DIR>/scripts/deadcode.sh" orphans [directory]

What it does:

  1. Validates Pro+ license
  2. Builds an import/reference graph across all source files
  3. Identifies files that are never imported/required/referenced
  4. Excludes entry points (index files, main files, test files, config files)
  5. Reports orphan files with confidence levels

Team Tier ($39/user/month -- requires DEADCODE_LICENSE_KEY with team tier)

deadcode ignore [pattern]

Manage ignore rules for dead code detection.

bash "<SKILL_DIR>/scripts/deadcode.sh" ignore [pattern]

What it does:

  1. Validates Team+ license
  2. Adds/removes patterns to the ignore list in ~/.openclaw/openclaw.json
  3. Patterns can be file globs or check IDs
  4. Supports per-project and global ignore rules

deadcode sarif [directory]

Generate SARIF output for CI/CD integration.

bash "<SKILL_DIR>/scripts/deadcode.sh" sarif [directory]

What it does:

  1. Validates Team+ license
  2. Runs full scan of the directory
  3. Outputs findings in SARIF v2.1.0 format
  4. Compatible with GitHub Code Scanning, Azure DevOps, and other CI systems
  5. Includes rule definitions, locations, and severity mappings

deadcode status

Show license and configuration information.

bash "<SKILL_DIR>/scripts/deadcode.sh" status

Detected Dead Code Patterns

DeadCode detects 60+ dead code patterns across 5 language categories:

CategoryExamplesSeverity
JavaScript/TypeScriptUnused exports, console.log left in code, commented-out blocks, unreachable code after return/throw, empty function bodies, unused variables, dead switch cases, deprecated markers, empty catch blocksCritical/High
PythonFunctions defined but never called, unused imports, pass-only bodies, commented-out code, dead code after return/raise, __all__ mismatches, empty except blocksCritical/High
GoUnused imports, unexported dead functions, dead code after return/panic, empty function bodies, commented-out code, empty init() functionsHigh/Medium
CSS/SCSSUnused CSS classes/IDs, empty rule blocks, duplicate selectors, commented-out styles, !important overuse, unused CSS variables, empty media queries, vendor prefixesMedium/Low
GeneralOrphan files, large comment blocks, TODO/FIXME density, debug/test code in production, placeholder text, feature flag remnantsHigh/Medium

Configuration

Users can configure DeadCode in ~/.openclaw/openclaw.json:

{
  "skills": {
    "entries": {
      "deadcode": {
        "enabled": true,
        "apiKey": "YOUR_LICENSE_KEY_HERE",
        "config": {
          "severityThreshold": "high",
          "ignorePatterns": ["**/test/**", "**/fixtures/**", "**/*.spec.*"],
          "ignoreChecks": [],
          "reportFormat": "markdown"
        }
      }
    }
  }
}

Important Notes

  • Free tier works immediately with no configuration
  • All scanning happens locally -- no code is sent to external servers
  • License validation is offline -- no phone-home or network calls
  • Pattern matching only -- no AST parsing, no external dependencies
  • Supports scanning multiple language types in a single pass
  • Git hooks use lefthook which must be installed (see install metadata above)
  • Exit codes: 0 = clean (score >= 70), 1 = too much dead code (for CI/CD integration)

Error Handling

  • If lefthook is not installed and user tries hooks install, prompt to install it
  • If license key is invalid or expired, show clear message with link to https://deadcode.pages.dev/renew
  • If a file is binary, skip it automatically with no warning
  • If no source files found in target, report clean scan with info message
  • If language type cannot be determined, skip the file gracefully

When to Use DeadCode

The user might say things like:

  • "Scan my code for dead code"
  • "Find unused exports in my project"
  • "Are there orphan files in my repo?"
  • "Check for unreachable code"
  • "Find commented-out code blocks"
  • "Detect unused imports in my Python code"
  • "Generate a dead code report"
  • "Set up pre-commit hooks for dead code detection"
  • "Check for console.log statements left in production"
  • "Find empty function bodies"
  • "Are there any unused CSS classes?"
  • "Scan for TODO/FIXME comments"
  • "Find placeholder code"
  • "Check for debug code left in production"
  • "Generate SARIF output for my CI pipeline"

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

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

04

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

补充不同宿主或平台的使用分布数据

能力 5

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

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

平台分布

OpenClaw

83.74%
按下载量换算636

安全审计

VirusTotal

可疑

ClawScan

通过

Static analysis

通过

权限和风险

external-service

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

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

来源信息

继续浏览同类 Skills