openspec-ext-explain

Create or update OpenSpec change explanation docs that capture developer-facing questions and answers under `openspec/changes/.../explain/`. Use when the user explicitly mentions `openspec` or points to a path under `openspec/` while asking to create, update, document, or maintain a Q&A, FAQ, explain note, or question-and-answer doc for an OpenSpec change based on user questions, implementation notes, review questions, or current chat context.

7 stars

Best use case

openspec-ext-explain is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Create or update OpenSpec change explanation docs that capture developer-facing questions and answers under `openspec/changes/.../explain/`. Use when the user explicitly mentions `openspec` or points to a path under `openspec/` while asking to create, update, document, or maintain a Q&A, FAQ, explain note, or question-and-answer doc for an OpenSpec change based on user questions, implementation notes, review questions, or current chat context.

Teams using openspec-ext-explain should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/openspec-ext-explain/SKILL.md --create-dirs "https://raw.githubusercontent.com/igamenovoer/magic-context/main/skills/openspec-ext/openspec-ext-explain/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/openspec-ext-explain/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How openspec-ext-explain Compares

Feature / Agentopenspec-ext-explainStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Create or update OpenSpec change explanation docs that capture developer-facing questions and answers under `openspec/changes/.../explain/`. Use when the user explicitly mentions `openspec` or points to a path under `openspec/` while asking to create, update, document, or maintain a Q&A, FAQ, explain note, or question-and-answer doc for an OpenSpec change based on user questions, implementation notes, review questions, or current chat context.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# OpenSpec Extension: Explain

Create or update a concise Q&A markdown document for an OpenSpec change and keep it under that change's `explain/` directory.

**Goal:** turn implementation questions into a durable, repo-grounded explain note for developers without relying on separate instruction files.

## Inputs

Accept any of:

- a change name
- a path under `openspec/changes/<change>/`
- a path to `openspec/changes/<change>/explain/`
- a request that clearly refers to the current OpenSpec change

The user may provide:

- one or more explicit questions to document
- a source to extract questions from, such as the current chat, an OpenSpec review, or implementation notes
- only a request to create the doc

## Output

Write or update one markdown file under the selected change's `explain/` directory.

Default filename:

- `qa-<what>.md`

For an OpenSpec change, prefer:

- `qa-<change-name>.md`

unless the user gives an explicit filename or there is already a more specific existing Q&A file that the request clearly targets.

Report:

- which file you created or updated
- whether the doc contains placeholder sections or concrete Q&A
- any questions that were intentionally left unanswered because the code/docs do not support them yet

## Required Document Shape

Use this structure:

```md
# Q&A: <what>

## Introduction

<1-2 sentences describing what the Q&A covers and who it is for>

**Related docs**
- `path/to/doc.md`

**Key entrypoints and modules**
- `path/to/code.py`

## <complete question sentence>
> Last revised at: `<UTC ISO-8601>` | Last revised base commit: `<git commit>`

- <concrete answer bullet>
```

Rules:

- Keep the title as `# Q&A: <what>`.
- Default audience is developers, including future maintainers.
- Include both `**Related docs**` and `**Key entrypoints and modules**`.
- Put per-question revision metadata immediately under each question heading.
- Do not add a global metadata block.
- Keep answers concrete: commands, defaults, artifacts, paths, behavior, constraints.
- Use 3-8 bullets or 1-3 short paragraphs per answer.

## Workflow

### 1. Resolve The Target Change With OpenSpec CLI

Prefer deriving the change from any explicit path under:

- `openspec/changes/<change>/...`

Other valid signals:

- an explicit change name from the user
- a request that clearly refers to the current OpenSpec change

If the target change is still ambiguous, inspect active changes first:

```bash
openspec list --sort recent --json
```

If needed, ask the user to choose the intended change.

Once the change is known, always gather authoritative context first:

```bash
openspec status --change "<change-name>" --json
openspec instructions apply --change "<change-name>" --json
```

Use these outputs to determine:

- `changeDir`
- `schema`
- `contextFiles`
- current artifact status

Treat the CLI output as the source of truth for where the change lives and which artifacts define it.

