Token导航 LogoToken导航

Agent Skill · 研究检索

techdebt(techdebt 搜索)

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

techdebt 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为接触敏感数据;许可证信息还不明确,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 55,679。

总安装 470周安装 20GitHub Stars 17下载 165核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/0xdarkmatter/claude-mods --skill techdebt

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

适用于在 Codex、Claude、 Cursor 和 Gemini CLI 中快速识别代码质量问题。核心能力包括并行扫描重复代码、安全漏洞、复杂度和死代码。可通过命令 /techdebt 或带参数 /techdebt --deep 等启动扫描任务。

安装前请确认是否需联网、执行命令或读写文件,并检查仓库维护状态与权限范围。

来源仓库内路径:skills/techdebt

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/0xdarkmatter/claude-mods --skill techdebt;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

techdebt 怎么安装?

在终端执行 npx skills add https://github.com/0xdarkmatter/claude-mods --skill techdebt。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

techdebt 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

techdebt 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

techdebt 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

techdebt 用的人多吗?

公开数据是累计安装 470 次,近一周安装 20 次,下载 165 次,GitHub 17 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

techdebt 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
techdebt

techdebt 搜索 · 本页

47017接触敏感数据未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Tech Debt Scanner

Automated technical debt detection using parallel subagents. Designed to run at session end to catch issues while context is fresh.

Quick Start

# Session end - scan changes since last commit (default)
/techdebt

# Deep scan - analyze entire codebase
/techdebt --deep

# Specific categories
/techdebt --duplicates    # Only duplication
/techdebt --security      # Only security issues
/techdebt --complexity    # Only complexity hotspots
/techdebt --deadcode      # Only dead code

# Auto-fix mode (interactive)
/techdebt --fix

Architecture

Always uses parallel subagents for fast analysis:

Main Agent (orchestrator)
    │
    ├─> Subagent 1: Duplication Scanner
    ├─> Subagent 2: Security Scanner
    ├─> Subagent 3: Complexity Scanner
    └─> Subagent 4: Dead Code Scanner

    ↓ All run in parallel (2-15s depending on scope)

Main Agent: Consolidate findings → Rank by severity → Generate report

Benefits:

  • 🚀 Parallel execution - all scans run simultaneously
  • 🧹 Clean main context - no pollution from analysis work
  • 💪 Scalable - handles large codebases efficiently
  • 🎯 Fast - even small diffs benefit from parallelization

Workflow

Step 1: Determine Scope

Default (no flags):

  • Scan files changed since last commit: git diff --name-only HEAD
  • Fast session-end workflow (~2-3 seconds)
  • Perfect for "wrap up" scenarios

Deep scan (--deep flag):

  • Scan entire codebase
  • Comprehensive analysis (~10-15 seconds for medium projects)
  • Use when refactoring or preparing major releases

Specific category (e.g., --duplicates):

  • Run only specified scanner
  • Fastest option for targeted analysis

Step 2: Spawn Parallel Subagents

Launch 4 subagents simultaneously (or subset if category specified):

Subagent 1: Duplication Scanner

  • Task: Find duplicated code blocks using AST similarity
  • Tools: ast-grep, structural search, token analysis
  • Output: List of duplicate code blocks with similarity scores

Subagent 2: Security Scanner

  • Task: Detect security vulnerabilities and anti-patterns
  • Checks: Hardcoded secrets, SQL injection, XSS, insecure crypto
  • Output: Security findings with severity and remediation guidance

Subagent 3: Complexity Scanner

  • Task: Identify overly complex functions and methods
  • Metrics: Cyclomatic complexity, nested depth, function length
  • Output: Complexity hotspots with refactoring suggestions

Subagent 4: Dead Code Scanner

  • Task: Find unused imports, variables, and unreachable code
  • Checks: Unused imports, dead branches, orphaned functions
  • Output: Dead code list with safe removal instructions

Subagent instructions template:

Scan {scope} for {category} issues.

## Domain Knowledge
Before scanning, read the relevant skill for deeper patterns:
- Security scanner: Read skills/security-ops/references/owasp-detailed.md
- Complexity scanner: Read skills/refactor-ops/SKILL.md

