XiaomiMiMo/MiMo-Code/packages/opencode/src/skill/builtin/.bundle/compose-next/SKILL.md
compose-next
Use for multi-step feature work, bug fixes, or refactors where requirements need to settle, a feature document should carry design + tasks + delivery evidence, and the change deserves independent review before merge. Use it only when the user explicitly requests this workflow, whether with `/compose-next`, by name, or in any other clear natural language; do not infer the request from task complexity alone. Not for one-shot edits, single-file tweaks, or answering questions — those need no orchest
- Source repository stars
- 12,872
- Declared platforms
- 0
- Static risk flags
- 1
- Last source update
- 2026-08-25
- Source checked
- 2026-08-26
Decision brief
What it does: where it fits
Compact end-to-end contract for grill → spec → workspace → implement → verify → review → finalize → finish. One skill load, no internal skill hand-offs.
Not for
- Tasks that require unconfirmed production actions or broad system permissions.
- Environments where the pinned source and install steps cannot be inspected.
Compatibility matrix
Platform support, with evidence labels
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
Inspect first. Install second.
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/XiaomiMiMo/MiMo-Code --skill "packages/opencode/src/skill/builtin/.bundle/compose-next"Inspect the Agent Skill "compose-next" from https://github.com/XiaomiMiMo/MiMo-Code/blob/689a989098373ba4053ef662f40199edfeab6fdb/packages/opencode/src/skill/builtin/.bundle/compose-next/SKILL.md at commit 689a989098373ba4053ef662f40199edfeab6fdb. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
What the source asks the agent to do
- 01
Step 0 — Orient
Inspect the repository, its instructions (AGENTS.md, README, existing spec files), and recent changes before asking anything. Do not ask the user for facts the environment already answers.
Fully constrained mechanical change with no durable design surface → skip Grill and Spec, go to Workspace then Implement.Requirements or design ambiguous → Grill first.Requirements clear, feature deserves a durable document → Spec first. - 02
Review
After implementation is verified and before finalizing the feature document, dispatch one fresh subagent to review the complete change.
the applicable spec sections and acceptance criteria;the worktree path, base branch, base SHA, head SHA, and exact diff command or precomputed diff;a compact verification summary: one line per command with PASS, FAIL, or PRE-EXISTING, plus test counts when available. Do not paste full command output unless a specific failure requires it. - 03
Grill — resolve decisions
Resolve one decision axis at a time. A single decision may bundle multiple dependent fields in one structured question; unrelated decisions require separate turns.
Put known choices in options. Each option gets a concise label and a description explaining the consequence. List the recommendation first and mark its label (Recommended).For consequential choices, include 2–3 viable alternatives.When choices cannot be enumerated, still call question with options: [] for free-text. - 04
Never-Ask handling
If the question tool is unavailable or returns [Never-Ask], resolve this one decision yourself and continue:
Choose the option marked (Recommended) when repository evidence still supports it and it can run unattended.Otherwise choose the closest minimal-scope option supported by the evidence; prefer text-only, non-interactive work.If the decision includes destructive or irreversible work, choose a non-destructive path that preserves progress; never auto-approve the destructive option. - 05
Spec — one document per feature
Maintain one document per feature at docs/compose/spec/.md from the repository root. Do not add a date to the filename. A user-specified location overrides this path. Edit an existing document in place; never create a separate plan or report.
Maintain one document per feature at docs/compose/spec/.md from the repository root. Do not add a date to the filename. A user-specified location overrides this path. Edit an existing document in place; never create a s…markdown --- feature: status: designed | in-progress | delivered updated: YYYY-MM-DD branch: commits: .. filled at delivery ---
Permission review
Static risk signals and limitations
Reads files
The documentation asks the agent to read local files, directories, or repositories.
Inspect the repository, its instructions (`AGENTS.md`, `README`, existing spec files), and recent changes before asking anything. Do not ask the user for facts the environment already answers.Evidence record
Why each signal appears
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 90/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 12,872 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Provenance and original SKILL.md
- Repository
- XiaomiMiMo/MiMo-Code
- Skill path
- packages/opencode/src/skill/builtin/.bundle/compose-next/SKILL.md
- Commit
- 689a989098373ba4053ef662f40199edfeab6fdb
- License
- MIT
- Collected
- 2026-08-26
- Default branch
- main
View the original SKILL.md
Compose Next
Compact end-to-end contract for grill → spec → workspace → implement → verify → review → finalize → finish. One skill load, no internal skill hand-offs.
When writing a checkpoint or compacting context, preserve this recovery instruction in the checkpoint or compacted summary: on resumption, if the Compose Next instructions are absent, reload the compose-next skill before continuing.
Enter this workflow only on an explicit user request. Any clear natural-language instruction to use this workflow counts just like /compose-next; the user does not need to know or name the skill. If the user has not clearly requested the workflow, do the work directly and run none of the phases below; do not infer consent merely because the task is large or resembles a Compose task.
Step 0 — Orient
Inspect the repository, its instructions (AGENTS.md, README, existing spec files), and recent changes before asking anything. Do not ask the user for facts the environment already answers.
Decide the shape of the work:
- Fully constrained mechanical change with no durable design surface → skip Grill and Spec, go to Workspace then Implement.
- Requirements or design ambiguous → Grill first.
- Requirements clear, feature deserves a durable document → Spec first.
User gates and project overrides:
- If the user explicitly requests
without worktreeor specifies a worktree or workspace path, use that workspace choice and skip the default worktree gate. Do not ask again for worktree consent. - If the user explicitly says
without spec, "no spec needed", "this is a small fix", or gives an equivalent instruction, skip the durable feature document and its spec gate. Keep verification and review when the task still warrants them. - An explicit project instruction,
AGENTS.md, or user-provided agent/worktree configuration may define a project-specific worktree path, branch convention, spec path, or spec format. Use that configuration instead of the defaults in this skill. Record the override in the feature document or final report when it changes the normal artifact location.
Every path passes through Workspace before Implement; no branch skips it.
Grill — resolve decisions
Resolve one decision axis at a time. A single decision may bundle multiple dependent fields in one structured question; unrelated decisions require separate turns.
Use the question tool for every user decision:
- Put known choices in
options. Each option gets a conciselabeland adescriptionexplaining the consequence. List the recommendation first and mark its label(Recommended). - For consequential choices, include 2–3 viable alternatives.
- When choices cannot be enumerated, still call
questionwithoptions: []for free-text. - Do not ask for permission to continue when no decision remains.
Split requests spanning independent subsystems before refining each part. Do not begin implementation until requirements and scope are settled.
Never-Ask handling
If the question tool is unavailable or returns [Never-Ask], resolve this one decision yourself and continue:
- Choose the option marked
(Recommended)when repository evidence still supports it and it can run unattended. - Otherwise choose the closest minimal-scope option supported by the evidence; prefer text-only, non-interactive work.
- If the decision includes destructive or irreversible work, choose a non-destructive path that preserves progress; never auto-approve the destructive option.
- State the option selected and the reason in the response.
Never-Ask applies to the current decision only. At every later decision point, call the question tool again — Never-Ask does not disable future questions or pause the workflow.
Spec — one document per feature
Maintain one document per feature at docs/compose/spec/<feature-name>.md from the repository root. Do not add a date to the filename. A user-specified location overrides this path. Edit an existing document in place; never create a separate plan or report.
Template
---
feature: <feature-name>
status: designed | in-progress | delivered
updated: YYYY-MM-DD
branch: <branch-name>
commits: <base-sha>..<head-sha> # filled at delivery
---
# <Feature Name>
## Report
## [S1] Problem
Describe the user-visible problem.
## [S2] Design
Record the chosen behavior and the contracts needed to implement it.
## [S3] Out of Scope
State explicit boundaries.
## Tasks
- [ ] T1: <work item> — acceptance: <observable result> (covers: S2)
- [ ] T2: <work item> — acceptance: <observable result> (covers: S2; depends: T1)
Design-time rules
- Leave
Reportempty and setstatus: designed. - Keep
[Sn]anchors stable when headings change; never renumber existing anchors. - Record settled decisions and precise contracts, not exploration history or file-level code dumps. Include architecture, interfaces, data flow, error behavior, and testing boundaries when they affect the change.
- Make each task the smallest independently verifiable work item; give it an observable acceptance criterion. Add
depends:only for real prerequisites; dependencies must be acyclic. - Add
covers:for every task implementing a design section. Every design requirement must be covered by at least one task; every reference must resolve. - Remove placeholders such as
TBD, "handle edge cases", and references to unspecified similar work. - Scale detail to the change; do not pad small designs.
Before implementation, fix ambiguous requirements, contradictions, unresolved references, and unverifiable acceptance criteria. If the user is available, request document approval with the question tool; otherwise continue.
Amendments
Update only affected sections, bump updated:, preserve anchors, and keep only the tasks required by the amendment and their dependents. Do not regenerate the document or create duplicate tasks.
Workspace — worktree ownership
Never begin implementation on main or master without explicit user consent.
- Compare
git rev-parse --git-dirwithgit rev-parse --git-common-dir. If they differ, use the current linked worktree; do not nest another. A non-emptygit rev-parse --show-superproject-working-treeindicates a submodule, not a linked worktree. - Create a linked worktree at
.worktrees/<slug>by default. Rungit check-ignore -q "$path"; if it is not ignored, write*to.worktrees/.gitignore. Then rungit worktree add "$path" -b "$branch". - When targeting the worktree with a command, pass its absolute path as
workdir; omittedworkdiruses the current session directory. - Install dependencies per repository instructions. Prefer lockfile-frozen, hardlink-friendly modes (
bun ci,uv sync --frozen) over commands that mutate the lockfile. Confirm the toolchain is usable before continuing.
Implement
Use the feature document as the source of requirements, or the conversation for an undocumented mechanical change. When a feature document exists, set its status: in-progress on the first implementation commit. Execute tasks in dependency order. Track multi-step work with the task tool.
For behavior changes with a cheap reproduction, write a failing test, confirm it fails for the intended reason, implement the smallest fix, and confirm it passes. A bug fix requires a regression test when one can be written. Skip test-first for generated code, configuration-only changes, throwaway prototypes, or explicit user direction.
Test public behavior. Do not duplicate production logic in expected values, add test-only production APIs, or assert only that mocks were called. Prefer real implementations over mocks.
For failures, reproduce before editing and identify the root cause from errors, diffs, recent commits, or boundary instrumentation. After two failed fixes, stop patching and re-derive the cause.
Parallel work
Dispatch independent tasks in parallel when isolation prevents collisions; keep tightly coupled work together. Prefer giving parallel subagents disjoint file sets and keeping commits with the orchestrator. Give each subagent the worktree path, task, acceptance criteria, relevant spec sections, and required verification. Do not pass session history. Treat its report as a claim and inspect the resulting diff.
Continue through tasks without routine approval pauses. Stop only for an unresolved product decision, a blocker that cannot be worked around, a destructive action requiring consent, or completion.
Verify
Before any completion claim, run the repository's relevant tests, typecheck, build, or reproduction from the correct directory and read the output. Record each command and result. Mark known baseline failures as PRE-EXISTING with a short identifier. Do not substitute prior output or a subagent report for fresh evidence.
Verification and review are strictly sequential. Wait for all verification commands to exit before dispatching the reviewer. Never overlap review with a resource-heavy test or application process in the same environment.
Review
After implementation is verified and before finalizing the feature document, dispatch one fresh subagent to review the complete change.
Provide the reviewer:
- the applicable spec sections and acceptance criteria;
- the worktree path, base branch, base SHA, head SHA, and exact diff command or precomputed diff;
- a compact verification summary: one line per command with
PASS,FAIL, orPRE-EXISTING, plus test counts when available. Do not paste full command output unless a specific failure requires it.
Do not provide an implementer-authored narrative. The reviewer may inspect the diff and run additional commands needed to validate its conclusions. It must not repeat a command already reported as passing, especially a heavy E2E suite, unless the result is stale, the code changed afterward, or concrete evidence makes the result suspect. Before any justified rerun, confirm no equivalent command is still running. Missing evidence should be reported or gathered with the cheapest non-duplicative command.
Use a reviewer model at least as capable as the strongest implementer it reviews.
Require separate conclusions for:
- Spec compliance — every acceptance criterion is met and points to evidence in the diff or reviewer-observed command output.
- Correctness — logic, boundaries, error handling, regressions, and tests are sound, including issues outside the written spec.
- Codebase consistency — naming, structure, and local conventions match surrounding code.
Classify unmet or unverifiable acceptance criteria and correctness bugs as critical. Fix critical findings, re-verify, and re-review affected areas. Reject incorrect findings with technical evidence. If the fix-and-re-review loop stops converging — repeated findings on the same area, or fixes that introduce new criticals — stop looping and report the impasse with the remaining findings instead of forcing a pass.
For human review feedback, verify each item against the codebase, clarify ambiguous items before editing, and implement validated items one at a time with verification. Check actual usage before expanding an unused path, and surface conflicts with prior user decisions instead of silently complying.
For parallel task work, review integrated task diffs at useful boundaries only when delaying review would compound risk.
Finalize — commit the feature document
After review passes, before finishing the branch, finalize the feature document:
- Set
status: delivered, bumpupdated:, and record the reviewed range as<base-sha>..<head-sha>. - Check off completed tasks; leave incomplete tasks unchecked and do not claim delivery if they block acceptance.
- Replace
Reportwith:
## Report
**What was built** — 1-3 concise paragraphs describing the final behavior.
**Verification** — commands run and their observed results.
**Journey log** — at most 5 entries that help future work: dead ends, pivots, or transferable lessons. Preserve useful prior entries and append new ones.
Update a design section only when it contradicts the delivered behavior. Commit the finalized document on the feature branch before finishing. This documentation-only commit sits outside the recorded reviewed range by construction; it does not restart verification or review, and CI re-running on it is expected.
Finish
Do not auto-finish. After Finalize, report branch, base, head SHA, worktree, feature-doc path, and suggest a closing action.
If the user asks to finish but the path is unclear, use the question tool to settle:
- closing action: local merge / open PR / push only / keep the branch;
- which base branch to merge or target;
- keep or remove the worktree.
Worktree pitfalls:
- Local merge and
gh pr mergerun from the main repository checkout — the base branch cannot be checked out while another worktree holds it. git worktree removeonly on.worktrees/or the path scoped by the prompt /AGENTS.md.
Frequently asked questions
What to verify before installation and use
What does the compose-next source document cover?
Compact end-to-end contract for grill → spec → workspace → implement → verify → review → finalize → finish. One skill load, no internal skill hand-offs.
How do I install compose-next?
The source record exposes this install command: npx skills add https://github.com/XiaomiMiMo/MiMo-Code --skill "packages/opencode/src/skill/builtin/.bundle/compose-next". Inspect the command and pinned source before running it.
Which permission-related actions were detected?
Static rules flagged read-files in the source; the page lists the matching lines and excerpts.
Alternatives
Compare before choosing
prowler-cloud/prowler
postgresql-indexing
PostgreSQL indexing best practices for Prowler: index design, partial indexes, partitioned table indexing, EXPLAIN ANALYZE validation, concurrent operations, monitoring, and maintenance. Trigger: When creating or modifying PostgreSQL indexes, analyzing query performance with EXPLAIN, debugging slow queries, reviewing index usage statistics, reindexing, dropping indexes, or working with partitioned table indexes. Also trigger when discussing index strategies, partial indexes, or index maintenance
brucesongs/kali-claw
insecure-design
Insecure Design (OWASP A06:2025) focuses on security flaws in system architecture and design phases, rather than code implementation-level bugs.
NintendaDev/unikit-ai
unikit-docs
Generate and maintain the project's TECHNICAL documentation from its codebase — scans the project structure, tech stack, and module boundaries, then writes a lean README landing page plus detailed topic pages (architecture, modules, setup, build, APIs), only the docs that are relevant. Use whenever the user wants to create, update, or validate documentation of the CODE or the project itself, e.g. "generate documentation", "create docs", "write the README", "update the project docs", "document th
Aperivue/medsci-skills
make-figures
Generate publication-ready figures and visual abstracts for medical research papers. Supports ROC curves, forest plots, CONSORT/STARD/PRISMA flow diagrams, calibration plots, Kaplan-Meier curves, Bland-Altman plots, confusion matrices, pipeline diagrams, and journal-specific visual/graphical abstracts (python-pptx template-based).