dry 代码审计
- 作者仓库星标 330
- 许可证 MIT
- 作者仓库 claude-skill-registry
DRY Check
Detect duplicate code across your codebase using jscpd.
Subcommands
| Command | Description |
|---|---|
dry or dry scan |
Run duplication scan |
dry report |
Show last scan results |
dry config |
Show current jscpd configuration |
dry init |
Create project-specific jscpd.json |
Parameters
| Parameter | Description | Default |
|---|---|---|
--threshold N |
Minimum token count for duplicate detection (higher = fewer matches) | jscpd default |
--path <dir> |
Directory to scan for duplicates | Current directory |
Examples
# Scan with higher threshold (find only large duplicates)
/bluera-base:dry scan --threshold 100
# Scan specific directory
/bluera-base:dry scan --path src/
# Combine both
/bluera-base:dry scan --threshold 75 --path lib/
Workflow
Phases: Check jscpd → Scan codebase → Report duplicates → Suggest refactors
1. Check jscpd Installation
command -v jscpd || npx jscpd --version
If not installed, suggest: npm install -g jscpd
2. Run Scan
jscpd --reporters json --output .bluera/bluera-base/state/ .
3. Parse Results
Results are stored in .bluera/bluera-base/state/jscpd-report.json
4. Refactoring Guidance
See skills/dry-refactor/SKILL.md for language-specific refactoring patterns.
- 流狐分类
- 数据
- 作者声明 Agent
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 94 / 100 · 启发式扫描,不代表运行安全
- 作者 / 版本 / 许可
- @majiayu000 · MIT
- 流狐 Token 估算
- 低消耗
- 流狐接入估算
- 即装即用
- 是否需要外部 API Key
- 未发现要求
- 检测到的系统要求
- macOS · Linux · Windows
- 底层运行要求
- 未声明
- 检测到的文件与系统行为
-
- 只读
- 允许写入 / 修改
- 检测到的网络行为
- 仅限本地
- 安装命令数
- 无(仅作为资料)
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
# 3. Parse Results
Results are stored in `.bluera/bluera-base/state/jscpd-report.json` Command · Description dry or dry scan · Run duplication scan dry report · Show last scan results
Parameter · Description · Default --threshold N · Minimum token count for duplicate detection (higher = fewer matches) · jscpd default --path <dir> · Directory to scan for duplicates · Current directory
Examples
Phases: Check jscpd → Scan codebase → Report duplicates → Suggest refactors
If not installed, suggest: npm install -g jscpd
2. Run Scan
# DRY Check
Detect duplicate code across your codebase using jscpd.
## Subcommands
| Command | Description |
|---------|-------------|
| `dry` or `dry scan` | Run duplication scan |
| `dry report` | Show last scan results |
| `dry config` | Show current jscpd configuration |
| `dry init` | Create project-specific jscpd.json |
## Parameters
| Parameter | Description | Default |
|-----------|-------------|---------|
| `--threshold N` | Minimum token count for duplicate detection (higher = fewer matches) | jscpd default |
| `--path <dir>` | Directory to scan for duplicates | Current directory |
## Examples
```bash
# Scan with higher threshold (find only large duplicates)
/bluera-base:dry scan --threshold 100
# Scan specific directory
/bluera-base:dry scan --path src/
# Combine both
/bluera-base:dry scan --threshold 75 --path lib/
```
## Workflow
**Phases:** Check jscpd → Scan codebase → Report duplicates → Suggest refactors
### 1. Check jscpd Installation
```bash
command -v jscpd || npx jscpd --version
```
If not installed, suggest: `npm install -g jscpd`
### 2. Run Scan
```bash
jscpd --reporters json --output .bluera/bluera-base/state/ .
```
### 3. Parse Results
Results are stored in `.bluera/bluera-base/state/jscpd-report.json`
### 4. Refactoring Guidance
See skills/dry-refactor/SKILL.md for language-specific refactoring patterns. 作者原文负责流程事实;流狐只索引当前章节、要点、文件与命令。
章节 -> Subcommands → Parameters → Examples → Workflow → 1. Check jscpd Installation → 2. Run Scan
要点 -> Phases · Detect duplicate code across your codebase using jscpd. · See skills/dry-refactor/SKILL.md for language-specific refactoring patterns.
文件/命令 -> dry · dry scan · dry report · dry config · dry init · --threshold N · --path <dir> · npm install -g jscpd
内容 SHA-256 -> e9eb5a84dd82
方法与流程
适用与边界
原文中的明确线索
dry、dry scan、dry report、dry config、dry init、--threshold N、--path <dir>、npm install -g jscpd