opencode-skills-collection 4.0.45 → 4.0.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundled-skills/.antigravity-install-manifest.json +25 -1
- package/bundled-skills/agy-delegate/SKILL.md +168 -0
- package/bundled-skills/agy-delegate/references/dispatch-and-poll.md +140 -0
- package/bundled-skills/agy-delegate/references/multi-task-queues.md +59 -0
- package/bundled-skills/agy-delegate/references/review-and-land.md +103 -0
- package/bundled-skills/agy-delegate/references/writing-the-brief.md +124 -0
- package/bundled-skills/aider-delegate/SKILL.md +227 -0
- package/bundled-skills/aider-delegate/references/dispatch-and-poll.md +154 -0
- package/bundled-skills/aider-delegate/references/multi-task-queues.md +68 -0
- package/bundled-skills/aider-delegate/references/review-and-land.md +101 -0
- package/bundled-skills/aider-delegate/references/writing-the-brief.md +142 -0
- package/bundled-skills/babysit-pr/SKILL.md +343 -0
- package/bundled-skills/claude-delegate/SKILL.md +182 -0
- package/bundled-skills/claude-delegate/references/dispatch-and-poll.md +220 -0
- package/bundled-skills/claude-delegate/references/multi-task-queues.md +66 -0
- package/bundled-skills/claude-delegate/references/review-and-land.md +117 -0
- package/bundled-skills/claude-delegate/references/writing-the-brief.md +158 -0
- package/bundled-skills/cline-delegate/SKILL.md +140 -0
- package/bundled-skills/cline-delegate/references/dispatch-and-poll.md +142 -0
- package/bundled-skills/cline-delegate/references/multi-task-queues.md +58 -0
- package/bundled-skills/cline-delegate/references/review-and-land.md +80 -0
- package/bundled-skills/cline-delegate/references/writing-the-brief.md +129 -0
- package/bundled-skills/codex-delegate/SKILL.md +177 -0
- package/bundled-skills/codex-delegate/references/dispatch-and-poll.md +161 -0
- package/bundled-skills/codex-delegate/references/multi-task-queues.md +66 -0
- package/bundled-skills/codex-delegate/references/review-and-land.md +126 -0
- package/bundled-skills/codex-delegate/references/writing-the-brief.md +125 -0
- package/bundled-skills/commandcode-delegate/SKILL.md +188 -0
- package/bundled-skills/commandcode-delegate/references/dispatch-and-poll.md +222 -0
- package/bundled-skills/commandcode-delegate/references/multi-task-queues.md +81 -0
- package/bundled-skills/commandcode-delegate/references/review-and-land.md +144 -0
- package/bundled-skills/commandcode-delegate/references/writing-the-brief.md +147 -0
- package/bundled-skills/copilot-delegate/SKILL.md +159 -0
- package/bundled-skills/copilot-delegate/references/dispatch-and-poll.md +143 -0
- package/bundled-skills/copilot-delegate/references/multi-task-queues.md +58 -0
- package/bundled-skills/copilot-delegate/references/review-and-land.md +80 -0
- package/bundled-skills/copilot-delegate/references/writing-the-brief.md +140 -0
- package/bundled-skills/cursor-delegate/SKILL.md +170 -0
- package/bundled-skills/cursor-delegate/references/dispatch-and-poll.md +162 -0
- package/bundled-skills/cursor-delegate/references/multi-task-queues.md +59 -0
- package/bundled-skills/cursor-delegate/references/review-and-land.md +93 -0
- package/bundled-skills/cursor-delegate/references/writing-the-brief.md +126 -0
- package/bundled-skills/debate-review/SKILL.md +85 -0
- package/bundled-skills/debate-review/assets/prompts/review-debate.md +51 -0
- package/bundled-skills/debate-review/assets/prompts/review-main.md +64 -0
- package/bundled-skills/debate-review/assets/prompts/review-rebuttal.md +42 -0
- package/bundled-skills/debate-review/references/comment-format.md +63 -0
- package/bundled-skills/debate-review/references/schema.md +95 -0
- package/bundled-skills/delegate-setup/SKILL.md +215 -0
- package/bundled-skills/delegate-setup/references/schema.md +100 -0
- package/bundled-skills/delegate-setup/references/setup-dialogue.md +101 -0
- package/bundled-skills/docs/integrations/jetski-cortex.md +3 -3
- package/bundled-skills/docs/integrations/jetski-gemini-loader/README.md +1 -1
- package/bundled-skills/docs/maintainers/repo-growth-seo.md +1 -1
- package/bundled-skills/docs/maintainers/skills-update-guide.md +1 -1
- package/bundled-skills/docs/users/aas-core.md +1 -1
- package/bundled-skills/docs/users/bundles.md +1 -1
- package/bundled-skills/docs/users/claude-code-skills.md +1 -1
- package/bundled-skills/docs/users/gemini-cli-skills.md +1 -1
- package/bundled-skills/docs/users/kiro-integration.md +1 -1
- package/bundled-skills/docs/users/usage.md +3 -3
- package/bundled-skills/docs/users/visual-guide.md +4 -4
- package/bundled-skills/falsify/SKILL.md +263 -0
- package/bundled-skills/falsify/references/bias-catalog.md +42 -0
- package/bundled-skills/falsify/references/mental-models.md +135 -0
- package/bundled-skills/falsify/templates/thinking-ledger.md +104 -0
- package/bundled-skills/graceful-shutdown/SKILL.md +379 -0
- package/bundled-skills/grok-delegate/SKILL.md +179 -0
- package/bundled-skills/grok-delegate/references/dispatch-and-poll.md +171 -0
- package/bundled-skills/grok-delegate/references/multi-task-queues.md +67 -0
- package/bundled-skills/grok-delegate/references/review-and-land.md +130 -0
- package/bundled-skills/grok-delegate/references/writing-the-brief.md +119 -0
- package/bundled-skills/kimi-delegate/SKILL.md +137 -0
- package/bundled-skills/kimi-delegate/references/dispatch-and-poll.md +134 -0
- package/bundled-skills/kimi-delegate/references/multi-task-queues.md +58 -0
- package/bundled-skills/kimi-delegate/references/review-and-land.md +92 -0
- package/bundled-skills/kimi-delegate/references/writing-the-brief.md +132 -0
- package/bundled-skills/omp-delegate/SKILL.md +186 -0
- package/bundled-skills/omp-delegate/references/dispatch-and-poll.md +155 -0
- package/bundled-skills/omp-delegate/references/multi-task-queues.md +59 -0
- package/bundled-skills/omp-delegate/references/review-and-land.md +95 -0
- package/bundled-skills/omp-delegate/references/writing-the-brief.md +149 -0
- package/bundled-skills/opencode-delegate/SKILL.md +189 -0
- package/bundled-skills/opencode-delegate/references/dispatch-and-poll.md +156 -0
- package/bundled-skills/opencode-delegate/references/multi-task-queues.md +68 -0
- package/bundled-skills/opencode-delegate/references/review-and-land.md +125 -0
- package/bundled-skills/opencode-delegate/references/writing-the-brief.md +142 -0
- package/bundled-skills/pi-delegate/SKILL.md +148 -0
- package/bundled-skills/pi-delegate/references/dispatch-and-poll.md +146 -0
- package/bundled-skills/pi-delegate/references/multi-task-queues.md +59 -0
- package/bundled-skills/pi-delegate/references/review-and-land.md +95 -0
- package/bundled-skills/pi-delegate/references/writing-the-brief.md +132 -0
- package/bundled-skills/qoder-delegate/SKILL.md +151 -0
- package/bundled-skills/qoder-delegate/references/dispatch-and-poll.md +119 -0
- package/bundled-skills/qoder-delegate/references/multi-task-queues.md +43 -0
- package/bundled-skills/qoder-delegate/references/review-and-land.md +66 -0
- package/bundled-skills/qoder-delegate/references/writing-the-brief.md +85 -0
- package/bundled-skills/sandbase-mcp/SKILL.md +194 -0
- package/bundled-skills/ui-slop-score/SKILL.md +2 -2
- package/bundled-skills/unsloth-finetuning/SKILL.md +352 -0
- package/bundled-skills/vibe-delegate/SKILL.md +147 -0
- package/bundled-skills/vibe-delegate/references/dispatch-and-poll.md +144 -0
- package/bundled-skills/vibe-delegate/references/multi-task-queues.md +59 -0
- package/bundled-skills/vibe-delegate/references/review-and-land.md +87 -0
- package/bundled-skills/vibe-delegate/references/writing-the-brief.md +131 -0
- package/bundled-skills/warp-delegate/SKILL.md +192 -0
- package/bundled-skills/warp-delegate/references/dispatch-and-poll.md +163 -0
- package/bundled-skills/warp-delegate/references/multi-task-queues.md +80 -0
- package/bundled-skills/warp-delegate/references/review-and-land.md +123 -0
- package/bundled-skills/warp-delegate/references/writing-the-brief.md +105 -0
- package/bundled-skills/zcode-delegate/SKILL.md +202 -0
- package/bundled-skills/zcode-delegate/references/dispatch-and-poll.md +113 -0
- package/bundled-skills/zcode-delegate/references/multi-task-queues.md +87 -0
- package/bundled-skills/zcode-delegate/references/review-and-land.md +81 -0
- package/bundled-skills/zcode-delegate/references/writing-the-brief.md +120 -0
- package/package.json +1 -1
- package/skills_index.json +660 -0
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
# Review and land
|
|
2
|
+
|
|
3
|
+
Codex did the typing; you own the judgment. This is where delegation earns its keep or quietly ships a
|
|
4
|
+
mistake. The discipline is simple to state and easy to skip under time pressure: **verify against
|
|
5
|
+
reality, never against the self-report — and read the diff as generated code, which fails in ways a
|
|
6
|
+
green gate can't see.**
|
|
7
|
+
|
|
8
|
+
## Check the tests before trusting the gates
|
|
9
|
+
|
|
10
|
+
If the diff touches existing tests, review those edits *first* — before the gate re-run means anything.
|
|
11
|
+
A weakened assertion, an added skip, or a deleted test makes the gate measure less than it did before
|
|
12
|
+
the run; green is only meaningful if the yardstick wasn't shortened.
|
|
13
|
+
|
|
14
|
+
- **Unbriefed edits to existing tests are a contract change, not part of the fix.** The brief asked for
|
|
15
|
+
an implementation; nothing in it authorized moving the goalposts. Flag them, don't absorb them.
|
|
16
|
+
- **Skipped, disabled, or commented-out tests added in this diff:** treat the underlying test as failing
|
|
17
|
+
until proven otherwise, whatever the annotation's comment claims.
|
|
18
|
+
- **Loosened assertions** (exact match relaxed to contains/truthy, error-type checks broadened, tolerance
|
|
19
|
+
widened): same treatment.
|
|
20
|
+
|
|
21
|
+
## Re-run the gates yourself
|
|
22
|
+
|
|
23
|
+
`result.json` carries Codex's own claim that the gates passed. Treat that as a claim, not evidence —
|
|
24
|
+
re-run the project's actual test/lint/build commands in the working tree and read the output. And keep
|
|
25
|
+
the result in proportion: **passing is necessary, not sufficient.** An implementer can *game* a gate,
|
|
26
|
+
not just misreport it — that is what the test check above and the sweep below exist to catch.
|
|
27
|
+
|
|
28
|
+
For changes with their own verification shape, go further:
|
|
29
|
+
|
|
30
|
+
- **Migrations / schema:** round-trip them (apply, reverse, re-apply on a scratch target) and check for
|
|
31
|
+
drift, rather than trusting that "the migration is reversible."
|
|
32
|
+
- **Removals / renames:** grep the codebase for dangling references to whatever was removed.
|
|
33
|
+
- **Anything stateful:** exercise the actual behavior, don't just confirm it compiles.
|
|
34
|
+
|
|
35
|
+
## Read the diff against the brief
|
|
36
|
+
|
|
37
|
+
Open the diff (`touchedFiles` in the result is your starting list) and hold it against what you asked
|
|
38
|
+
for:
|
|
39
|
+
|
|
40
|
+
- **Scope creep** — did Codex change things the brief said to leave untouched? Unasked refactors,
|
|
41
|
+
renames, "while I was here" edits. These are the most common quality problem in delegated work.
|
|
42
|
+
- **Scope shortfall** — did it do the whole task, including the edge cases and cleanup, or stop at the
|
|
43
|
+
first plausible version?
|
|
44
|
+
- **Quiet judgment calls** — sometimes Codex makes a defensible decision the brief didn't anticipate.
|
|
45
|
+
Don't just accept it because it looks reasonable; understand it and decide.
|
|
46
|
+
|
|
47
|
+
## The implementer sweep
|
|
48
|
+
|
|
49
|
+
Generated code fails in systematic ways that gates are structurally blind to — each of these can sit in
|
|
50
|
+
a diff whose tests are all green. Walk them against every diff before you commit:
|
|
51
|
+
|
|
52
|
+
- **Hardcoded success or fixture data** on a path the brief says does real work — a canned
|
|
53
|
+
`{status: "ok"}` or default return passes tests *by design*. If Codex couldn't implement something,
|
|
54
|
+
the diff should fail loudly, not pretend.
|
|
55
|
+
- **Catch-all error handling that returns a default** instead of propagating — the suppressed failure is
|
|
56
|
+
exactly what the gate would have caught. A broad catch is only acceptable with a recovery path the
|
|
57
|
+
contract documents.
|
|
58
|
+
- **Unverified imports and API calls** — confirm every new dependency, method, and signature exists in
|
|
59
|
+
the *installed* version (read the lockfile or the package, don't trust plausibility).
|
|
60
|
+
- **Dead weight** — unused imports, helpers nothing calls, unreachable branches, "Step 1/Step 2"
|
|
61
|
+
comment scaffolding, comments that restate the line below them.
|
|
62
|
+
- **A second way to do what the file already does** — a new HTTP client, error idiom, or logging style
|
|
63
|
+
introduced beside the existing one instead of reusing it.
|
|
64
|
+
- **New tests that assert internals** — asserting that an internal helper was called, or mocking the
|
|
65
|
+
project's own functions to isolate a "unit." Green, brittle, and worthless as regression cover.
|
|
66
|
+
- **Near-duplicate test bodies** differing by one value — fold into one data-driven test or drop the
|
|
67
|
+
copies; bloat reads as coverage but isn't.
|
|
68
|
+
- **Speculative surface** — optional parameters, config flags, or abstractions with no caller in this
|
|
69
|
+
diff or the repo. Delegated work gets the concrete behavior the brief asked for, nothing extra.
|
|
70
|
+
- **Guards for impossible cases** — null/type checks for values the code's own contract already
|
|
71
|
+
excludes. Noise that buries the validation that matters at real trust boundaries.
|
|
72
|
+
|
|
73
|
+
Anything the sweep catches goes back to Codex as a delta brief (below) or gets fixed in the tree before
|
|
74
|
+
commit — and either way is reported to the user (see "Surface, don't absorb").
|
|
75
|
+
|
|
76
|
+
If the `guard-skills` package is installed, run the relevant guard on the diff for the full treatment —
|
|
77
|
+
`clean-code-guard` on production code, `test-guard` on tests, `docs-guard` on documentation. The sweep
|
|
78
|
+
above is the built-in floor; the guards go deeper.
|
|
79
|
+
|
|
80
|
+
## The commit boundary
|
|
81
|
+
|
|
82
|
+
When the gates pass and the diff holds, **you commit** — the orchestrator, never Codex. This isn't a
|
|
83
|
+
workaround for a missing feature; it's the deliberate boundary. Codex's sandbox can't reliably write
|
|
84
|
+
`.git`, and more importantly, committing should be the act of the party that verified the work. Write
|
|
85
|
+
a clear message describing what landed. If your project attributes co-authorship, that's the place
|
|
86
|
+
for it.
|
|
87
|
+
|
|
88
|
+
From dispatch until that commit, the uncommitted working tree is the authoritative copy of the
|
|
89
|
+
implementer's work — the only one you can commit from, and often the only copy at all. Never run `git checkout`, `reset`, `clean`, or a branch switch in the
|
|
90
|
+
workspace between those two points — however messy an interrupted run looks, inspect it first:
|
|
91
|
+
`git status`, `git diff`, `git diff --cached` for anything the implementer staged (plain
|
|
92
|
+
`git diff` is blind to the index), and open any untracked files (`??` in `git status`) directly —
|
|
93
|
+
they are the implementer's new files, and no diff shows their contents. The tree is evidence,
|
|
94
|
+
not clutter. After that inspection the
|
|
95
|
+
verdict can legitimately be to discard — work built on a premise you have since corrected, for
|
|
96
|
+
example — and then `git checkout`/`clean` is the right tool. The ban is on reflexive cleanup
|
|
97
|
+
before anyone has looked.
|
|
98
|
+
|
|
99
|
+
## Reworking: send the delta, not the whole task
|
|
100
|
+
|
|
101
|
+
If the review turns up problems, don't restate the entire brief. Continue the same Codex session with
|
|
102
|
+
just the correction:
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
echo "The fix is right, but the test mocks the DB session - use the real migrated fixture instead, and
|
|
106
|
+
drop the now-unused import." | node "<skill-dir>/scripts/relay.mjs" --resume-last --cd /path/to/repo
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
(`<skill-dir>` is this skill's install directory — see [dispatch-and-poll.md](dispatch-and-poll.md).)
|
|
110
|
+
|
|
111
|
+
`--session <threadId>` (or `--resume-last`) keeps Codex's context from the first run, so a short delta is enough. Then review
|
|
112
|
+
again — rework gets the same gate-rerun, test check, diff-read, and sweep as the original, no
|
|
113
|
+
shortcuts. Repeat until it's right, then commit.
|
|
114
|
+
|
|
115
|
+
## Surface, don't absorb
|
|
116
|
+
|
|
117
|
+
The human opted into delegation, so committing verified, gate-passing work is the agreed contract.
|
|
118
|
+
But keep them in the loop on anything that changes the shape of the work:
|
|
119
|
+
|
|
120
|
+
- **Report design decisions** Codex made, and any defensible-but-unrequested turns it took.
|
|
121
|
+
- **Note non-blocking nitpicks** you chose not to block on, so the human can overrule you.
|
|
122
|
+
- **Stop and ask** if correct completion requires going beyond the brief — don't expand the mandate on
|
|
123
|
+
your own. A scope change is the human's call, not yours or Codex's.
|
|
124
|
+
|
|
125
|
+
For a multi-task run, capture these in the progress file rather than letting them scroll past — see
|
|
126
|
+
[multi-task-queues.md](multi-task-queues.md).
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
# Writing the brief
|
|
2
|
+
|
|
3
|
+
A brief is the entire task as Codex will see it. Codex runs in a fresh process with **no memory of
|
|
4
|
+
your conversation, no access to your prior notes, and no shared context** — only the text you send and
|
|
5
|
+
whatever it can read from the working tree (including the repo's own `AGENTS.md`, which it picks up
|
|
6
|
+
automatically).
|
|
7
|
+
If a constraint isn't in the brief or discoverable in the repo, it doesn't exist for Codex. The single
|
|
8
|
+
most common failure is a brief that assumes context Codex doesn't have.
|
|
9
|
+
|
|
10
|
+
## The shape that works
|
|
11
|
+
|
|
12
|
+
Codex responds best to compact, block-structured prompts with XML tags rather
|
|
13
|
+
than long prose. State the task, what "done" looks like, how to behave by default, and the few
|
|
14
|
+
constraints that actually matter. Add a block only when the task needs it — don't ship empty ceremony.
|
|
15
|
+
|
|
16
|
+
```xml
|
|
17
|
+
<task>
|
|
18
|
+
One or two sentences: the concrete job and where it lives. Then the specifics — current state, what to
|
|
19
|
+
change, and explicitly what to leave untouched. The "leave untouched" list is what keeps Codex from
|
|
20
|
+
wandering into unrelated refactors.
|
|
21
|
+
</task>
|
|
22
|
+
|
|
23
|
+
<verification_loop>
|
|
24
|
+
Run these before finishing and fix anything they surface, don't just report it:
|
|
25
|
+
<the project's real test command>
|
|
26
|
+
<the project's real lint/format command>
|
|
27
|
+
<the project's real build/typecheck command>
|
|
28
|
+
Confirm the working tree shows only the intended changes afterward.
|
|
29
|
+
</verification_loop>
|
|
30
|
+
|
|
31
|
+
<action_safety>
|
|
32
|
+
Keep changes scoped to the task. No unrelated refactors, renames, or cleanup unless required for
|
|
33
|
+
correctness. Do NOT run git add or git commit — you cannot reliably write .git, and the orchestrator
|
|
34
|
+
commits after reviewing. Leave the work uncommitted in the working tree.
|
|
35
|
+
</action_safety>
|
|
36
|
+
|
|
37
|
+
<structured_output_contract>
|
|
38
|
+
End with a report in this exact shape:
|
|
39
|
+
1. What changed and why
|
|
40
|
+
2. Files touched
|
|
41
|
+
3. Gate outcomes (paste the test/lint counts)
|
|
42
|
+
4. Anything you deviated on, left open, or want a decision on
|
|
43
|
+
</structured_output_contract>
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
That four-block skeleton covers most implementation tasks. Reach for the extra blocks when the task
|
|
47
|
+
profile calls for them:
|
|
48
|
+
|
|
49
|
+
- **Debugging / open-ended fixes** — add `<completeness_contract>` (resolve fully, don't stop at the
|
|
50
|
+
first plausible fix) and `<missing_context_gating>` (don't guess missing repo facts; find them or
|
|
51
|
+
state what's unknown).
|
|
52
|
+
- **Review / diagnosis (read-only)** — add `<grounding_rules>` (ground every claim in evidence; label
|
|
53
|
+
inferences) and run with `--read-only` so Codex can't edit.
|
|
54
|
+
- **Research / recommendations** — add `<research_mode>` (separate observed facts, inferences, open
|
|
55
|
+
questions).
|
|
56
|
+
|
|
57
|
+
## Discover the real gates — don't hardcode
|
|
58
|
+
|
|
59
|
+
`<verification_loop>` is only useful if it names the project's *actual* commands. Read the repo's
|
|
60
|
+
`CLAUDE.md` / `AGENTS.md` / `Makefile` / `package.json` first and copy the real ones in (`make test`,
|
|
61
|
+
`npm run lint`, `cargo test`, `pytest -q`, whatever it is). A brief that says "run the tests" without
|
|
62
|
+
naming them gets you a Codex that guesses — or skips.
|
|
63
|
+
|
|
64
|
+
## Honor the repo's conventions
|
|
65
|
+
|
|
66
|
+
Codex reads the repo's `AGENTS.md` automatically, so house rules there (style, forbidden patterns,
|
|
67
|
+
commit conventions) already apply. If the project forbids certain things in code — say, spec/ticket IDs
|
|
68
|
+
in comments, process language like "MVP"/"for now"/"phase N", or specific test conventions, whatever
|
|
69
|
+
the repo's own conventions ban — restate the load-bearing ones in the brief too, because Codex's
|
|
70
|
+
compliance is only as reliable as what's in front of it.
|
|
71
|
+
|
|
72
|
+
## One task per brief
|
|
73
|
+
|
|
74
|
+
Keep each brief to a single, bounded job. "Review this, fix what you find, update the docs, and
|
|
75
|
+
suggest a roadmap" produces a muddled run; split it into separate dispatches. One brief → one Codex
|
|
76
|
+
run → one commit keeps review and rollback clean, and lets a later task assume the earlier one landed.
|
|
77
|
+
|
|
78
|
+
## Premises freeze at dispatch
|
|
79
|
+
|
|
80
|
+
The implementer starts from the brief's facts and there is no steering channel mid-run. Audit the
|
|
81
|
+
fact block before sending — ownership, target branch, constraints, anything a judgment call rests
|
|
82
|
+
on. If a premise turns out wrong while the run is live, stop the run and re-dispatch a corrected
|
|
83
|
+
brief rather than discounting the output afterward; for a write-capable run, inspect the working
|
|
84
|
+
tree and reconcile any partial or premise-contaminated edits — keep or revert them — before the
|
|
85
|
+
re-dispatch.
|
|
86
|
+
|
|
87
|
+
## Expect environment preamble in the reply
|
|
88
|
+
|
|
89
|
+
Codex's final message may carry environment noise on top of your requested report — a banner injected
|
|
90
|
+
by the repo's `AGENTS.md`, extra text from an MCP tool or extension you've configured, and similar
|
|
91
|
+
local additions. That comes from your own Codex setup, not a relay defect. The
|
|
92
|
+
`<structured_output_contract>` is your defense: ask for a clearly delimited report section so you can
|
|
93
|
+
find the real output regardless of what wraps it.
|
|
94
|
+
|
|
95
|
+
## A worked example
|
|
96
|
+
|
|
97
|
+
```xml
|
|
98
|
+
<task>
|
|
99
|
+
In the payments service at services/billing/, the refund path double-charges when a refund is retried
|
|
100
|
+
after a network timeout (the idempotency key isn't checked before re-submitting). Make the refund
|
|
101
|
+
submission idempotent: check for an existing refund by idempotency key before creating a new one.
|
|
102
|
+
Touch only services/billing/refund.py and its tests. Leave the charge path, the API routes, and the
|
|
103
|
+
data models untouched.
|
|
104
|
+
</task>
|
|
105
|
+
|
|
106
|
+
<verification_loop>
|
|
107
|
+
Run and make green before finishing:
|
|
108
|
+
pytest tests/billing/ -q
|
|
109
|
+
ruff check services/billing/
|
|
110
|
+
Confirm git status shows only refund.py and its test file changed.
|
|
111
|
+
</verification_loop>
|
|
112
|
+
|
|
113
|
+
<action_safety>
|
|
114
|
+
Scope strictly to the refund idempotency fix. No unrelated refactors. Do NOT git add or commit; leave
|
|
115
|
+
changes in the working tree for review.
|
|
116
|
+
</action_safety>
|
|
117
|
+
|
|
118
|
+
<structured_output_contract>
|
|
119
|
+
Report: (1) the root cause and your fix, (2) files touched, (3) pytest + ruff outcomes with counts,
|
|
120
|
+
(4) anything you left open or want decided.
|
|
121
|
+
</structured_output_contract>
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Send this with `relay.mjs` (see [dispatch-and-poll.md](dispatch-and-poll.md)); review the result and
|
|
125
|
+
commit it yourself (see [review-and-land.md](review-and-land.md)).
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: commandcode-delegate
|
|
3
|
+
description: Delegate coding tasks to the Command Code CLI (`cmd`) only when the user
|
|
4
|
+
explicitly requests it, while the orchestrator retains review and landing responsibility.
|
|
5
|
+
risk: safe
|
|
6
|
+
category: agent-orchestration
|
|
7
|
+
source: https://github.com/amElnagdy/delegate-skills
|
|
8
|
+
source_repo: amElnagdy/delegate-skills
|
|
9
|
+
source_type: community
|
|
10
|
+
date_added: '2026-08-26'
|
|
11
|
+
license: MIT
|
|
12
|
+
license_source: https://github.com/amElnagdy/delegate-skills/blob/master/LICENSE
|
|
13
|
+
compatibility: Requires the Command Code CLI (`cmd`, or `cmdc` on Windows, from commandcode.ai)
|
|
14
|
+
installed and authenticated, Node 22+, and git. The orchestrating agent must be
|
|
15
|
+
able to run shell commands and read files. Shell examples assume bash/zsh (macOS/Linux).
|
|
16
|
+
metadata:
|
|
17
|
+
version: 0.5.0
|
|
18
|
+
---
|
|
19
|
+
# Command Code Delegate
|
|
20
|
+
|
|
21
|
+
## When to Use
|
|
22
|
+
|
|
23
|
+
- You want to delegate a bounded coding task to a separate `commandcode` implementer (`Command Code`) and then review its diff yourself.
|
|
24
|
+
- The user explicitly asked for delegation to this implementer.
|
|
25
|
+
|
|
26
|
+
You are the **orchestrator**. This skill lets you hand a bounded coding task to a separate
|
|
27
|
+
**implementer** — the Command Code CLI (`cmd`) — then review what it produced and land it yourself.
|
|
28
|
+
You write the brief and own the judgment; Command Code does the typing in your working tree; you
|
|
29
|
+
verify and commit.
|
|
30
|
+
|
|
31
|
+
Nothing here is specific to one orchestrating agent. The loop needs only the ability to run a shell
|
|
32
|
+
command and read a file, so it works the same whether you are Claude Code, OpenCode with a selected
|
|
33
|
+
model, or any comparable agent. (It is designed for and run on Claude Code; treat other orchestrators
|
|
34
|
+
as designed-for, not yet proven.)
|
|
35
|
+
|
|
36
|
+
## When NOT to use this
|
|
37
|
+
|
|
38
|
+
- The task is small enough to just do inline — delegation overhead is not worth it.
|
|
39
|
+
- The `cmd` CLI is not installed or not authenticated (run `cmd login`).
|
|
40
|
+
- You want to write the code yourself, or you only need a review (Command Code has its own `/review`).
|
|
41
|
+
- You are on native Windows and `cmdc --version` does not work. Upstream recommends WSL for stable Windows use.
|
|
42
|
+
|
|
43
|
+
## Read this before the first dispatch: the autonomy model
|
|
44
|
+
|
|
45
|
+
Command Code's headless mode has **exactly two states, with nothing in between**:
|
|
46
|
+
|
|
47
|
+
- **Default (`-p` with no `--yolo`):** read, grep, and glob work. Every write, edit, and shell call is
|
|
48
|
+
refused by the CLI's permission layer, and headless mode has no prompt to grant them mid-run. This
|
|
49
|
+
is the relay's `--read-only`.
|
|
50
|
+
- **`--yolo` (alias `--dangerously-skip-permissions`):** every tool is allowed, anywhere the process
|
|
51
|
+
can reach. There is no filesystem sandbox and no path restriction. This is what an implementation
|
|
52
|
+
run needs, so the relay passes it by default.
|
|
53
|
+
|
|
54
|
+
`--permission-mode auto-accept` and `--tools-all` do **not** lift the headless write gate. Direct CLI
|
|
55
|
+
probes refused write, edit, and shell with both. So an implementation run
|
|
56
|
+
through Command Code is a full-trust run: scope it with a tight brief and a clean working tree, not
|
|
57
|
+
with a sandbox. The brief is guidance, and a git worktree isolates a checkout without containing the
|
|
58
|
+
process. If writes outside the target tree are unacceptable, use an OS-enforced sandbox such as
|
|
59
|
+
`codex-delegate` or run this one inside a container.
|
|
60
|
+
|
|
61
|
+
Before the first write-capable run, explain this unsandboxed full-trust mode and obtain explicit
|
|
62
|
+
human acceptance. A request to delegate to Command Code is not by itself consent to host-wide access.
|
|
63
|
+
|
|
64
|
+
## Prerequisites (check once)
|
|
65
|
+
|
|
66
|
+
1. `cmd --version` succeeds and `cmd status` reports authenticated. If not, install Command Code and
|
|
67
|
+
run `cmd login`.
|
|
68
|
+
2. **Confirm the CLI on PATH.** On macOS/Linux, `command -v cmd` shows the active `cmd`. On native
|
|
69
|
+
Windows, use `cmdc --version`; `cmd` is the system shell. The relay uses `cmdc` there and launches
|
|
70
|
+
its npm `.cmd` shim through `cmd.exe`. `COMMANDCODE_BIN` remains an absolute-path override and must
|
|
71
|
+
never point to the system command interpreter. The relay records the version it ran in
|
|
72
|
+
`result.json`, so a wrong binary is visible after the fact.
|
|
73
|
+
3. You are in (or will point `--cd` at) the target git repository, and its tree is clean before you
|
|
74
|
+
dispatch — a full-trust run is much easier to review against a clean baseline.
|
|
75
|
+
|
|
76
|
+
## The loop
|
|
77
|
+
|
|
78
|
+
Run these five steps per task. Steps 1, 4, and 5 are your judgment; 2 and 3 are mechanical.
|
|
79
|
+
|
|
80
|
+
### 1. Write the brief
|
|
81
|
+
|
|
82
|
+
Command Code sees **only** the text you send — no repo memory, no chat history, no shared context
|
|
83
|
+
(beyond the repo's own `AGENTS.md`, which it reads automatically). Everything the task needs goes in
|
|
84
|
+
the brief: the goal, the current state, what to change, what to leave untouched, the project's
|
|
85
|
+
**actual** gate commands (discover them from the repo's AGENTS.md/CLAUDE.md/Makefile — do not assume),
|
|
86
|
+
and a report contract. Tell it that it will **not** commit (you will). Keep one task per brief. Full
|
|
87
|
+
guidance and a template: [references/writing-the-brief.md](references/writing-the-brief.md).
|
|
88
|
+
|
|
89
|
+
### 2. Dispatch
|
|
90
|
+
|
|
91
|
+
Send the brief to Command Code with the bundled helper. It wraps `cmd -p`, captures the run, and
|
|
92
|
+
writes a structured `result.json` — so your only job is "run a command, read a file." (`<skill-dir>`
|
|
93
|
+
below is this skill's installed directory — the folder containing this `SKILL.md`, i.e. the directory
|
|
94
|
+
you loaded the skill from. Claude Code prints it as "Base directory for this skill" when the skill
|
|
95
|
+
loads; on other orchestrators use that same directory — if unsure where it landed, run
|
|
96
|
+
`find ~ -name relay.mjs -path '*commandcode-delegate*'` and substitute the directory above it.)
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
node "<skill-dir>/scripts/relay.mjs" --brief brief.txt --cd /path/to/repo
|
|
100
|
+
# read-only (review/diagnosis, no edits): add --read-only
|
|
101
|
+
# continue the exact session: add --session <sessionId> (from result.json; send only the delta brief)
|
|
102
|
+
# fallback when no session id is available: add --continue-last
|
|
103
|
+
# hard time limit (watchdog): add --timeout 2h (default: off; implementation runs routinely need 1-2h)
|
|
104
|
+
# see all options: node .../relay.mjs --help
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
The helper defaults to a write-capable (`--yolo`) run, which intentionally edits the target repository.
|
|
108
|
+
Its temp directory keeps only relay artifacts out of that repository. The relay **never commits** —
|
|
109
|
+
see step 5. Mechanics, flags, and the
|
|
110
|
+
`result.json` shape: [references/dispatch-and-poll.md](references/dispatch-and-poll.md).
|
|
111
|
+
|
|
112
|
+
### 3. Wait for completion
|
|
113
|
+
|
|
114
|
+
The helper blocks until Command Code finishes, so back it with whatever your orchestrator offers and
|
|
115
|
+
resume when it returns:
|
|
116
|
+
|
|
117
|
+
- **Claude Code:** run the Bash call with `run_in_background: true`; you are notified on completion.
|
|
118
|
+
- **Plain shell / other agents:** run it in the foreground for short tasks, or background it and poll
|
|
119
|
+
the result file — `… &` in bash/zsh, or your shell's equivalent. The run is done when `result.json`
|
|
120
|
+
exists with a `status`. (A pre-run usage error — bad args or an empty brief — instead exits with code
|
|
121
|
+
2 and a stderr message and writes no result file, so check the exit code too. A missing `cmd` binary
|
|
122
|
+
exits 127 but *does* write a `result.json` with status `commandcode_unavailable`.)
|
|
123
|
+
|
|
124
|
+
Do not trust progress trackers over reality: a run is finished when `result.json` is written and the
|
|
125
|
+
process has exited. Read the working tree, not a status line. The implementer's full report is the
|
|
126
|
+
`finalMessage` field in `result.json` (also printed in full on stdout between the report markers).
|
|
127
|
+
|
|
128
|
+
### 4. Review — do not trust the self-report
|
|
129
|
+
|
|
130
|
+
`result.json` includes Command Code's own summary and gate claims. **Re-verify, don't accept:**
|
|
131
|
+
|
|
132
|
+
- **Re-run the project's gates yourself** (the test/lint/build commands from step 1). Never take
|
|
133
|
+
"gates passed" on faith.
|
|
134
|
+
- **Read the diff** against the brief: did it do what was asked, nothing more (scope creep) and
|
|
135
|
+
nothing less? `touchedFiles` in the result is your starting point — and because the run was
|
|
136
|
+
full-trust, check for edits *outside* the paths the brief named, not just inside them.
|
|
137
|
+
- **Run the relevant guard skills** on the diff if you have them installed (clean-code-guard,
|
|
138
|
+
test-guard, etc. from `guard-skills`) — this skill produces the work; those skills judge it.
|
|
139
|
+
- For schema/migration changes, round-trip them; for removals, grep for dangling references.
|
|
140
|
+
|
|
141
|
+
Full checklist: [references/review-and-land.md](references/review-and-land.md).
|
|
142
|
+
|
|
143
|
+
### 5. Land it
|
|
144
|
+
|
|
145
|
+
The relay never commits, but it cannot stop Command Code under `--yolo` from writing `.git`. The brief
|
|
146
|
+
forbids implementer commits, and the reviewer compares `HEAD` with the recorded pre-dispatch baseline
|
|
147
|
+
before landing anything. **The orchestrator commits.** Only after the gates pass and the diff holds:
|
|
148
|
+
|
|
149
|
+
- Commit the verified work yourself, with a clear message.
|
|
150
|
+
- If it needs changes, send a delta brief with `--session <sessionId>` from the prior `result.json`
|
|
151
|
+
(use `--continue-last` only when no session id is available), and review again.
|
|
152
|
+
|
|
153
|
+
## Read-only second opinions
|
|
154
|
+
|
|
155
|
+
The relay doubles as a clean way to get an adversarial second opinion: dispatch `--read-only` with a
|
|
156
|
+
brief that lists the agreed points, then each contested point with both positions, and ask Command
|
|
157
|
+
Code to defend or concede each — deliverable in its final message, touching no files. The read-only
|
|
158
|
+
guarantee here is the CLI's own permission layer rather than an OS sandbox, so the relay also checks
|
|
159
|
+
it after the fact: `readOnlyViolation: false` means the Git-visible detector saw no change (ignored
|
|
160
|
+
or outside-repository paths are not covered); `true` means it saw one; `null` means git could not tell.
|
|
161
|
+
|
|
162
|
+
## Authorization model
|
|
163
|
+
|
|
164
|
+
Delegation is something the human opts into. Once they have ("run this queue", "proceed"), committing
|
|
165
|
+
verified, gate-passing work is the agreed contract — that is the whole point. Two limits on that
|
|
166
|
+
mandate: **surface, don't absorb** (report Command Code's design decisions, defensible-but-unasked
|
|
167
|
+
turns, and non-blocking nitpicks rather than silently keeping them) and **stop for scope changes** (if
|
|
168
|
+
correct completion needs going beyond the brief, ask — don't expand the mandate yourself). The full
|
|
169
|
+
treatment is in [references/review-and-land.md](references/review-and-land.md).
|
|
170
|
+
|
|
171
|
+
## References
|
|
172
|
+
|
|
173
|
+
- [references/writing-the-brief.md](references/writing-the-brief.md) — how to write a brief Command
|
|
174
|
+
Code can execute blind: structure, XML blocks, the report contract, embedding the real gate commands.
|
|
175
|
+
- [references/dispatch-and-poll.md](references/dispatch-and-poll.md) — `relay.mjs` flags, the
|
|
176
|
+
`result.json` contract, backgrounding per orchestrator, and recovery when a run misbehaves.
|
|
177
|
+
- [references/review-and-land.md](references/review-and-land.md) — the review checklist, the commit
|
|
178
|
+
boundary, and the exact-session rework cycle.
|
|
179
|
+
- [references/multi-task-queues.md](references/multi-task-queues.md) — running a sequential queue:
|
|
180
|
+
carrying constraints forward, progress tracking, and the end-of-run coherence check.
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
## Limitations
|
|
184
|
+
|
|
185
|
+
- Docs-only import — executable `scripts/relay.mjs` not included; see upstream for full runtime. Requires `commandcode` CLI, Node 18+, git.
|
|
186
|
+
- Relay never commits — it only returns structured result JSON; you review and land the commit.
|
|
187
|
+
|
|
188
|
+
> Adapted from [amElnagdy/delegate-skills](https://github.com/amElnagdy/delegate-skills) (MIT) — docs-only, runtime not bundled.
|