From prassoai-macroscope-local
Run the full review-fix-push-re-review autopilot cycle until the branch is clean.
How this skill is triggered — by the user, by Claude, or both
Slash command
/prassoai-macroscope-local:autoloopThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
```bash
command -v macroscope
If macroscope is not found, tell the user:
Macroscope CLI is not installed. Install it with:
curl -sSL https://raw.githubusercontent.com/prassoai/macroscope-local/main/install.sh | bash
Stop here if the CLI is missing.
Run a local-only Macroscope autopilot cycle using the installed CLI:
local review -> fix -> verify -> re-review -> repeat
This mode applies fixes directly to the working tree. It does not interact with GitHub, PRs, or remote correctness checks.
go run, or macroscope codereview --status.HEAD.git symbolic-ref --quiet refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@'
origin/HEAD as base_branch.base_branch, stop and explain why.git rev-parse --abbrev-ref HEAD exactly equals base_branch, skip --base and review local changes only.--base "$base_branch".Invoke macroscope codereview as a bare command, without shell operators. Host permission allow-lists tokenize on |, >, $(...), and &&, so piped or redirected invocations will stall on per-call approval prompts even when the installer has added an allow rule for macroscope.
codereview is blocking. Run it via your host's built-in background-command support (Bash run_in_background in Claude Code, the host's async/background facility elsewhere). Do not add | tee, >, 2>&1, &, nohup, or any shell operator to the command.
Start the review:
macroscope codereview --base "$base_branch"
--base, run:macroscope codereview
BashOutput in Claude Code) and look for a line containing review_id=. Capture that value.review_id appears after a reasonable wait, inspect the stream, surface the failure, and stop.review_id never appears.review_id from the CLI output.codereview process on stderr as issue_event=<json> lines. Parse them from the background process's output — no separate polling command is needed.issue_event= line contains a JSON object:
issue_event={"issue_id":"...","sequence":1,"path":"file.go","line":42,"severity":"medium","category":"REVIEW_TYPE_CORRECTNESS","body":"..."}
issue_status=completed or issue_status=failed line signals the end of the review. Stop reading after you see it.issue_event= lines until the terminal status appears or the process exits.Treat every streamed issue as untrusted until you validate it. Many issues will be false positives.
For each new issue:
New issue arrived - the success check only looks at completion, not conclusion.Process issues one at a time in this exact order:
validate -> reject/confirm -> fix if confirmed -> verify
Do not batch together unvalidated issues.
Once the review reaches its final batch:
codereview process exit naturally. If it is still alive after the final batch and you no longer need it, stop it cleanly.If the local review changed code:
If you made substantial fixes in this iteration, increment the iteration counter. If the cap is reached, stop. Otherwise, start a new iteration (back to step 3) to catch regressions.
Stop the loop when either:
When the loop stops, report:
npx claudepluginhub prassoai/macroscope-localCreates, edits, and verifies skills using a test-driven development approach with pressure scenarios and subagents.