do-not-repeat-yourself

Before adding a new mechanism, first locate and reuse the most recent correct mechanism. When changes involve reusable code, policies, or workflows, this approach prioritizes using existing mechanisms.

Last repository push
GitHub Stars
107
Forks
21
Issues / PRs
9

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "do-not-repeat-yourself" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-62691b4578f643ec613330eac569140a7b8165f620fb8c5777629645a9b97840. Verify the upstream source and version against https://github.com/Dimon94/skills before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

github.com

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Before adding a new mechanism, first locate and reuse the most recent correct mechanism. When changes involve reusable code, policies, or workflows, this approach prioritizes using existing mechanisms.

0 Downloads

Introduction source: third_party · Dimon94 · 0.0.1 Reference

SkillPi interpretation

Tasks
Find and reuse the nearest correct mechanism before adding another. Use when a change would add reusable code, policy, or workflow meaning.
Audience
Not specified in the source documentation.
Inputs and outputs
Not specified in the source documentation.
Software, accounts and paid services
Not specified in the source documentation.
Limits and differences
Not specified in the source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
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.

Version history

  1. v5.0.0 GitHub ↗
    Original release notes

    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 ↗
    Original release notes

    ## [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 ↗
    Original release notes

    ## [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 ↗
    Original release notes

    ## 🤖 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]`

Only the five most recent versions are shown. View full version history at the source ↗

Current listing version

0.0.1

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value78/100

Highlights

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

Highlights

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

Highlights

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

Highlights

  • 流程为人工检查与记录,逻辑自洽
  • 覆盖主要异常(如边界 duplication 保留条件),不可逆操作有确认机制
Evidence Verifiability (mean of the first four)88/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

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

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

These common operations were not identified in the main document. This does not mean no permissions or risks exist.

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Not specified in the source documentation.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.