pi-heartbeat
Configure periodic health checks via HEARTBEAT.md and the /heartbeat command.
Perform a comprehensive DRY (Don't Repeat Yourself) code review on a codebase. Identifies duplicated code, repeated logic, redundant patterns, and opportunities for abstraction. Use this skill whenever the user asks to review code for duplication, reduce repetition, apply DRY
$ npx -y skills add espennilsen/pi --skill dry-code-review --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/dry-code-reviewContext preview
The summary Claude sees to decide when to auto-load this skill.
Perform a comprehensive DRY (Don't Repeat Yourself) code review on a codebase. Identifies duplicated code, repeated logic, redundant patterns, and opportunities for abstraction. Use this skill whenever the user asks to review code for duplication, reduce repetition, apply DRY
name: dry-code-review description: > Perform a comprehensive DRY (Don't Repeat Yourself) code review on a codebase. Identifies duplicated code, repeated logic, redundant patterns, and opportunities for abstraction. Use this skill whenever the user asks to review code for duplication, reduce repetition, apply DRY principles, refactor for reusability, find copy-pasted code, deduplicate logic, or audit code quality with a focus on redundancy. Also trigger when users say things like "clean up my code", "find repeated patterns", "too much boilerplate", "reduce code duplication", or "refactor for maintainability". Works on any language or framework.
Perform a structured, thorough code review focused on the DRY (Don't Repeat Yourself) principle. The review is planned and tracked via a markdown file in `plans/`.
The DRY principle states: "Every piece of knowledge must have a single, unambiguous, authoritative representation within a system." This skill systematically finds violations and recommends fixes.
1. **Create the tracking plan** in `plans/dry-review-<project-name>.md` using the template below 2. **Inventory the codebase**: List all source files, their languages, sizes, and roles 3. **Identify scope**: Confirm with the user which directories/files to include or exclude (e.g., skip `node_modules`, `vendor`, generated files, test fixtures)
Run the scanning script to find likely duplication:
bash /path/to/dry-code-review/scripts/find_duplicates.sh <target_directory> [extensions]
The script detects:
Import/dependency lines are intentionally excluded from the duplicate-lines scan so they don't dominate the output.
After automated scanning, perform deeper analysis by reading the codebase. Look for these DRY violation categories:
For each finding, document:
1. **ID**: Sequential identifier (DRY-001, DRY-002, ...) 2. **Category**: Which of the 4 categories above 3. **Severity**: 🔴 High (5+ repetitions or core logic) / 🟡 Medium (2-4 repetitions) / 🟢 Low (minor or cosmetic) 4. **Locations**: File paths and line numbers of all occurrences 5. **Description**: What is duplicated and why it matters 6. **Recommendation**: Specific refactoring approach 7. **Effort**: S / M / L estimate
Update the plan file with:
The plan file MUST be created at `plans/dry-review-<project-name>.md` using this structure:
# DRY Code Review: <Project Name> ## Review Metadata - **Date**: YYYY-MM-DD - **Reviewer**: Claude (AI-assisted) - **Scope**: <directories/files reviewed> - **Languages**: <languages found> - **Total Files Scanned**: <count> - **Total Lines of Code**: <count> ## Status - [ ] Phase 1: Setup & Discovery - [ ] Phase 2: Automated Scanning - [ ] Phase 3: Manual Analysis - [ ] Phase 4: Findings & Recommendations - [ ] Phase 5: Summary & Prioritization ## Scope Definition ### Included - <list of included paths> ### Excluded - <list of excluded paths and reasons> ## Findings ### Summary | Category | 🔴 High | 🟡 Medium | 🟢 Low | Total | |------------------------|---------|----------|--------|-------| | Literal Duplication | | | | | | Structural Duplication | | | | | | Logical Duplication | | | | | | Cross-Cutting | | | | | | **Total** | | | | | ### Detailed Findings #### DRY-001: <Title> - **Category**: <category> - **Severity**: 🔴/🟡/🟢 - **Locations**: - `path/to/file1.ts:L10-L25` - `path/to/file2.ts:L30-L45` - **Description**: <what is duplicated> - **Recommendation**: <how to fix> - **Effort**: S/M/L <!-- Repeat for each finding --> ## Prioritized Action Plan ### Quick Wins (Small effort, immediate value) 1. <action item> ### High-Imp
This repository is my Pi coding agent home directory. I keep it under version control and symlink it to ~/.pi/agent so Pi loads configuration, extensions, skills, and runtime state from here.
Configure periodic health checks via HEARTBEAT.md and the /heartbeat command.
Manage persistent memory across sessions. Use when asked to remember, recall, forget, or review what was stored. Covers long-term…
Track and manage projects with git status via dashboard and tool.
Delegate tasks to specialized subagents for parallel or sequential execution.
Audit, generate, update, and lint AGENTS.md files across all projects. Use when asked to check project context files, scaffold…