orchestrate-batch-refactor
Plan and execute large refactors with dependency-aware work packets and parallel analysis.
What this skill does
# Orchestrate Batch Refactor ## Overview Use this skill to run high-throughput refactors safely. Analyze scope in parallel, synthesize a single plan, then execute independent work packets with sub-agents. ## When to Use - When a refactor spans many files or subsystems and needs clear work partitioning. - When you need dependency-aware planning before parallel implementation. ## Inputs - Repo path and target scope (paths, modules, or feature area) - Goal type: refactor, rewrite, or hybrid - Constraints: behavior parity, API stability, deadlines, test requirements ## When to Use Parallelization - Use this skill for medium/large scope touching many files or subsystems. - Skip multi-agent execution for tiny edits or highly coupled single-file work. ## Core Workflow 1. Define scope and success criteria. - List target paths/modules and non-goals. - State behavior constraints (for example: preserve external behavior). 2. Run parallel analysis first. - Split target scope into analysis lanes. - Spawn `explorer` sub-agents in parallel to analyze each lane. - Ask each agent for: intent map, coupling risks, candidate work packets, required validations. 3. Build one dependency-aware plan. - Merge explorer output into a single work graph. - Create work packets with clear file ownership and validation commands. - Sequence packets by dependency level; run only independent packets in parallel. 4. Execute with worker agents. - Spawn one `worker` per independent packet. - Assign explicit ownership (files/responsibility). - Instruct every worker that they are not alone in the codebase and must ignore unrelated edits. 5. Integrate and verify. - Review packet outputs, resolve overlaps, and run validation gates. - Run targeted tests per packet, then broader suite for integrated scope. 6. Report and close. - Summarize packet outcomes, key refactors, conflicts resolved, and residual risks. ## Work Packet Rules - One owner per file per execution wave. - No parallel edits on overlapping file sets. - Keep packet goals narrow and measurable. - Include explicit done criteria and required checks. - Prefer behavior-preserving refactors unless user explicitly requests behavior change. ## Planning Contract Every packet must include: 1. Packet ID and objective. 2. Owned files. 3. Dependencies (none or packet IDs). 4. Risks and invariants to preserve. 5. Required checks. 6. Integration notes for main thread. Use [`references/work-packet-template.md`](references/work-packet-template.md) for the exact shape. ## Agent Prompting Contract - Use the prompt templates in [`references/agent-prompt-templates.md`](references/agent-prompt-templates.md). - Explorer prompts focus on analysis and decomposition. - Worker prompts focus on implementation and validation with strict ownership boundaries. ## Safety Guardrails - Do not start worker execution before plan synthesis is complete. - Do not parallelize across unresolved dependencies. - Do not claim completion if any required packet check fails. - Stop and re-plan when packet boundaries cause repeated merge conflicts. ## Validation Strategy Run in this order: 1. Packet-level checks (fast and scoped). 2. Cross-packet integration checks. 3. Full project safety checks when scope is broad. Prefer fast feedback loops, but never skip required behavior checks. ## Limitations - Use this skill only when the task clearly matches the scope described above. - Do not treat the output as a substitute for environment-specific validation, testing, or expert review. - Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
Related in Code Review
gstack
IncludedFast headless browser for QA testing and site dogfooding. Navigate pages, interact with elements, verify state, diff before/after, take annotated screenshots, test responsive layouts, forms, uploads, dialogs, and capture bug evidence. Use when asked to open or test a site, verify a deployment, dogfood a user flow, or file a bug with screenshots. (gstack)
startup-due-diligence
IncludedLegal due diligence review for seed-stage and Series A startups (US, Delaware C-Corp focus). Supports both investor and founder perspectives. Capabilities include: (1) Interactive document review and issue spotting; (2) Document request list generation; (3) Cap table and SAFE/convertible note analysis; (4) Red flag identification with severity ratings; (5) Diligence report generation. TRIGGERS: due diligence, DD, startup investment, cap table review, Series A, seed round, investor diligence, legal review startup, SAFE analysis, convertible note, 409A, founder vesting.
interview-master
IncludedThis skill should be used when the user asks to "generate interview questions", "prepare for interview", "optimize resume", "conduct mock interview", "analyze git commits for resume", "generate resume from code", "review my resume", or mentions interview preparation, career assistance, or extracting project experience from git history. Provides comprehensive interview and career development guidance for both job seekers and interviewers.
fix-issue
IncludedFixes GitHub issues using parallel analysis agents for root cause investigation, code exploration, and regression detection. Reads issue context from gh CLI, searches codebase and memory for related patterns, generates a fix with tests, and links the resolution back to the issue via PR. Includes prevention analysis to avoid recurrence. Use when debugging errors, resolving regressions, fixing bugs, or triaging issues.
sf-apex
IncludedGenerates and reviews Salesforce Apex code with 150-point scoring. TRIGGER when: user writes, reviews, or fixes Apex classes, triggers, test classes, batch/queueable/schedulable jobs, or touches .cls/.trigger files. DO NOT TRIGGER when: LWC JavaScript (use sf-lwc), Flow XML (use sf-flow), SOQL-only queries (use sf-soql), or non-Salesforce code.
swift-development
IncludedComprehensive Swift development for building, testing, and deploying iOS/macOS applications. Use when Claude needs to: (1) Build Swift packages or Xcode projects from command line, (2) Run tests with XCTest or Swift Testing framework, (3) Manage iOS simulators with simctl, (4) Handle code signing, provisioning profiles, and app distribution, (5) Format or lint Swift code with SwiftFormat/SwiftLint, (6) Work with Swift Package Manager (SPM), (7) Implement Swift 6 concurrency patterns (async/await, actors, Sendable), (8) Create SwiftUI views with MVVM architecture, (9) Set up Core Data or SwiftData persistence, or any other Swift/iOS/macOS development tasks.