do-not-repeat-yourself

在添加新机制之前,先查找并复用最近的正确机制。当变更涉及可复用的代码、策略或工作流时,应优先使用此方法以复用现有机制。

仓库最近推送
GitHub Stars
107
Forks
21
Issues / PRs
9

安装方式

先用 Prompt 核对来源与依赖。也可下载安装包。

用 AI 助手安装

复制提示词,让助手先核对固定版本和依赖。

查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "do-not-repeat-yourself":https://skillpi.com/zh/skills/deepskill-62691b4578f643ec613330eac569140a7b8165f620fb8c5777629645a9b97840。安装前核对上游来源和版本:https://github.com/Dimon94/skills。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。

来源与配置

github.com

配置方式待核实

请查看原始来源中的适用工具、依赖和权限要求。

安装实测待补充

在添加新机制之前,先查找并复用最近的正确机制。当变更涉及可复用的代码、策略或工作流时,应优先使用此方法以复用现有机制。

0 下载

介绍来源: third_party · Dimon94 · 0.0.1 参考来源

SkillPi 解读

能完成的任务
翻译待完成,请参阅来源文档。
适合谁
来源文档未说明。
输入和输出
来源文档未说明。
软件、账号及付费要求
来源文档未说明。
限制与区别
来源文档未说明。
实测状态
未测试

文件浏览

在原站浏览文件 ↗

原始 SKILL.md

打开原文 ↗
Frontmatter
name: do-not-repeat-yourself
description: Find and reuse the nearest correct mechanism before adding another. Use when a change would add reusable code, policy, or workflow meaning.

Do Not Repeat Yourself

Run this gate before adding a helper, utility, adapter, validator, parser, script, schema, Skill, prompt rule, or any other reusable mechanism, and again before committing. DRY means do not duplicate meaning or wheels; it does not mean extracting every similar line into a bad abstraction.

Reuse-first gate

  1. Freeze the exact mechanism or staged diff in scope.
  2. Search nearby callers and same-directory patterns.
  3. Search repository utilities, scripts, Skills, docs, ADRs, and declared entrypoints.
  4. Prefer the language standard library, native platform, and installed dependencies before new code.
  5. Add a mechanism only when the earlier wheel is missing, wrong, or more costly than a narrow implementation.

For every new mechanism, record the search evidence or reused wheel. If an existing wheel covers it, delete the duplicate and reuse the owner. If a close wheel is wrong, state the failed contract rather than quietly forking it.

Duplication classes

  • duplicate meaning: the same business rule, error semantics, prompt rule, or state transition exists twice;
  • duplicate mechanism: a second implementation of an existing reusable path;
  • duplicate wheel: custom code where the standard library, platform, dependency, or existing Skill already fits.

Keep boundary duplication when sharing would leak internals across trust boundaries. Keep independent test fixtures when that improves readability. Keep small local duplication when an abstraction costs more than the repeated lines. Temporary migration duplication needs a removal condition.

When touching current docs or Skills, prefer one owner plus pointers. Never copy a complete product chain, catalog, enumerator, or state machine into a second source.

End the gate with:

DRY record:
- scope:
- searched:
- reused:
- remaining duplication:

Use none only after searching. Historical duplication outside the ticket is reported, not fixed, unless it blocks current correctness.