Scope: {file_list or "entire codebase"}
Language: {detected from file extensions}
Focus: {category-specific patterns}

Output format:
- File path + line number
- Issue description
- Severity (P0-P3)
- Suggested fix (if available)

Use appropriate tools:
- Duplication: ast-grep for structural similarity
- Security: pattern matching + known vulnerability patterns
- Complexity: cyclomatic complexity calculation
- Dead Code: static analysis for unused symbols

Step 3: Consolidate Findings

Main agent collects results from all subagents and:

  1. Deduplicate - Remove duplicate findings across categories
  2. Rank by severity:

- P0 (Critical): Security vulnerabilities, blocking issues - P1 (High): Major duplication, high complexity - P2 (Medium): Minor duplication, moderate complexity - P3 (Low): Dead code, style issues

  1. Group by file - Organize findings by affected file
  2. Calculate debt score - Overall technical debt metric

Step 4: Generate Report

Create actionable report with:

# Tech Debt Report

**Scope:** {X files changed | Entire codebase}
**Scan Time:** {duration}
**Debt Score:** {0-100, lower is better}

## Summary

| Category | Findings | P0 | P1 | P2 | P3 |
|----------|----------|----|----|----|----|
| Duplication | X | - | X | X | - |
| Security | X | X | - | - | - |
| Complexity | X | - | X | X | - |
| Dead Code | X | - | - | X | X |

## Critical Issues (P0)

### {file_path}:{line}
**Category:** {Security}
**Issue:** Hardcoded API key detected
**Impact:** Credential exposure risk
**Fix:** Move to environment variable

## High Priority (P1)

### {file_path}:{line}
**Category:** {Duplication}
**Issue:** 45-line block duplicated across 3 files
**Impact:** Maintenance burden, inconsistency risk
**Fix:** Extract to shared utility function

[... continue for all findings ...]

## Recommendations

1. Address all P0 issues before merge
2. Consider refactoring high-complexity functions
3. Remove dead code to reduce maintenance burden

## Auto-Fix Available

Run `/techdebt --fix` to interactively apply safe automated fixes.

Step 5: Auto-Fix Mode (Optional)

If --fix flag provided:

  1. Identify safe fixes:

- Dead import removal (safe) - Simple duplication extraction (review required) - Formatting fixes (safe)

  1. Interactive prompts: Fix: Remove unused import 'requests' from utils.py:5 [Y]es / [N]o / [A]ll / [Q]uit
  2. Apply changes:

- Edit files with confirmed fixes - Show git diff of changes - Prompt for commit

Safety rules:

  • Never auto-fix security issues (require manual review)
  • Never auto-fix complexity (requires design decisions)
  • Only auto-fix with explicit user confirmation

Detection Patterns

Duplication

AST Similarity Detection:

  • Use ast-grep for structural pattern matching
  • Detect code blocks with >80% structural similarity
  • Ignore trivial differences (variable names, whitespace)

Token-based Analysis:

  • Compare token sequences for exact duplicates
  • Minimum threshold: 6 consecutive lines
  • Group similar duplicates across files

Thresholds:

  • P1: 30+ lines duplicated in 3+ locations
  • P2: 15+ lines duplicated in 2+ locations
  • P3: 6+ lines duplicated in 2 locations

Security

Pattern Detection:

PatternSeverityExample
Hardcoded secretsP0API_KEY = "sk-..."
SQL injection riskP0f"SELECT * FROM users WHERE id={user_id}"
Insecure cryptoP0hashlib.md5(), random.random() for tokens
Path traversalP0open(user_input) without validation
XSS vulnerabilityP0Unescaped user input in HTML
Eval/exec usageP1eval(user_input)
Weak passwordsP2Hardcoded default passwords

Language-specific checks:

  • Python: pickle usage, yaml.load() without SafeLoader
  • JavaScript: eval(), innerHTML with user data
  • SQL: String concatenation in queries

Complexity

Metrics:

MetricP1 ThresholdP2 Threshold
Cyclomatic Complexity>15>10
Function Length>100 lines>50 lines
Nested Depth>5 levels>4 levels
Number of Parameters>7>5

