Token导航 LogoToken导航

Agent Skill · 研究检索

dry-consolidation(干固结)

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

dry-consolidation 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为执行命令;许可证信息还不明确,第三方扫描有提醒项,按安装量在研究检索类的 73,675 个 Skill 里排第 38,503。

总安装 1,551周安装 64GitHub Stars 28下载 507核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/laurigates/claude-plugins --skill dry-consolidation

这个 Skill 是做什么的

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

该技能系统化提取重复代码为共享抽象,提供可测试的重构方案。适用于多文件重复代码块和组件间公共逻辑提取。包含 shell 命令执行能力,可直接修改代码结构。安装需从 GitHub 仓库获取,使用前应仔细审查将要执行的 shell 命令。涉及生产代码修改时,应先在测试环境验证重构结果,确保功能不受影响。

来源仓库内路径:skills/dry-consolidation

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

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

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

    它需要执行命令,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

dry-consolidation 怎么安装?

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

dry-consolidation 支持哪些 AI 工具?

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

dry-consolidation 需要什么权限?

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

dry-consolidation 是免费的吗?

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

dry-consolidation 用的人多吗?

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

dry-consolidation 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

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

值得选的地方

  • 同时适配 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调用外部服务未明确有提醒
dry-consolidation

干固结 · 本页

1,55128执行命令未明确有提醒

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

SKILL.md 原文

DRY Consolidation

Systematic extraction of duplicated code into shared, tested abstractions.

When to Use This Skill

Use this skill when...Use these instead when...
Multiple files have identical/near-identical code blocksSingle file needs cleanup → /code:refactor
Copy-pasted utility functions across componentsLooking for anti-patterns without fixing → /code:antipatterns
Repeated UI patterns (dialogs, pagination, error states)Functional refactoring of a file or directory → /code:refactor
Duplicated hooks or state management boilerplateStructural code search only → ast-grep-search
Import blocks are bloated from repeated inline patternsLinting/formatting issues → /lint:check

Context

  • Target path:!echo "$1"
  • Project type:!find. -maxdepth 1 \(-name "package.json" -o -name "Cargo.toml" -o -name "pyproject.toml" -o -name "go.mod" \)
  • Source directories:!find. -maxdepth 1 -type d \(-name "src" -o -name "lib" -o -name "app" -o -name "components" -o -name "packages" \)
  • Test framework:!find. -maxdepth 2 \(-name "vitest.config.*" -o -name "jest.config.*" -o -name "pytest.ini" -o -name "conftest.py" \)
  • Existing shared utilities:!find. \(-path "*/lib/*" -o -path "*/utils/*" -o -path "*/shared/*" -o -path "*/common/*" -o -path "*/hooks/*" \) -type f -print -quit

Parameters

  • $1: Path or directory to scan (defaults to src/)
  • --scope: Focus on a specific extraction type: utilities, components, hooks, or all (default: all)
  • --dry-run: Analyze and report duplications without making changes

Execution

Execute this 7-step consolidation workflow. Use TodoWrite to track each extraction as a separate task.

Step 1: Scan for duplicated patterns

Scan the target path for duplicated patterns. Search for these duplication signals:

Identical function bodies:

Grep for function/method signatures that appear in multiple files.
Look for identical multi-line blocks (3+ lines) across files.

Repeated inline patterns:

  • Utility functions defined identically in multiple files (string truncation, date formatting, validation)
  • Identical error handling blocks (try/catch patterns, error state JSX)
  • Copy-pasted UI fragments (pagination controls, confirmation dialogs, loading states)
  • Repeated hook/state management patterns (delete confirmation + mutation + handler)
  • Duplicated import blocks that signal repeated inline implementations

Search strategy:

  1. Use Grep to find repeated function names, variable patterns, and import clusters
  2. Use Glob to identify files with similar structure (e.g., all *List.tsx, all *Detail.tsx)
  3. Read candidate files to confirm duplication and measure scope

Step 2: Classify duplications

Group discovered duplications into extraction categories:

CategoryExtract IntoLocation Convention
UtilitiesPure functionssrc/lib/utils/ or src/utils/
ComponentsShared UI componentssrc/components/ui/ or src/components/shared/
HooksCustom React/Vue hookssrc/hooks/ or src/composables/
TypesShared type definitionssrc/types/ or alongside the abstraction

Follow the project's existing conventions for shared code location. If no convention exists, propose one based on the framework.

Step 3: Plan extractions

For each duplication cluster, plan the extraction:

  1. Name the abstraction — Use a clear, descriptive name that reflects the shared behavior
  2. Define the interface — Determine parameters needed to cover all usage variations
  3. Choose the location — Follow project conventions for shared code placement
  4. List all consumers — Identify every file that will be updated
  5. Assess risk — Note any subtle differences between duplicated instances that need parameterization

Present the plan to the user before proceeding (unless --dry-run was not specified and the scope is clear).

Plan format:

## Extraction Plan

### 1. [Abstraction Name] → [target file path]
- Type: utility | component | hook
- Replaces: [N] identical blocks across [M] files
- Consumers: [list of files]
- Parameters: [any variations that need to be parameterized]
- Estimated lines saved: [N]

Step 4: Extract shared abstractions

Execute each planned extraction:

  1. Create the shared abstraction with proper typing and documentation
  2. Replace each instance in consumer files with an import + usage of the new abstraction
  3. Handle variations — parameterize differences between instances rather than creating multiple abstractions
  4. Update imports — add the new import, remove imports that were only needed for the inline version

Extraction order: Start with utilities (no dependencies), then components, then hooks (may depend on utilities/components).

Mark each extraction as completed in the todo list before moving to the next.

Step 5: Write tests

Write tests for each extracted abstraction:

Abstraction TypeTest Approach
Utility functionUnit tests covering all input variations, edge cases
UI componentRender tests, prop variations, accessibility
Custom hookHook testing with mock dependencies, state transitions
Type definitionsType-level tests if applicable (tsd, expect-type)

Place test files adjacent to the abstraction or in the project's test directory, following existing conventions.

Step 6: Clean up dead code

After all extractions are complete:

  1. Remove unused imports from all updated consumer files
  2. Remove dead code — inline helper functions that are now replaced
  3. Verify no orphaned references — search for any remaining references to removed code

Step 7: Verify all checks pass

Run the full verification suite:

TypeScript/JavaScript projects:

npx tsc --noEmit          # Type checking
npm run lint              # Linting (or biome/eslint directly)
npm run test              # Full test suite

Python projects:

ty check .                # Type checking
ruff check .              # Linting
pytest                    # Test suite

Rust projects:

cargo check               # Type checking
cargo clippy              # Linting
cargo test                # Test suite

All three must pass. If any fail, fix the issues before reporting completion.

Output Summary

After all phases complete, report:

## DRY Consolidation Summary

### Extractions
- [Abstraction Name] (type) — replaced N blocks in M files
- ...

### New Files Created
- path/to/new/file.ts — [description]
- ...

### Tests Added
- N tests across M test files

### Net Effect
- ~N lines of duplicated code consolidated
- N reusable abstractions created
- All verified: typecheck + lint + N passing tests

Agentic Optimizations

ContextApproach
Quick scanUse --dry-run to see duplication report without changes
Focused extractionUse --scope utilities to extract only utility functions
Large codebaseScope to specific directory: /code:dry-consolidation src/components/
Post-extraction verify`npx tsc --noEmit 2>&1
Test run (fast)npm test -- --bail=1 --reporter=dot for quick pass/fail

See Also

  • /code:refactor — Functional refactoring of a file or directory (pure functions, immutability, composition)
  • /code:antipatterns — Detection-only analysis for code smells
  • ast-grep-search — Structural code search for finding patterns

Related Skills

  • If dead code detected during consolidation → /code:dead-code
  • If complexity is high after consolidation → /code:complexity

平台分布

Codex

38.31%
按下载量换算194

Claude

28.3%
按下载量换算143

Cursor

19.03%
按下载量换算96

Gemini CLI

8.48%
按下载量换算43

安全审计

Gen Agent Trust Hub

可疑

Socket

通过

Snyk

通过

权限和风险

执行命令

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

安装前确认

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

继续浏览同类 Skills