### 2. Resolve The Output Path

- If the user gives an explicit output file path, use it.
- If the user gives an `explain/` directory, create or update `qa-<change-name>.md` there unless the user specifies another filename.
- Otherwise, use `changeDir/explain/qa-<change-name>.md`.
- Create the `explain/` directory if it does not exist.

### 3. Gather Grounding Context

Read every existing file referenced by `contextFiles`.
If a `contextFiles` value is a glob such as `specs/**/*.md`, expand it on disk and read the matching files.

Also read:

- any existing Q&A doc that the request clearly targets
- relevant demo docs or README files
- the implementation entrypoints or modules directly implicated by the requested questions

Also collect:

- current base commit via `git rev-parse HEAD`
- current UTC timestamp via `date -u +%Y-%m-%dT%H:%M:%SZ`

Only read additional repository files when they are needed to answer the requested questions accurately.

### 4. Decide Which Questions To Record

Question capture policy:

- Do not automatically invent or extract questions unless the user explicitly asks for that.
- If the user provides explicit questions, document those questions.
- If the user explicitly asks to extract questions from the current chat, a review file, or notes, extract the relevant questions from that source.
- If the user asks to create the Q&A doc but provides no questions and does not ask for extraction, create placeholder question sections only.

Placeholder format:

- question heading: `## [question title]`
- answer body: `- [answer/code]`

When updating an existing Q&A doc:

- preserve unrelated questions and answers
- preserve each unchanged question's revision metadata
- only update the metadata line for questions whose content actually changed

### 5. Write Practical Answers

Each question must be:

- a complete sentence
- concise
- practical for maintainers or operators

Good examples:

- `How do I run the canonical persistence second step for this change?`
- `What data is persisted into canonical storage and what is skipped?`
- `How are demo-local ids translated into canonical identifiers?`

Answering rules:

- Ground answers in the repository's current docs and code, not guesses.
- Reference files with inline paths like `scripts/.../persist_canonical.py`.
- Prefer concrete artifacts, defaults, produced files, and failure modes.
- If a question cannot be answered from the code/docs, state:
  - what is missing
  - the minimal next step to confirm it
  - where that answer should be documented

### 6. Keep The Doc Self-Contained

- Include enough context in the introduction and answers that the reader does not need another instruction document to understand the Q&A file.
- Do not tell the reader to consult an external meta-instruction file for format rules.
- Summarize important repo-specific behavior directly in the Q&A answers when it matters.

### 7. Sanity-Check The Result

After writing:

- re-read the markdown file
- confirm the title, introduction, related-doc list, and entrypoint list are present
- confirm each question has exactly one metadata line directly beneath it
- confirm unchanged questions did not get fresh timestamps or commit hashes
- confirm placeholder sections were used when no explicit questions were provided

## Example Prompts

- `create an explain Q&A doc for openspec/changes/<change> and document these two questions`
- `under openspec/changes/<change>/explain, add Q&A entries for the questions we just discussed`
- `create a placeholder Q&A doc for this OpenSpec change`
- `extract the implementation questions from this review and turn them into an explain Q&A doc for the change`
- `update the existing explain Q&A with an answer to why frame_uri reuses the tmp keyframe path in this demo`

Pointing to a file or directory under `openspec/` counts as the same trigger signal as explicitly saying `openspec`.

## Guardrails

- Do not write the Q&A outside the change's `explain/` directory unless the user explicitly asks.
- Do not skip the OpenSpec CLI discovery step when the request is about an OpenSpec change; use `openspec status` and `openspec instructions apply` before deciding artifact context.
- Do not auto-extract questions from chat history, reviews, or notes unless the user explicitly asks for extraction.
- Do not fabricate unsupported answers when the code/docs are silent.
- Do not refresh all per-question metadata just because the file was touched.
- Do not turn the Q&A doc into a changelog or implementation diary.
- Do not add auxiliary files unless the user explicitly asks; this skill should usually need only `SKILL.md` and `agents/openai.yaml`.

Related Skills

openspec-ext-revise-by-decision

7
from igamenovoer/magic-context

