updating-hooks-dry

Scan fleet hook trees for duplication and generate a ranked consolidation report.

125|42|Updated May 19, 2025
One-click install
npx skills add https://github.com/SocketDev/socket-mcp --skill updating-hooks-dry
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: updating-hooks-dry
Source: https://github.com/SocketDev/socket-mcp/tree/main/.claude/skills/fleet/updating-hooks-dry
Command: npx skills add https://github.com/SocketDev/socket-mcp --skill updating-hooks-dry

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Read-only DRY/KISS sweep of the fleet hook tree (.claude/hooks/fleet/) and the oxlint plugin (.config/oxlint-plugin/fleet/). Fans out scanner agents to find copy-paste clusters that should absorb a _shared/ helper, dead _shared/ exports, overlapping guards / redundant lint rules, and KISS smells (a hook far longer than its siblings, regex where the shared AST parser exists). Produces a ranked report under .claude/reports/ with evidence + a concrete consolidation sketch per cluster. Plans only — applies nothing, opens no PR. Sibling of updating-coverage / updating-security under the updating umbrella; the periodic counterpart that keeps the ~170-hook tree from bloating as codifying-disciplines lands new enforcers.

Core Features & Use Cases

  • Read-only analysis of fleet hooks to surface duplication and anti-patterns.
  • Generates a ranked consolidation plan with evidence and a sketch for each cluster.
  • Produces a final report under .claude/reports/ with no changes applied.

Quick Start

Run the read-only sweep to generate a ranked report of consolidation opportunities for the fleet hook tree.

Frequently Asked Questions about updating-hooks-dry

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find duplicate code and anti-patterns in my fleet hooks?

A fleet hook consolidation sweep identifies clumps of copy-paste logic, dead shared exports, overlapping enforcers, and KISS smells within the hook tree. It runs four parallel scanners and a synthesis stage to produce a prioritized consolidation plan.

What is a read-only static analysis sweep for hook consolidation?

A read-only hook consolidation sweep analyzes the fleet hook tree and oxlint plugin to surface duplication and anti-patterns. It generates a ranked Markdown report with evidence and a concrete consolidation sketch per cluster without applying changes or opening PRs.

How do I generate a DRY consolidation plan for a large hook tree?

Run a periodic advisory sweep after new enforcers land to surface consolidation opportunities in the hook tree. The analysis produces a ranked report written to the reports directory with evidence and a consolidation sketch for each identified cluster.

When should I run a hook consolidation advisory sweep?

Run the advisory sweep periodically or after codifying disciplines land new enforcers in the hook tree. This surfaces consolidation opportunities early, keeping the growing hook tree from bloating with redundant guards and copy-paste logic.

Does the hook consolidation sweep modify my code or open pull requests?

The hook consolidation sweep is strictly read-only and applies no changes, opens no PRs. The final deliverable is a Markdown report written to the reports directory containing the prioritized consolidation plan with evidence and sketches.

What KISS smells and overlapping guards does a hook consolidation analysis detect?

The analysis detects hooks far longer than their siblings, regex where a shared AST parser exists, overlapping guards, and redundant lint rules. It also identifies dead shared exports and copy-paste clusters that should absorb a shared helper.