skills/team-solve/SKILL.md
Investigate and solve problems using a team of specialist agents. Use when facing complex, multi-faceted problems that benefit from parallel research and structured implementation.
npx skillsauth add shhac/skills team-solveInstall 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.
Investigate and solve one or more problems using parallel research, then serial implementation.
You are the team lead orchestrating an investigate-then-solve workflow.
Messages between teammates are asynchronous — a message sent now may not be read until the recipient finishes their current work. You cannot rely on message timing for coordination. Instead, task status is the shared state that tells every agent where things stand.
When a teammate receives a message, they determine where it sits in the conversation by checking their task status — not by assuming it arrived "just now."
| Status | Who sets it | Meaning |
|--------|------------|---------|
| pending | Lead | Not started, waiting for assignment |
| in_progress | Teammate | Working, or finished and parked waiting for lead to acknowledge |
| completed | Lead only | Lead has read the teammate's report — this IS the acknowledgment |
The lead marks tasks completed — not the teammate. When a teammate sees their task marked completed, they know the lead has processed their report and any new message is current.
Include these rules in every teammate's spawn prompt:
in_progress when you begin workTaskGet — the task description contains everything you need (implementation details, prior track summaries, etc.). Do NOT search the filesystem or other agents' files for this content.SendMessage, then park — stop all work, do not check TaskList or claim new tasks. Just wait.TaskGet:
in_progress → lead hasn't acknowledged your report yet. This message may pre-date your report. Reply with your current state instead of re-executing.completed → lead has processed your report. If a new task is assigned to you, this message contains current instructions — proceed.completed (your acknowledgment)completed and the new task is created/assignedTaskList — check that all relevant tasks show the expected status, don't track messages mentallygit status to confirm a clean working tree before proceedingfilter-investigator, output-researcher)Investigations run in parallel.
TeamCreateTaskCreategeneral-purpose teammate per track using Task with team_name
SendMessage using the report format belowInclude the following in each investigator's prompt:
Use subagents (
Tasktool) to keep your context focused. Spawn subagents for:
- Exploring specific files, modules, or subsystems
- Searching through git history, logs, or large codebases
- Any research tangent that might not pan out
Each subagent should report back:
- Relevant findings — what it discovered that matters to your investigation
- Red herrings (1-2 sentences) — anything that looks related but isn't, and why. Calling these out early prevents wasted cycles re-exploring dead ends.
Report red herrings even when your main findings are conclusive — they prevent other agents from re-exploring the same dead ends.
After receiving a subagent's report, decide whether to:
- Use its findings directly — if the summary gives you enough to proceed
- Dive in yourself — if the subagent found something promising and you want full, first-hand context in that area before drawing conclusions. Examples: conflicting evidence that needs direct examination, low confidence in the subagent's assessment, or complex state/flow where first-hand context matters.
When choosing subagent types, prefer read-only or exploration-focused types for open-ended codebase searches, and full-capability types for targeted analysis that needs deeper tool access.
Each investigator should structure their report as:
## Track: {description}
### Findings
- {what was discovered, root causes, relevant code paths}
### Proposed Approach
- {what to change, which files, how}
### Risks & Edge Cases
- {what could go wrong with this approach}
- {what adjacent code/features could be affected}
- {what happens if data is unexpected or flow is interrupted}
### Red Herrings
- {things explored that weren't relevant, and why}
### Confidence: {high/medium/low}
{brief justification}
### Dependencies
- {does this approach depend on or conflict with other tracks?}
completed (acknowledging the report) and give the user brief progress updatescompleted in TaskList, synthesize findings:
Implementations happen one track at a time. This prevents:
completed (your acknowledgment).
e. Run git status to confirm a clean working tree — no uncommitted changes, no leftover files
f. Run relevant tests/checks as a quick sanity check
g. Only then proceed to the next trackInclude the following when sending implementation instructions:
Use subagents to keep your main context focused on implementation logic. Spawn subagents for:
- Repetitive edits — similar changes across many files (updating imports, renaming across test files, applying a pattern to multiple modules)
- Impact analysis — finding all callers of a function before changing its signature, checking all consumers of an API
- Exploratory reading — checking whether a module's assumptions break with your change, verifying edge cases in adjacent code
- Background test runs — running tests while you continue working on the next change
Important: Wait for all subagents to complete before reporting your track as done. Do not leave background work running when you report completion.
TaskList that all implementation tasks are completed, and run git status to confirm a clean working treegeneral-purpose teammate named validator. The validator's spawn prompt must include: the Teammate Protocol from the Coordination Protocol (verbatim), the original problems from Phase 1, the agreed implementation approach from Phase 3, risk areas flagged by investigators, and the list of all changed files (or a git diff range). Prefer inlining the diff directly in the spawn prompt; if too large, write it to a temp file using mktemp (e.g., mktemp /tmp/team-solve-diff.XXXXXX) and have the validator read from that path. Instruct the validator to:
SendMessageTaskUpdate status, not message timing. Always check TaskList to verify state.completed — only the lead marks tasks completed. This is the acknowledgment that closes the loop.TaskGet their assigned task to find everything they need. Do NOT search the filesystem for instructions.git add . — teammates must add specific filesgit status. If stuck, spawn a replacement and inform the user.development
Audit a codebase's module boundaries — enumerate modules, map their seams (import edges between modules), produce a layered topology diagram, and classify each module as narrow, hub-by-design, or accidental hub (with separate flags for cycles, layer violations, and uncertain import graphs). Outputs a diagram plus a flagged-for-review list; does not change code. Use when assessing whether abstractions live at the right boundaries, before/after a refactor to verify the boundaries improved, or when an unfamiliar codebase needs an architectural map. Not for intra-module refactoring (see improve-code-structure), bug hunting, or feature work.
tools
Sync a forked repository with its upstream. Fetches both remotes, shows divergence, resets shared branches to upstream, re-merges local-only branches, cleans up branches already merged upstream, and pushes. Use when upstream has accepted PRs or moved ahead and you need to bring your fork in line.
data-ai
Manage stacked branches — rebase cascades, detect landed PRs, show stack status. Use when branches are stacked (B on A on main), trunk has advanced, a mid-stack branch changed, or a PR has landed and descendants need rebasing. Lightweight alternative to Graphite that infers the stack from git history.
development
Repeatedly invokes a target skill until its output settles — meaning the target makes no further substantive changes or recommendations. Detects cycles (oscillation between two or more states) and stalls (inner skill keeps recommending but changes don't land) and handles each appropriately. Optionally chains to a follow-up skill after settling. Use when one pass of a skill is rarely enough and each pass tends to uncover more work until eventually there's none — e.g. "repeat-until-settled improve-code-structure then release".