Skip to main content
ClaudeWave
ES, Spanish
Skill288 estrellas del repoactualizado 7d ago

plan-flow

Plan Flow is a Claude Code skill for conducting systematic architectural refactoring across repositories. It establishes scope, performs structured redundancy analysis to identify duplicate designs and conflicting definitions, converts findings into a prioritized executable plan with phases and risk scoring, then executes changes through strict step-test-update loops with evidence. Use this skill when addressing large-scale design consolidation or technical debt that requires deep repository analysis before committing to changes.

Instalar en Claude Code
Copiar
git clone --depth 1 https://github.com/majiayu000/spellbook /tmp/plan-flow && cp -r /tmp/plan-flow/skills/plan-flow ~/.claude/skills/plan-flow
Después abre una sesión nueva de Claude Code; el skill carga automáticamente.

SKILL.md

# Plan Flow

## Overview

Use this skill when the user needs:
- A complete analysis of duplicated/redundant design in a codebase.
- A detailed TODO plan with explicit file-level steps.
- Strict execution evidence: change one step, test it, then update plan status.

This skill is repository-agnostic. It defines how to analyze and plan, not only what was done in one specific repo.

## Core Workflow (Analyze -> Plan -> Execute)

1. Establish scope and constraints.
- Confirm target directories/modules and out-of-scope areas.
- Capture compatibility requirement, risk tolerance, and testing expectations.
- Record baseline (`git status --short`, current branch, known blockers).

2. Run structured redundancy analysis first.
- Build an inventory of architecture anchors:
  - Domain models and schemas
  - Factory/registry entry points
  - HTTP/storage/cache/logging abstractions
  - Route/service/provider adapters
- Identify duplicate/redundant candidates with evidence:
  - Same concept, multiple conflicting definitions
  - Same responsibility, parallel implementations
  - Exported but unconnected modules
  - Dead/legacy paths still affecting readability
- For each finding, record:
  - Exact files and symbols
  - Call path or usage evidence
  - Risk if changed
- See `references/analysis-playbook.md`.

3. Prioritize and convert analysis into executable plan.
- Score each finding by impact/effort/risk/confidence.
- Group into phases (`P0`, `P1`, `P2`) and sequence low-risk/high-signal steps first.
- Create or update `plan/<task>.md` from `references/plan-template.md`.
- Keep exactly one step in `in_progress`.
- Use statuses: `pending` / `in_progress` / `completed` / `blocked`.
- See `references/risk-impact-scoring.md`.

4. Execute with strict step-test-update loop.
- Implement only the current step and only in listed files.
- Run step-level tests immediately, then project health checks.
- Update plan status and execution log before touching next step.
- On failure, record root cause and run fix loop before continuing.

5. Close with phase/final verification.
- Run phase matrix checks and final regression set.
- Report residual risks, deferred work, and explicit coverage gaps.

## Quality Gates

- No finding enters the plan without file-level evidence.
- No step is `completed` without test command evidence.
- No next step starts before plan status/log update is written.
- If full regression is unavailable, record exact reason and nearest fallback checks.

## Reference Map

- `references/analysis-playbook.md`
  - How to detect duplicate/redundant design with reproducible evidence.
- `references/risk-impact-scoring.md`
  - How to prioritize findings into phases and step order.
- `references/plan-template.md`
  - Reusable plan skeleton including analysis table, step template, and log format.
- `references/plan-accomplishments.md`
  - One completed real example (for style and granularity only, not as mandatory scope).

## Scripts

- `scripts/redundancy_scan.sh <target_dir>`
  - Fast first-pass scan for duplicate symbol names, parallel factory/builders, and legacy/dead-code hints.
- `scripts/findings_to_plan.py --target-dir src --output plan/<name>.md`
  - Convert scan findings into a draft execution plan with scoring and phased order (`P0/P1/P2`).
- `scripts/plan_lint.py <plan/file.md>`
  - Validate plan state machine, test evidence, and execution-log completeness for completed steps.

## Trigger Cues

Trigger this skill when user asks for:
- "分析这个库有哪些重复设计/冗余设计"
- "做一个非常完整详细的 todolist/执行计划"
- "每改一处就测试并更新计划状态"
- "按步骤推进并可追踪"

## Execution Rules

- Prefer small, reversible steps over large refactors.
- Keep plan language specific to file paths, symbols, and commands.
- Avoid mixing analysis conclusions with unverified assumptions.
- If new evidence contradicts earlier assumptions, revise plan before coding.
agentsmd-optimizeSkill

Audit AND optimize a CLAUDE.md / AGENTS.md instruction file — score it against the five high-leverage patterns, flag anti-patterns, then apply approved fixes in place. Use when the user says 优化 CLAUDE.md / 优化 AGENTS.md / optimize my agent doc / 帮我改 claudemd, or after an audit when they want the fixes applied (not just reported).

agentsmd-scaffoldSkill

Generate or update repository-specific AGENTS.md instruction files from real repo evidence. Use when asked to create, design, scaffold, split, or improve root or scoped AGENTS.md files for Codex/Claude/agent workflows, especially when a repo needs directory-specific rules, validation commands, generated-file boundaries, or a short agent onboarding router.

api-designSkill

REST/GraphQL/gRPC API design best practices. Use when designing APIs, defining contracts, handling versioning. Covers OpenAPI 3.2, GraphQL Federation, gRPC streaming.

app-ui-designSkill

Mobile app UI design expert for iOS and Android. Use when designing app interfaces, creating design systems, ensuring accessibility, or following platform guidelines. Covers Material Design 3, Human Interface Guidelines, color theory, typography, and 2025 trends.

app-user-story-qaSkill

End-to-end app feature inventory and user-story testing workflow with a canonical tracker. Use when the user asks to audit every feature, derive expected behavior from code, test user journeys, or explicitly fix and retest documented UX or logistical defects.

architecture-foundationSkill

Design architecture foundations before implementation. Use when asked to design or refactor architecture, choose Rust/Go crate, package, module, runtime, workflow, or service boundaries, compare mature project architecture, prevent stacked one-off PRs, audit migration debt in existing repos, or produce a spec before coding.

architecture-researchSkill

Evidence-driven architecture research for understanding real systems and making technical decisions. Use when doing architecture landscape studies, source-backed system archaeology, build-vs-buy or adopt/adapt/build decisions, open-source and commercial comparisons, revisiting an earlier architecture choice, or handling requests such as 架构调研, 架构选型, 竞品架构, 技术尽调, 同类方案, 开源替代, how is X built, and what should we learn from X. Do not use for small mechanical changes, market-only discovery, or detailed design after the technology direction is already fixed.

ask-opencliSkill

Ask Grok or Gemini via opencli (browser-session based, no API cost). Use when the user says "问 grok", "问 gemini", "ask grok", "ask gemini", "用 grok 查", "grok 怎么看", "让 gemini 分析", or wants a second opinion from Grok/Gemini without paying API tokens. Routes to opencli which drives the already-logged-in Chrome session.