Manual invocation only; use only when the user explicitly requests `openspec-ext-revise-by-decision` by exact name. Revise OpenSpec change artifacts from a review or decision document that contains questions plus `DECISION` blocks, applying chosen decisions from a review file such as `openspec/changes/<change>/review/review-*.md` back into proposal, design, specs, and tasks.

openspec-ext-review-plan

7
from igamenovoer/magic-context

Review an OpenSpec change (or a single OpenSpec change artifact file) for completeness, coherence, and alignment with existing system design; capture actionable feedback plus open questions; write a review report under the change directory (review/review-YYYYMMDD-HHMMSS.md).

openspec-ext-respond-to-review

7
from igamenovoer/magic-context

Read an OpenSpec review report critically, evaluate the reviewer's proposals and findings against the current change artifacts and repository context, and write developer-owned final decisions/responses back into the review document. Use when the user explicitly mentions `openspec` or points to a path under `openspec/` while asking to examine a review report carefully, decide open questions, respond to findings, fill `DECISION` blocks, respond to an OpenSpec review file, or record final answers in an OpenSpec review document without yet revising the proposal, design, specs, or tasks.

openspec-ext-hack-through-test

7
from igamenovoer/magic-context

Manual invocation only. OpenSpec-specific hack-through-testing workflow targeting production-level end-to-end paths using real data and real user workflows — not CI smoke/unit/integration tests. Three subskills: `propose` to create an OpenSpec change with HTT-ready test cases (automatic scripts and interactive guides) by invoking `openspec-propose` or `openspec-ff-change`, `revise` to update an existing OpenSpec change so its artifacts support hack-through-testing-driven implementation and testing, and `run` to exercise an implemented OpenSpec change through the full hack-through-testing loop (in-place by default, or in a disposable snapshot worktree when requested). Use when the user explicitly asks for `openspec-ext-hack-through-test`, points to `openspec/changes/...` while asking to propose, revise, run, exercise, or prepare work under hack-through-testing principles, or wants OpenSpec work shaped for fast blocker discovery through patch-forward testing.

pixi-make-offline-channel

7
from igamenovoer/magic-context

Use when the user wants to create a self-hosted, offline-installable Conda channel (mirror) containing a specific subset of packages using Pixi.

pixi-make-cu-build-env

7
from igamenovoer/magic-context

Guides the agent to setup a new or existing Pixi environment for compiling C++ and CUDA code. It ensures the correct compilers, toolkits, and CMake configurations are in place for a robust user-space build.

pixi-install-nvidia

7
from igamenovoer/magic-context

Use when the user says "use pixi to install <some nvidia tool>" (or similar) and wants NVIDIA/CUDA/GPU packages installed via Pixi (no sudo/apt), e.g., CUDA toolkit pieces, cuDNN/NCCL, PyTorch CUDA builds, RAPIDS.

pei-docker-usage

7
from igamenovoer/magic-context

Helper for PeiDocker (`pei-docker-cli`). Trigger ONLY when the user explicitly requests PeiDocker usage OR when working within a PeiDocker-generated project (indicated by `user_config.yml`).

conan-basic-usage

7
from igamenovoer/magic-context

Basic operations for the Conan C++ package manager. Use when the user explicitly asks to 'use conan' for tasks like creating projects, installing dependencies, or building packages, or asks for 'how to' guidance on Conan setup.

explore-dnn-model

7
from igamenovoer/magic-context

Manual invocation only; use only when the user explicitly requests `explore-dnn-model` by name. Explore how to run a given DNN model checkpoint in the current Python environment by locating weights + upstream source code, resolving dependencies with user confirmation, running reproducible experiments under `tmp/`, and producing reports about I/O contracts, timing, and profiling.

deepface-basic-usage

7
from igamenovoer/magic-context

Basic usage guide for the DeepFace library (face recognition, verification, analysis).

test-and-log

7
from igamenovoer/magic-context

Test a target (script, demo, pipeline, CLI command, integration) without modifying any source code, then write a structured log of the process, outcomes, anomalies, and issues. Use when the user says "test X and log", "run X and document findings", or "try X without changing code". Default log location is context/logs/TIMESTAMP-task-name/TIMESTAMP.md.