patterns/parallel-fix/skills/parallel-fix/SKILL.md
Use when: review found 2+ independent findings in different files, fix phase can parallelize RECON
npx skillsauth add ryderfreeman4logos/cli-sub-agent parallel-fixInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Optimize fix rounds when a review produces multiple independent findings in different files. The analysis (RECON) phase is read-only and can safely parallelize. The edit (EDIT) phase remains serial to avoid git conflicts.
Typical savings: 3-5 minutes per fix round with 2-3 independent findings, since RECON employees run concurrently instead of sequentially.
This skill activates as an optimization within the commit/review-loop fix phase. The orchestrator detects the multi-finding case automatically:
csa review produces a FAIL verdict with 2+ findings.output/findings.toml from the review session.file_ranges[0].path).When operating under SA mode (e.g., dispatched by /sa or any autonomous workflow),
ALL csa invocations MUST include --sa-mode true. This includes csa run,
csa review, csa debate, and any other execution commands. Omitting --sa-mode
at root depth causes a hard error; passing false when the caller is in SA mode
breaks prompt-guard propagation.
csa session result --session "$REVIEW_SID" --section details.file_ranges[0].path.
Findings with no file_ranges go into a catch-all bucket.
Set ${MULTI_BUCKET} to "yes" when bucket count > 1, "" otherwise.
Set ${SINGLE_BUCKET} to "yes" when bucket count == 1, "" otherwise.${SINGLE_BUCKET} is "yes"), fall back to standard fix.tier-1-quick:
SID_N=$(csa run --sa-mode true --tier tier-1-quick \
--description "recon-fix: <primary_file>" \
"You are a read-only analysis agent. Do NOT edit any files.
Analyze the following review finding(s) and produce a fix-plan:
Finding ID: <id>
Severity: <severity>
File: <primary_file>:<start_line>-<end_line>
Description: <description>
Instructions:
1. Read the affected file(s) and surrounding context.
2. Identify the root cause of each finding.
3. Propose specific file:line edits to fix the issue.
4. Propose test additions/modifications if applicable.
5. Output your fix-plan between <!-- FIX-PLAN:START --> and <!-- FIX-PLAN:END --> markers.")
Launch ALL employees before waiting for any.csa session wait --session "$SID_1"
csa session wait --session "$SID_2"
<!-- FIX-PLAN:START --> and <!-- FIX-PLAN:END -->.
Check for conflicts (two plans editing same file:line range).
Order by severity (critical first), then file path.tier-2-standard with the merged fix-plan. The employee applies
all fixes, runs just fmt, and stages files. No commits.just fmt && just clippy && just test.When two RECON plans propose edits to overlapping file:line ranges:
This is the while-waiting checklist. When you background a csa session wait via run_in_background: true, the next task-notification wakes you up automatically. Do not add manual sleep or polling on top.
Safe parallel work:
gh pr create yet.Do NOT:
csa run or csa review sessions that could race on git branch or checkout state with the waiting one (single-checkout sequential rule, AGENTS.md 028).git commit, git checkout <other-branch>, or git push.commit (Step 5 fix dispatch), review-loop (Step 4 fix issues),
ai-reviewed-commit (Step 5 fix sub-agent)csa review producing structured output/findings.tomljust fmt, just clippy, just test pass after fixes.development
Use when running a non-blocking CSA background code health scan that uses csa health and csa tokuin estimate to propose refactoring GitHub issues for files over token or complexity thresholds.
data-ai
Recover main-agent context after `/clear`, `/compact`, or lost local thread state by using `csa recall` against recorded Claude main sessions.
tools
Use when: merged PR had HIGH/CRITICAL findings that represent a bug class — extracts reusable coding rule
documentation
Split monolith project documentation (CLAUDE.md, etc.) into condensed summary + reference detail files following AGENTS.md pattern