版本历史

  1. v5.0.0 GitHub ↗
    原版更新说明

    Dverity v5.0.0 是从 cc-devflow 到 Dverity 的 breaking identity release。 ## Install ```bash npm install --global [email protected] ``` ## Provenance - Frozen source: `537c532191a3508725adf6349e92ceebed4de45f` - Exact artifact SHA-512: `d623851bf9d5c3cb1d8e01a5eb076d6ac4fd49b8cca72559b608323b31386ec22414375498e07085a97c011b099ad7a4af6f83babe952f74601362ff4804c4e6` - npm package: https://www.npmjs.com/package/dverity/v/5.0.0 - GitHub Actions provenance run: https://github.com/Dimon94/dverity/actions/runs/29312928338 ## Scope 本 release 完成 repo-first rename、exact `[email protected]` publication、npm provenance 与 GitHub tag/release。Downstream sync/deprecation(#80)不在本次执行范围。

  2. v4.1.5 GitHub ↗
  3. v4.1.4 GitHub ↗
    原版更新说明

    ## [4.1.4] - 2026-02-08 ### 🧭 Workspace Worktree Session Recovery & Release Flow Clarity v4.1.4 strengthens workspace-to-worktree continuity so developers can resume a requirement reliably across sessions, and clarifies flow init/release semantics in command and skill docs. #### Added - **Workspace switch script** - Added `.claude/scripts/flow-workspace-switch.sh` - Supports `REQ/BUG` pointer updates, journal logging, `--print-cd`, and sourced `--cd` switching - **Scripts architecture map** - Added `.claude/scripts/CLAUDE.md` as L2 directory map for script responsibilities #### Changed - **Workspace start behavior** - `.claude/scripts/flow-workspace-start.sh` now accepts `REQ-XXX/BUG-XXX` override - Added `--switch` and sourced `--cd` behavior for faster worktree handoff - Added BUG status file compatibility (`devflow/bugs/*/status.json`) - **Requirement initialization linkage** - `.claude/scripts/create-requirement.sh` now syncs `devflow/workspace/{developer}/.current-req` when workspace exists - **Flow docs and skills alignment** - Updated flow init/release/workspace command docs and workflow skills to reflect: - default worktree naming semantics - merge semantics by release strategy - workspace continuity expectations #### Benefits - ✅ New session recovery can target the intended REQ/BUG directly - ✅ Worktree switching is faster and less error-prone via generated `cd` commands - ✅ Flow release semantics are clearer when deciding between PR-only vs merge paths

  4. v4.1.3 GitHub ↗
    原版更新说明

    ## [4.1.3] - 2026-02-08 ### 🔧 Flow Quality Default Path + AGENTS.md Safe Emit v4.1.3 aligns release gates with `/flow-quality` as the default path and improves compiler emitters to preserve user-owned AGENTS memory content. #### Fixed - **Flow quality/release gate consistency** - `/flow-quality` quick mode now generates minimal `TEST_REPORT.md` and `SECURITY_REPORT.md` - Release entry gate accepts `quality_complete` (with `qa_complete` backward compatibility) - Flow docs/scripts updated to recommend `/flow-quality` by default, with `--full` as enhanced review mode - **AGENTS.md overwrite prevention in compiler emitters** - Added managed block upsert mechanism in base emitter - Codex/Antigravity emitters now write compact index blocks instead of appending full agent/rule bodies - Existing user memory content in `AGENTS.md` is preserved #### Added - **Regression coverage for managed blocks** - Tests for AGENTS managed block generation, idempotence, and preservation behavior #### Benefits - ✅ `flow-quality` becomes a true default path to `flow-release` without requiring `--full` - ✅ Compiler output no longer clobbers user-maintained AGENTS memory sections - ✅ Backward compatibility with legacy QA status remains intact

  5. v4.1.0 GitHub ↗
    原版更新说明

    ## 🤖 Claude Team Integration: Multi-Agent Parallel Collaboration v4.1.0 introduces Claude Team functionality for multi-agent parallel development with automatic task scheduling and distributed quality verification. ### Added - **Team Mode for /flow:dev** - Multi-agent parallel execution - `--team` flag enables parallel agent collaboration - `--agents N` specifies agent count (2-5, default 3) - Automatic task dependency parsing and conflict detection - TeammateIdle Hook for automatic task assignment - TaskCompleted Hook for quality verification - **New Hooks** - `teammate-idle-hook.ts` - Task scheduling when teammate goes idle - `task-completed-hook.ts` - Quality verification on task completion - `types/team-types.d.ts` - TypeScript type definitions for Team state - **New Scripts** - `parse-task-dependencies.js` - TASKS.md dependency parser - `detect-file-conflicts.sh` - Parallel task file conflict detection - `team-dev-init.sh` - flow-dev Team mode initialization - **Enhanced orchestration_status.json** - `team` section for teammate tracking - `ralphLoop.teammates` for per-teammate iteration state - Task assignment tracking - **New common.sh Functions** - `is_team_mode_enabled()` - Check Team mode status - `init_team_state()` - Initialize Team state - `add_teammate()` / `update_teammate_status()` - Teammate management - `assign_task_to_teammate()` / `get_unassigned_tasks()` - Task assignment - `all_teammates_idle()` / `cleanup_team_state()` - Team lifecycle ### Changed - **quality-gates.yml** - New Team mode configuration - `teammate_idle` section for idle hook settings - `task_completed` section for completion verification - `ralph_loop.team_mode` for distributed Ralph Loop ### Quality Metrics | Metric | Before | After | Improvement | |--------|--------|-------|-------------| | Parallel agents | 1 | 3-5 | +400% | | Requirement completion time | 90 min | 50 min | -45% | | Task scheduling | Manual | Automatic | 100% | | Quality verification | Single-point | Distributed | 100% | --- **Full Changelog**: https://github.com/Dimon94/cc-devflow/blob/main/CHANGELOG.md **npm**: `npm install [email protected]`

此处仅展示最近 5 个版本。 在原站查看完整版本历史 ↗

当前收录版本

0.0.1

核对来源版本 ↗

安全与评测信息

质量评测

满分100 · 来自 SkillPi LAB 实验室的评测报告。

场景价值78/100

亮点

  • 提供 DRY 原则的复用检查流程,适用于开发过程中避免重复机制
  • 具有明确的工程实践价值,属于通用开发辅助工具
触发精准92/100

亮点

  • description 明确说明使用场景(添加新机制前复用检查)
  • 覆盖多种变体(helper, utility, adapter 等),边界清晰
结构规范95/100

亮点

  • 结构清晰,分 Reuse-first gate 和 Duplication classes 两大部分
  • 步骤明确,有出口条件(DRY record),frontmatter 完整
执行可靠88/100

亮点

  • 流程为人工检查与记录,逻辑自洽
  • 覆盖主要异常(如边界 duplication 保留条件),不可逆操作有确认机制
证据可验 (前四项均值)88/100

取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。

正文静态检测

100 / 100 · skillpi-20261123-no-r3-v1

正文未命中当前规则。

分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。

权限与使用前检查

根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。

未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。

本站展示提示不会授予权限。涉及文件改动、密钥、外部发送或费用时,仍由你使用的工具按需确认。

安全评级与访问范围

safe · 静态证据核验,不代表运行安全保证。

来源文档未说明。

使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。