Refactoring suggestions:

  • Extract method for long functions
  • Introduce parameter object for many parameters
  • Simplify conditionals with guard clauses
  • Break up deeply nested logic

Dead Code

Detection methods:

  • Unused imports (language-specific linters)
  • Unreachable code (after return/break/continue)
  • Unused variables (written but never read)
  • Orphaned functions (never called in codebase)

Safe removal criteria:

  • No external references found
  • Not part of public API
  • Not dynamically imported/called

Language Support

Tier 1 (Full support):

  • Python: ast-grep, radon, pylint
  • JavaScript/TypeScript: ast-grep, eslint, jscpd
  • Go: gocyclo, golangci-lint
  • Rust: clippy, cargo-audit

Tier 2 (Basic support):

  • Java, C#, Ruby, PHP: Pattern-based detection only

Language detection:

  • Auto-detect from file extensions
  • Use appropriate tools per language
  • Fallback to universal patterns if specific tools unavailable

Integration Patterns

Session End Automation

Add to your workflow:

## Session Wrap-Up Checklist

- [ ] Run `/techdebt` to scan changes
- [ ] Address any P0 issues found
- [ ] Create tasks for P1/P2 items
- [ ] Commit clean code

Pre-Commit Hook

Create .claude/hooks/pre-commit.sh:

#!/bin/bash
# Auto-run tech debt scan before commits

echo "🔍 Scanning for tech debt..."
claude skill techdebt --quiet

if [ $? -eq 1 ]; then
  echo "❌ P0 issues detected. Fix before committing."
  exit 1
fi

echo "✅ No critical issues found"

CI/CD Integration

Run deep scan on pull requests:

# .github/workflows/techdebt.yml
name: Tech Debt Check
on: [pull_request]
jobs:
  scan:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - name: Run tech debt scan
        run: claude skill techdebt --deep --ci

Advanced Usage

Baseline Tracking

Track debt over time:

# Initial baseline
/techdebt --deep --save-baseline

# Compare against baseline
/techdebt --compare-baseline
# Output: "Debt increased by 15% since baseline"

Baseline stored in .claude/techdebt-baseline.json:

{
  "timestamp": "2026-02-03T10:00:00Z",
  "commit": "a28f0fb",
  "score": 42,
  "findings": {
    "duplication": 8,
    "security": 0,
    "complexity": 12,
    "deadcode": 5
  }
}

Custom Patterns

Add project-specific patterns in .claude/techdebt-rules.json:

{
  "security": [
    {
      "pattern": "TODO.*security",
      "severity": "P0",
      "message": "Security TODO must be resolved"
    }
  ],
  "complexity": {
    "cyclomatic_threshold": 12,
    "function_length_threshold": 80
  }
}

Report Formats

/techdebt --format=json     # JSON output for tooling
/techdebt --format=markdown # Markdown report (default)
/techdebt --format=sarif    # SARIF for IDE integration

Troubleshooting

Issue: Scan times out

  • Solution: Use --deep only on smaller modules, or increase timeout
  • Consider: Break large codebases into smaller scan chunks

Issue: Too many false positives

  • Solution: Adjust thresholds in .claude/techdebt-rules.json
  • Consider: Use --ignore-patterns flag to exclude test files

Issue: Missing dependencies (ast-grep, etc.)

  • Solution: Install tools via npm install -g @ast-grep/cli or skip category
  • Fallback: Pattern-based detection still works without specialized tools

Best Practices

  1. Run at every session end - Catch debt while context is fresh
  2. Address P0 immediately - Don't commit critical issues
  3. Create tasks for P1/P2 - Track technical debt in backlog
  4. Use baselines for trends - Monitor debt accumulation over time
  5. Automate in CI/CD - Prevent debt from merging
  6. Educate team - Share findings, discuss refactoring strategies

References

See also:

平台分布

Codex

34.12%
按下载量换算56

Claude

30.92%
按下载量换算51

Cursor

17.81%
按下载量换算29

Gemini CLI

9.34%
按下载量换算15

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

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

继续浏览同类 Skills