Claude Code Agent Development
anthropics/claude-plugins-official
Explains how to write agents for Claude Code plugins: the markdown file with YAML frontmatter, trigger descriptions, model and color settings, and system prompt design.
MANDATORY skill that activates whenever the OpenSpec apply phase begins.
$ npx skills add elastic/terraform-provider-elasticstack --skill openspec-plus-apply -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install elastic/terraform-provider-elasticstack openspec-plus-apply --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/elastic/terraform-provider-elasticstack.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/openspec-plus-apply .claude/skills/openspec-plus-apply && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "openspec-plus-apply" agent skill from https://github.com/elastic/terraform-provider-elasticstack/tree/main/.agents/skills/openspec-plus-apply into .claude/skills/openspec-plus-apply/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "openspec-plus-apply", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/elastic/terraform-provider-elasticstack/tree/main/.agents/skills/openspec-plus-applyType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add elastic/terraform-provider-elasticstack --skill openspec-plus-apply -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install elastic/terraform-provider-elasticstack openspec-plus-apply --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/elastic/terraform-provider-elasticstack.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/openspec-plus-apply .agents/skills/openspec-plus-apply && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "openspec-plus-apply" agent skill from https://github.com/elastic/terraform-provider-elasticstack/tree/main/.agents/skills/openspec-plus-apply into .agents/skills/openspec-plus-apply/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "openspec-plus-apply", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add elastic/terraform-provider-elasticstack --skill openspec-plus-apply -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install elastic/terraform-provider-elasticstack openspec-plus-apply --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/elastic/terraform-provider-elasticstack.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/openspec-plus-apply .cursor/skills/openspec-plus-apply && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "openspec-plus-apply" agent skill from https://github.com/elastic/terraform-provider-elasticstack/tree/main/.agents/skills/openspec-plus-apply into .cursor/skills/openspec-plus-apply/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "openspec-plus-apply", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/elastic/terraform-provider-elasticstack.git --path .agents/skills/openspec-plus-apply--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add elastic/terraform-provider-elasticstack --skill openspec-plus-apply -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install elastic/terraform-provider-elasticstack openspec-plus-apply --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/elastic/terraform-provider-elasticstack.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/openspec-plus-apply .gemini/skills/openspec-plus-apply && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "openspec-plus-apply" agent skill from https://github.com/elastic/terraform-provider-elasticstack/tree/main/.agents/skills/openspec-plus-apply into .gemini/skills/openspec-plus-apply/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "openspec-plus-apply", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install elastic/terraform-provider-elasticstack openspec-plus-applyInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add elastic/terraform-provider-elasticstack --skill openspec-plus-apply -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/elastic/terraform-provider-elasticstack.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/openspec-plus-apply .github/skills/openspec-plus-apply && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "openspec-plus-apply" agent skill from https://github.com/elastic/terraform-provider-elasticstack/tree/main/.agents/skills/openspec-plus-apply into .github/skills/openspec-plus-apply/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "openspec-plus-apply", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add elastic/terraform-provider-elasticstack --skill openspec-plus-apply -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install elastic/terraform-provider-elasticstack openspec-plus-apply --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/elastic/terraform-provider-elasticstack.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/openspec-plus-apply .opencode/skills/openspec-plus-apply && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "openspec-plus-apply" agent skill from https://github.com/elastic/terraform-provider-elasticstack/tree/main/.agents/skills/openspec-plus-apply into .opencode/skills/openspec-plus-apply/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "openspec-plus-apply", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
openspec-plus-applyMANDATORY skill that activates whenever the OpenSpec apply phase begins.
Openspec Plus Apply is an agent skill from elastic/terraform-provider-elasticstack, published by the product's own GitHub organization. MANDATORY skill that activates whenever the OpenSpec apply phase begins. Triggers: /opsx-apply runs, the openspec-apply-change vanilla skill is referenced or active, openspec instructions apply is invoked, or the user asks to implement, apply, execute, or build out an OpenSpec change ('implement the change', 'apply tasks', 'execute change', 'build out the change'). Takes over only vanilla step 6 (implementation loop) and emulates step 7 output (final status).
Its SKILL.md is about 7.5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files (for example `code-quality-reviewer-prompt.md`, `final-review-prompt.md` and `implementer-prompt.md`).
It sits in Agent Workflows, covering Subagents. The repository describes itself as: Terraform provider for Elastic Stack. The licence is Apache-2.0.
4 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 2a6096e. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
gitbuntscFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Openspec Plus Apply loads about 7.5k tokens when it runs. Until then it costs about 121 tokens; SKILL.md has 3,367 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from elastic/terraform-provider-elasticstack at commit 2a6096e, republished under its Apache-2.0 licence (© elastic). 3,367 words, ~7,491 tokens.
.claude/skills/openspec-plus-apply/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.Wrap vanilla /opsx-apply step 6 (task implementation loop) with subagent orchestration, two-stage review, strict TDD via openspec-plus-tdd, four implementation principles, conditional parallelism over a dependency-validated graph, per-slice + final lint/format/test/other gates, never-ignore-failures rule.
Vanilla owns:
openspec status --change <name> --jsonopenspec instructions apply --change <name> --jsonThis skill takes over Step 6 only.
RIGID. NEVER skip Phase 0 mode question when
settings.apply.executionModeisask. NEVER read affected source code files into the main agent's context — pass PATHS to subagents who read them. NEVER mark a slice[x]while a relevant test is failing or skipped. NEVER run code-quality review before spec-compliance ✅. NEVER dispatch parallel implementer subagents within a change without dependency analysis + user confirmation. NEVER modify spec/design from inside the implementer — escalate to plus-design / plus-spec. NEVER commit code. NEVER take over vanilla steps 1-5 or invoke openspec-verify-change or auto-trigger /opsx-archive.
Red flags — STOP, you are about to violate this skill:
.skip to move on" — never. Failing tests block progress*-prompt.md and sends the body verbatim; improvising it is the #1 failure modeprompt: block verbatim, substitute only {PLACEHOLDER}s. Every bullet is load-bearing; simplifying silently strips instructions from the subagentNone justify re-reading artifacts, reading affected code into main context, editing spec/design, ignored failures, skipped reviewers, batched fixes, per-slice check-ins, fix-attempt #4, full-suite tests, commits, archive auto-trigger, verify-change handoff, batched scenario tests, skipped REFACTOR assessment, or cherry-picked project rules.
Already in conversation context (loaded by vanilla /opsx-apply steps 2-4):
proposal.md, spec.md (or specs/**/*.md), design.md, tasks.mdopenspec status --change <name> --jsonopenspec instructions apply --change <name> --jsonProject standards (AGENTS.md / CLAUDE.md / GEMINI.md) — opencode auto-loads as project instructions; authoritative for code style, file organization, naming, build/test/lint commands.
Build files (package.json, Cargo.toml, go.mod, etc.) — source of lint/format/test commands for gates.
If artifacts NOT in context, surface error:
OpenSpec change artifacts are not in context. Run `/opsx-apply <change>` to load
them, then I will take over the implementation loop.NEVER read source code outside what slices touch.
Four phases (0-3) plus hand-back. NEVER skip, merge, or reorder.
[ ] Phase 0: Pre-Flight (verify inputs, discover commands, choose mode)
[ ] Phase 1: Dependency analysis & parallelism check
[ ] Phase 2: Per-slice execution loop
[ ] Phase 3: Whole-change review & final gateFlow: Phase 0 → Phase 1 → (blocked? → suggest /opsx-continue, exit) → (all_done? → suggest /opsx-archive, exit) → Phase 2 per-slice: implementer → (DONE → spec-compliance review → code-quality review → per-slice gate → mark [x]) | (NEEDS_CONTEXT → provide, re-dispatch) | (BLOCKED → 4-step assessment → recoverable: retry | fundamental/3+ retries: pause and exit). After all slices → Phase 3: whole-change review + final gate → emulate vanilla step 7.
Reviewers cap at 3 fix cycles. Beyond 3 → STOP, artifacts wrong, escalate.
Display workflow phases via todowrite at start; update as phases complete. Add per-slice todos under Phase 2 once slicing is finalized.
In subagent mode, the main agent NEVER reads slice's affected source files — pass PATHS only. Subagents read files in their isolated context:
git diff HEAD; falls back to reading files if git unavailable.Artifacts (proposal.md, spec.md, design.md, tasks.md) are already in main context from vanilla — using them for subagent prompt excerpts is fine. Source code files are NOT.
AGENTS.md/CLAUDE.md/GEMINI.md + referenced docs); enforced by openspec-plus-tdd Phase 0; follow every documented rule strictly, end-to-end (no cherry-picking).Iron Law: NO PRODUCTION CODE WITHOUT A FAILING TEST. One test at a time — full cycle (RED → VERIFY-RED → GREEN → VERIFY-GREEN → REFACTOR) before starting next. Applies to all tests: acceptance (mandatory per Gherkin scenario) and granular (encouraged). REFACTOR assessment mandatory per test — skipping assessment is the violation, not skipping action.
Apply in every slice:
openspec-plus-tdd § Code Style Rules; code is self-documenting; comments are exceptional last resort..skip, .todo, xtest, it.skip, commented-out tests, or --bail shortcuts are anti-patterns; pre-mark gate blocks on any failure.openspec instructions apply is the source of truth; re-running picks up at next pending slice.AGENTS.md/CLAUDE.md/GEMINI.md capture lint/format/test commands, code style, file organization, naming conventions.Read openspec/.plus/config.yaml once (missing/unreadable/unrecognized value → default, zero behavior change): settings.apply.executionMode (ask default | subagent | inline, anything else → ask — skips 0.3 only for subagent/inline), settings.apply.parallelism (ask default | always | never, anything else → ask — skips 1.4 only for always/never).
Confirm vanilla's steps 2-4 produced these in conversation context:
openspec instructions apply --change <name> --json showing state, tasks, contextFilesproposal.md, spec.md / specs/**/*.md, design.md, tasks.mdIf absent → surface error above, stop.
State handling:
"blocked" → suggest /opsx-continue, exit"all_done" → suggest /opsx-archive, exit"ready" → continueIdentify ONCE at Phase 0 (used by per-slice + final gates):
bun run lintbun run formatbun testtsc --noEmit), schema-check, build-check, etc.Discovery order:
package.json "scripts" (or Cargo.toml, go.mod, pyproject.toml)AGENTS.md / CLAUDE.md / GEMINI.md documented commandsMissing or ambiguous → ask user ONCE via question tool.
If settings.apply.executionMode ≠ ask (from 0.0), skip this question — use the configured mode directly, state it in one line, proceed to Phase 1.
Otherwise, use question tool with ONE question. Subagent mode is the recommended default for ALL changes — small, medium, and large. Inline mode exists only as a fallback for environments where subagent dispatch is unavailable. Phrase the question so this preference is unmistakable.
How should the change be implemented?
1. Subagent mode (Strongly Recommended — default for all changes) —
fresh subagent per slice with two-stage review (spec-compliance then
code-quality), isolated context per slice, main agent stays clean.
This produces the highest quality output and is the recommended
choice unless subagent dispatch is unavailable in your environment.
2. Inline mode (Fallback only) — main agent runs each slice with the
same TDD discipline, implementation principles, and self-review
checklists. Reviews are self-checks rather than independent
reviewer subagents. Use only when subagent dispatch is unavailable
or when you have an explicit reason to avoid it.Both modes apply SAME discipline (TDD, principles, never-ignore-failures, per-slice gate, final gate). Subagent mode adds isolated reviewers; inline mode runs reviews as self-check checklists.
If the user does not pick explicitly and provides no reason to prefer Inline, default to Subagent mode and proceed.
Record choice. Display Phase 0-3 todowrite plan.
For each slice (## N. <Name>) in tasks.md:
design.md "Component Structure" + spec terminologyBuild directed graph: slice_n -> slice_m if n depends on m.
For each inferred file path:
git log --oneline -- <inferred-file>Detect:
Slices A, B parallelizable when:
If settings.apply.parallelism ≠ ask (from 0.0), skip this question — always dispatches all independent groups in parallel, never runs sequentially, without asking.
Slices [A, B, ...] appear independent (no shared files, no dependency
between them).
1. Dispatch in parallel (Recommended) — faster, isolated subagents
2. Run sequentially — one at a timeParallel: dispatch all members concurrently. Wait for ALL to return before reviewing any. Parallel slice BLOCKED while siblings still running → wait, then handle BLOCKED.
Sequential: dependency order.
Output: [slice_1, slice_2, ..., (parallel_group_X), ..., slice_N]. Add per-slice todos under Phase 2 in todowrite.
For each slice (or parallel group):
Before EVERY dispatch (implementer AND reviewers): READ the referenced *-prompt.md (resolve ./ next to this SKILL.md, not the CWD). The subagent prompt is that file's fenced prompt: block — copy it verbatim, replacing ONLY {PLACEHOLDER} tokens. You are transcribing a payload, not re-authoring one: do NOT summarize, condense, shorten, paraphrase, reorder, or drop any line, bullet, or section — the length is deliberate and load-bearing. NEVER reconstruct a prompt from memory — reviewer prompts are NOT generic. The urge to "tighten" or "drop the obvious parts" is the failure mode. The placeholder lists below say WHAT to substitute, not what to send.
Per the Dispatch Contract, read ./implementer-prompt.md NOW, send verbatim. Fill placeholders:
{SLICE_NUMBER}, {SLICE_NAME}{TASKS_TEXT} — full text of all N.M tasks{SPECS_TEXT} — full text of slice-relevant scenarios from specs (requirements + Gherkin){DESIGN_PATH} — path only to design.md (from contextFiles in vanilla step 2-4 output). Implementer reads it end-to-end.{AFFECTED_FILES} — paths only (e.g., src/auth/login.ts, tests/auth/login.test.ts). Implementer reads them.{PROJECT_STANDARDS_PATHS} — paths only to AGENTS.md, CLAUDE.md, GEMINI.md, and any docs they reference (e.g., docs/coding-standards.md, docs/testing.md, CONTRIBUTING.md, docs/patterns/*). Implementer reads them in Step 0 (Pre-RED).{LINT_CMD}, {FORMAT_CMD}, {TEST_CMD}, {OTHER_CHECKS} — discovered at Phase 0{WORKING_DIR}NEVER make subagent read tasks.md and specs/**/*.md — paste full slice text. NEVER inherit session history. For design/affected/standards files, pass paths only; implementer reads them.
Never silently retry without changing something.
Per the Dispatch Contract, read ./spec-compliance-reviewer-prompt.md NOW, send verbatim. Fill placeholders:
{SLICE_NUMBER}, {SLICE_NAME}{TASKS_TEXT} — full text of all N.M tasks for this slice{IMPLEMENTER_REPORT} — what the implementer reported after completing the slice{CHANGED_FILE_PATHS} — paths only to files the implementer modified or created{PROPOSAL_PATH} — path only to proposal.md (from contextFiles in vanilla step 2-4 output){SPECS_TEXT} — full text of slice-relevant scenarios from specs (only those containing requirements and Gherkin scenarios that map to this slice's tasks){DESIGN_PATH} — path only to design.md (from contextFiles in vanilla step 2-4 output)NEVER read artifact or changed files in main context — pass paths only; reviewer reads in isolated context.
OpenSpec-contract scope only — does NOT verify project-rule compliance, naming style, comments, or lint/format. Those belong to code-quality reviewer (2.A.4).
Returns ✅ Compliant OR ❌ Issues: Task-Incomplete, Missing-Requirement, Missing-Scenario, Out-of-Scope, Design-Violation, TDD-Discipline. ❌ → implementer fixes → run per-slice gate (2.A.5) on affected files → re-dispatch reviewer. Cap 3 cycles → STOP, pause and exit.
ONLY after spec-compliance ✅. Per the Dispatch Contract, read ./code-quality-reviewer-prompt.md NOW, send verbatim. Fill placeholders:
{SLICE_NUMBER}, {SLICE_NAME}{TASKS_TEXT} — full text of all N.M tasks for this slice{IMPLEMENTER_REPORT} — what the implementer reported after completing the slice{DESIGN_PATH} — path only to design.md (from contextFiles in vanilla step 2-4 output); reviewer reads fully for architecture, file structure, naming, patterns{SPECS_TEXT} — full text of slice-relevant scenarios from specs (only those containing requirements and Gherkin scenarios that map to this slice's tasks){CHANGED_FILE_PATHS} — paths only to files the implementer modified or created; reviewer diffs via git diff HEAD (no git → reads files directly){STANDARDS_DOC_PATHS} — paths only to AGENTS.md, CLAUDE.md, GEMINI.md, and referenced docsNEVER read artifact, changed, or standards files in main context — pass paths only; reviewer reads in isolated context.
Applies implementation principles + code-quality concerns + project-rule compliance. Returns Strengths / Issues (Critical/Important/Minor) / Assessment. ❌ → implementer fixes → run per-slice gate (2.A.5) on affected files → re-dispatch reviewer. Cap 3 cycles → STOP, pause and exit.
Run for affected files of THIS slice:
{LINT_CMD} <affected-files>
{FORMAT_CMD} <affected-files>
{TEST_CMD} --filter <tests-affected-by-slice>
{OTHER_CHECKS} <affected-files>ANY failure:
.skip/.todo/xtest/it.skip/comment-out to bypassCap 3 cycles → STOP, pause and exit.
Edit tasks.md:
- - [ ] N.1 <task>
- - [ ] N.2 <task>
+ - [x] N.1 <task>
+ - [x] N.2 <task>NEVER mark [x] before all gates pass.
Same gates and discipline as subagent mode, run by the main agent. The main agent IS the implementer — it reads files directly (no path-passing indirection, no subagent isolation, no duplicate reads).
Before any code, read: (1) project standards (AGENTS.md / CLAUDE.md / GEMINI.md + referenced docs), (2) slice's affected files for local patterns. After reading, MUST enumerate in TodoWrite every convention relevant to this slice's scope; MUST apply all of them — no selective skipping. NEVER proceed before reading is done.
Use skill tool to load openspec-plus-tdd once at Phase 2 start. If already loaded in session, reference instead of reload. If no skill tool is available, read its SKILL.md directly from your skills directory.
Follow openspec-plus-tdd Per-Test State Machine: pick ONE test (acceptance from Gherkin = mandatory, or granular = encouraged), complete full cycle (RED → VERIFY-RED → GREEN → VERIFY-GREEN → REFACTOR assessment → NEXT) before starting next. NEVER batch. Record per-test refactor outcome. Done when every Gherkin scenario has a passing test AND all granular tests pass. Apply four implementation principles + code-as-documentation throughout.
AFTER all tests pass, BEFORE self-reviews. Scan ALL code across ALL tasks in this slice: duplicate logic → extract shared utility; naming drift → unify; shared abstractions emerged → consolidate; dead code from earlier tasks superseded → remove. Run tests after every refactor. Record outcome (or "nothing found — reason").
Run three checklists in order (mirroring subagent reviewers). ALWAYS re-read proposal.md, slice-relevant spec.md/specs/**/*.md, and design.md before each self-check — do not rely on memory.
Issues found → fix inline → run per-slice gate (2.B.4) on affected files → re-check. Cap 3 cycles per checklist → STOP, pause and exit.
Same as 2.A.5. Never ignore failures.
Same as 2.A.6.
After marking [x], IMMEDIATELY proceed to next slice (or parallel group). NEVER ask "should I continue?".
Pause only on:
Each pause exits Phase 2, surfaces context, suggests plus-* update.
After all slices [x]:
Per the Dispatch Contract, read ./final-review-prompt.md NOW, send verbatim. Pass: change name/schema, all artifact paths, all changed file paths. Main agent does NOT pre-read the diff. Reviewer diffs via git diff HEAD (no git → reads files directly). Verifies cross-slice integration, surfaces design issues (advisory), applies principles whole-change. Does NOT do spec/design alignment (that's openspec-verify-change).
Issues: small/local → fix inline; large/cross-slice → re-dispatch implementer. Cap 3 cycles → STOP, pause and exit.
Run for ALL files affected by ALL slices:
{LINT_CMD} <all-affected-files>
{FORMAT_CMD} <all-affected-files>
{TEST_CMD} --filter <tests-affected-by-any-slice>
{OTHER_CHECKS} <all-affected-files>ANY failure:
Cap 3 cycles → STOP, pause and exit (likely cross-slice integration problem).
Proceed to hand-back.
Produce step 7 output after Phase 3. Do NOT invoke vanilla.
## Implementation Complete
**Change:** <change-name>
**Schema:** <schema-name>
**Progress:** N/N tasks complete ✓
### Completed This Session
- [x] <task 1.1>
- [x] <task 1.2>
- [x] <task 2.1>
...
All tasks complete. Run `/opsx-archive` to sync specs and finalize the change.## Implementation Paused
**Change:** <change-name>
**Schema:** <schema-name>
**Progress:** M/N tasks complete
### Pause Reason
<specific reason — BLOCKED / 3+ failed fixes / 3+ NEEDS_CONTEXT / fundamental artifact gap>
### Suggested Next Step
<plus-design / plus-spec / plus-tasks update / user clarification>
### Resume
Re-run `/opsx-apply <change-name>` after addressing the cause. OpenSpec
state preserved via task checkboxes; next pending slice picks up.NEVER auto-trigger /opsx-archive. NEVER invoke openspec-verify-change.
| Failure | Recovery |
|---|---|
| Artifacts not in context at Phase 0 | Surface error, ask user to run /opsx-apply <change> first, exit |
| Implementer NEEDS_CONTEXT | Provide context, re-dispatch (same model). 3+ in a row → escalate |
Implementer BLOCKED context | Provide more context, re-dispatch same model |
Implementer BLOCKED reasoning | Re-dispatch with capable model |
Implementer BLOCKED too-large | Break into per-task subagents |
Implementer BLOCKED fundamental | Pause and exit, suggest plus-design / plus-spec |
| Spec-compliance ❌ × 1-2 | Implementer fixes, re-review |
| Spec-compliance ❌ × 3 | Pause and exit, suggest plus-spec / plus-design (or plus-tasks if a task description was unclear/wrong) |
| Code-quality ❌ × 1-2 | Implementer fixes, re-review |
| Code-quality ❌ × 3 | Pause and exit, suggest plus-design |
| Per-slice gate fails | Implementer fixes, re-run. NEVER skip/ignore |
| Per-slice gate ❌ × 3 | Pause and exit |
| Final reviewer (Phase 3) fails | Fix inline (small) or re-dispatch implementer (large), re-review |
| Final reviewer ❌ × 3 | Pause and exit, cross-slice integration problem |
| Final cumulative gate fails | Implementer fixes, re-run gate |
| Final gate ❌ × 3 | Pause and exit |
| Test fails repeatedly | Apply systematic-debugging Phase 1 (root cause), not more fixes |
| Verification not run | STOP per verification-before-completion (no claims without fresh evidence) |
| Session interrupted mid-implementation | Re-run /opsx-apply — state preserved via checkboxes |
Wrong slice manually marked [x] | User edits tasks.md back, re-runs |
| Parallel slice BLOCKED while siblings run | Wait for siblings, then handle BLOCKED |
Resumability is free via OpenSpec CLI — Phase 0 always reads state fresh.
NEVER:
openspec-verify-change | auto-trigger /opsx-archive | skip mode question[x] before gate passes | self-review replacing reviewer subagent.skip/.todo/xtest/comment-out tests | batch-write tests | skip REFACTOR assessment | production code before failing testtasks.md (paste text) | modify spec/design from implementer | continue past 3+ failures | commit codeSucceeds: Phase 0 verified artifacts + discovered gates; mode chosen explicitly; dependency-validated ordering; each slice: spec-compliance ✅ + code-quality ✅ + gate ✅ before [x]; no skipped tests; no artifact modifications; Phase 3 reviewer approved + final gate clean; vanilla step 7 output emulated.
Fails: code without verified artifacts; [x] before gates; 3+ fixes without questioning artifacts; wrong review order; implementer modified spec/design; auto-triggered archive; invoked verify-change; skipped tests; skipped final gate; invoked vanilla instead of emulating.
/opsx-apply command or openspec-apply-change skill (forbidden)openspec-plus-tdd — loaded via skill tool by implementer subagent + main agent (inline) before any code© elastic, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 4 other files in .agents/skills/openspec-plus-apply of elastic/terraform-provider-elasticstack.
Open the folder on GitHubat commit 2a6096e
We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in elastic/terraform-provider-elasticstack, which our catalogue first saw on October 7, 2026.
Openspec Plus Apply next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Openspec Plus Apply this skillelastic/terraform-provider-elasticstack | 210 | 1 repos | ~7.5k | Automated safety check: Pass | Apache-2.0 | |
| Claude Code Agent Developmentanthropics/claude-plugins-official | 37k | 8 repos | ~2.8k | Automated safety check: Pass | Apache-2.0 | |
| Subagent Driven DevelopmentAsvarox/allkaraoke | 261 | 37 repos | ~1.2k | Automated safety check: Pass | None | |
| Dispatching Parallel Agentsultralisp/ultralisp | 258 | 40 repos | ~1.5k | Automated safety check: Pass | None | |
| Paseo Advisor Second Opiniongetpaseo/paseo | 20k | 1 repos | ~756 | Automated safety check: Pass | Custom licence | |
| Task Observerrebelytics/one-skill-to-rule-them-all | 3.2k | 1 repos | ~12k | Automated safety check: Pass | CC-BY-4.0 |
anthropics/claude-plugins-official
Explains how to write agents for Claude Code plugins: the markdown file with YAML frontmatter, trigger descriptions, model and color settings, and system prompt design.
Asvarox/allkaraoke
A skill your agent uses when executing implementation plans with independent tasks in the current session
ultralisp/ultralisp
A skill your agent uses when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies
getpaseo/paseo
Launches one separate agent through Paseo to give a second opinion on the current task, with a self-contained briefing and no permission to edit files.
rebelytics/one-skill-to-rule-them-all
Monitors task execution for skill improvement opportunities.
openobserve/openobserve
Splits a change into planner, coder and independent reviewer roles: you confirm a spec, a subagent implements it, and a separate reviewer checks each round's local WIP commit.
elastic/terraform-provider-elasticstack
Enter explore mode - a thinking partner for exploring ideas, investigating problems, and clarifying requirements.
elastic/terraform-provider-elasticstack
Implement tasks from an OpenSpec change. An agent skill from elastic/terraform-provider-elasticstack.
elastic/terraform-provider-elasticstack
Archive a completed change in the experimental workflow. An agent skill from elastic/terraform-provider-elasticstack.
elastic/terraform-provider-elasticstack
Monitor GitHub pull requests through a subagent-based loop that watches CI checks, review comments, PR comments, review state, merge conflicts, and branch freshness.
elastic/terraform-provider-elasticstack
MANDATORY skill that activates whenever the OpenSpec proposal phase begins.
elastic/terraform-provider-elasticstack
Propose a new change with all artifacts generated in one step.
Categories
MANDATORY skill that activates whenever the OpenSpec apply phase begins. Openspec Plus Apply is an agent skill from elastic/terraform-provider-elasticstack, published by the product's own GitHub organization. MANDATORY skill that activates whenever the OpenSpec apply phase begins.
Openspec Plus Apply fits situations like: tasks that involve Subagents.
Run `npx skills add elastic/terraform-provider-elasticstack --skill openspec-plus-apply -a claude-code`. Or copy the skill folder (.agents/skills/openspec-plus-apply in elastic/terraform-provider-elasticstack) into .claude/skills/openspec-plus-apply in your project. Claude Code loads it when a task matches its description.
Run `npx skills add elastic/terraform-provider-elasticstack --skill openspec-plus-apply -a codex`. Or copy the skill folder (.agents/skills/openspec-plus-apply in elastic/terraform-provider-elasticstack) into .agents/skills/openspec-plus-apply in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add elastic/terraform-provider-elasticstack --skill openspec-plus-apply -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/openspec-plus-apply, .gemini/skills/openspec-plus-apply, .github/skills/openspec-plus-apply and .opencode/skills/openspec-plus-apply in your project.
Going by SKILL.md and its folder, Openspec Plus Apply needs the command-line tools its instructions call (git, bun and tsc).
SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Openspec Plus Apply is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 7.5k tokens (SKILL.md is roughly 30k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Openspec Plus Apply: Claude Code Agent Development (anthropics/claude-plugins-official, 37k stars), Subagent Driven Development (Asvarox/allkaraoke, 261 stars), Dispatching Parallel Agents (ultralisp/ultralisp, 258 stars) and Paseo Advisor Second Opinion (getpaseo/paseo, 20k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
elastic (a GitHub organization, an official publisher) maintains it in elastic/terraform-provider-elasticstack, which has 210 GitHub stars. The repository holds 21 skills in this directory. The repository was last updated on October 7, 2026.
Source: elastic/terraform-provider-elasticstack on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.