Box
Flags
| Flag | Effect |
|---|
| After searching, save a repo reference in the working dir . |
| Force even if the repo exists locally. |
| Skip all work; list cloned repos and exit. |
| Run the full workflow in the main thread; never dispatch subagents. |
No flags → clone if missing, search, report. Never write
without
.
Execution mode
The mode is a
branch. Pick it before Step 2. Full selection rules, role
definitions, stage barriers, and stage contracts are in
; read
the section for the mode you pick before running its stages.
- Direct mode, main thread runs prepare, search, and (if )
persist itself. Triggered by , the user declining delegation,
or no subagent/Task tool. Execute immediately; never refuse for lack of subagents.
- Delegated mode (default when a subagent tool exists and the user did not
opt out), main thread coordinates only and dispatches a subagent per stage.
Sandbox location
All repos live in the skill's own directory, the
anchor (the directory
holding this
). Include the anchor in every subagent brief.
- Sandbox root:
- Manifest:
- Cloned repos:
or bare invocation
Read
and list cloned repos (or "No repos cloned yet."),
then stop. Main thread handles this directly. No prepare/search/persist. See the
startup template in
.
Step 1: Detect the target
- URL present: use it; derive the slug from the repo name.
- Name mentioned: read for a matching slug. If
absent, stop and ask.
Step 2: Prepare the repo
Delegated: dispatch one prepare subagent (anchor, slug, url,
); wait.
Direct: run the Prepare contract from
. On error, stop and report.
Step 3: Search the repo
Delegated: dispatch one or more read-only search subagents with non-overlapping
scopes; wait for all. Direct: search the local repo per the Search contract. Cite
.
Step 4: Aggregate
Merge findings into one answer, dedupe citations. If nothing matched, say so.
Step 5: Persist (only if )
Delegated: dispatch one persist subagent (anchor, slug, url,
, path
to the working dir
). Direct: run the Persist contract from
. Skip when
is unset.
Step 6: Report
In 2-4 sentences: repo, local path, prepare status, persist status, and a
high-level search summary.
Constraints
- Never , modify remotes, or commit inside clones (unless the user
asks outside this skill).
- Never infer repo contents from the URL alone.
- Do not re-clone existing repos unless is passed.
- Stage barriers hold in both modes: prepare before search, search before
persist, exactly one writer for the clone/manifest and one for .
- Delegated mode: the coordinator never clones, pulls, reads repo files,
searches repo contents, or edits , subagents do that work.