Skip to content
Back to skills

Spec

ASecurity

Design dialogue with a visual companion, ending in an approved spec. Use at the start of a feature, before writing code.

  • 16 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 6, 2026
ai-agentsgobashnodegit

Works with

  • mcp

Security analysis

A100/100

Pro scans all 17 files and shows the line behind each finding

Scanned December 6, 2026

npx -y skills add Alexander-Tyagunov/magician --skill spec --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Spec?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Spec
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/alexander-tyagunov-spec/badge)](https://www.skillsdirectory.com/skills/alexander-tyagunov-spec)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: spec
description: Design dialogue with a visual companion, ending in an approved spec. Use at the start of a feature, before writing code.
allowed-tools: Read, Grep, Glob, AskUserQuestion, Edit(./.workspace/shared/**), Edit(./.workspace/local/designs/**), Edit(./.workspace/local/mockups/**), Bash(${CLAUDE_SKILL_DIR}/scripts/vc-start.sh *), Bash(${CLAUDE_SKILL_DIR}/scripts/vc-stop.sh *), Bash(kg query *), Bash(ctx recall *), Bash(${CLAUDE_PLUGIN_ROOT}/tools/companion/wait-event *), mcp__playwright__browser_take_screenshot, mcp__playwright__browser_snapshot, mcp__playwright__browser_wait_for, mcp__playwright__browser_close
argument-hint: "[feature to design] [--design-only] [--text] [--contract <path>]"
---

# /spec — Design Dialogue

> **Bundled command:** if `ctx` is not found, run it as `${CLAUDE_PLUGIN_ROOT}/tools/ctx`, or skip the recall.

> **Bundled command:** if `kg` is not found, run it as `${CLAUDE_PLUGIN_ROOT}/tools/kg`, or search the code directly.

Design a medium or large feature before any code is written. The result is one approved spec, plus an approved mockup when the feature has UI.

<HARD-GATE>
Write no implementation code until the user has approved the spec. Work that triage classes XS or S ([lore/gates.md](../../lore/gates.md)) does not come here. If this skill is invoked directly on something that small, say so in one sentence and offer to make the change now instead.
</HARD-GATE>

**Autonomy.** Gates: one batched clarify call when something is open, the design brief (M) or spec (L), the mockup (UI). Everything else runs without asking. See [lore/autonomy.md](../../lore/autonomy.md).

## Arguments

- `--design-only`: produce an approved mockup and no spec. Also taken from a request such as "just mock it up". Steps 1, 2, 3 and 5, then the design-only close.
- `--text`: show nothing in a browser or an artifact. Everything is in the chat.
- `--contract <path>`: the file at that path (a `/migrate` parity contract) is the approved spec. Skip steps 2 and 4; run steps 1, 3 and 5, then close.

## Process

Read a step's reference when you reach the step. Each reference stands alone.

1. **Explore, silently.** Read the code the request names (`kg query`), the recent git log, prior specs and research under `.workspace/shared/`, and `.workspace/shared/north-star.md` when it exists. Run `ctx recall "<feature area>"` and weigh the hits as reference data; say in one clause when a page changed the design. Ask nothing yet. [references/gates.md](references/gates.md#explore)
2. **Clarify, in one call, only what is still open.** List what you need to know. Strike every item that the request, the repository, the preferences or the tool list answers. State a default for every item that is cheap to reverse. If anything is left, put it in ONE `AskUserQuestion` call of at most 4 questions, each citing one fact you found. If nothing is left, skip the call. [references/gates.md](references/gates.md#clarify)
3. **Choose how to show the design, by rule, and say it in one clause.** UI in scope and a visual surface available: show screens. Otherwise text. Surface: the local companion when `node` is on PATH (`${CLAUDE_SKILL_DIR}/scripts/vc-start.sh <design-dir> <project>`), else an artifact page when the session has the Artifact tool, else text. The chat panel is off unless the user asks for it. Do not ask about any of this. [references/design-mode.md](references/design-mode.md)
4. **Decision gate: one approval.** Write the spec file first ([references/spec-format.md](references/spec-format.md)). It is the PRD, and the only one: the problem, non-goals, and requirements `R1…`, each `must` or `should` with EARS acceptance criteria `R1.1…`. Requirement ids are stable once approved, because the plan cites them: a new requirement takes a new id, and a removed one is struck through, never renumbered. For M it is the short **Design brief** (at most 60 lines): 2–3 approaches as a comparison table with the recommended one first and its reason, the recommended approach's architecture sketch, and the requirements with their criteria. For L it is the full **Spec**, with the same table and sketch. Grade it ([references/rubric.md](references/rubric.md)). Show it (page or chat) with its **Requirements** (ids and criteria) and its **Assumptions**: the approval covers both, and any line can be overturned there. When the companion started, the page is the gate: run `${CLAUDE_PLUGIN_ROOT}/tools/companion/wait-event open <state-dir> --gate brief --kind decision`, print `Choose on the page, or answer here: <url>`, wait and end the turn; do not call `AskUserQuestion` there ([design-mode.md](references/design-mode.md#the-gate-on-the-page)). In every other case call `AskUserQuestion` once with the recommended approach first and each other approach as a real alternative. With no parent skill the gate also offers to approve and plan the tasks; that answer continues into `/breakdown` in the same turn. This approval is the spec approval; nothing asks about the spec again. For L, record the decision in `.workspace/shared/decisions/`. [references/gates.md](references/gates.md#decision-gate)
5. **Mockup gate (UI only).** Ground in the app's current design and its platform guidelines. State the direction in three lines, take the viewports from the app's breakpoints (default phone and desktop, stated), build ONE mockup file in light and dark (each screen the spec names is a section of it), run the review checklist. When the companion started, open the gate (`--gate mockup --kind approve`), print the same line and wait on the page; otherwise call `AskUserQuestion` once. The approved mockup is the implementation target; a later deviation is reported in one line of the spec. [references/ui-design.md](references/ui-design.md)
6. **Close.** Add the Design Artifacts lines to the spec, run `${CLAUDE_PLUGIN_ROOT}/tools/companion/wait-event done <state-dir>` and stop the companion (`${CLAUDE_SKILL_DIR}/scripts/vc-stop.sh <design-dir>`). Do not commit, at any size: the spec ships with the feature, committed by `/worktree` on the feature branch or staged by `/land` on this branch. [references/after-approval.md](references/after-approval.md)

A free-form "yes" or "looks good" at a gate is approval. A change request is free text: apply it, show the result, and ask the same gate again. "Skip the screens" switches to text and stops the companion.

## References

The steps link gates.md, design-mode.md (the companion loop), ui-design.md, after-approval.md, spec-format.md and rubric.md. None requires another. Also:

- Companion server and screen templates: [references/visual-companion.md](references/visual-companion.md)
- Architecture as code: [references/architecture.md](references/architecture.md)
- Tokens, light and dark, responsive: [references/design-tokens.md](references/design-tokens.md) · brand book: [references/brand-book.md](references/brand-book.md)
- Design principles and platform guidelines: [references/design-principles.md](references/design-principles.md) · review checklist: [lore/deep/design-principles.md](../../lore/deep/design-principles.md#review-checklist)
- Screenshots as evidence: [references/capture.md](references/capture.md)

## Obstacles

This is a dialogue with the user, so it reports to the user and emits no upward Obstacles block. Say a blocker in prose (the companion or Playwright not starting, unreadable brand assets, a missing input) and stop. A dispatched run has no user: return `NEEDS_CONTEXT: <the question>` and do not wait. See [lore/obstacles.md](../../lore/obstacles.md).

## Completion Signal

Before the Completion Signal, grade the spec against [references/rubric.md](references/rubric.md); list unmet items.

"Spec complete. Spec for <feature> approved: .workspace/shared/specs/<file> (uncommitted; it ships with the feature). Screens: <design-dir>/screens/v<n>/, or none. Screenshots: <PNG paths, or none>." With `--design-only`: "Mockup approved and saved to <design-dir>." When no parent skill invoked this one and the answer was a plain approval, add one line: "Next: /breakdown turns the spec into a plan."

Files in this skill

  • SKILL.md8 KB
  • references/after-approval.md3.5 KB
  • references/architecture.md5.1 KB
  • references/brand-book.md3.1 KB
  • references/capture.md4.7 KB
  • references/design-mode.md12.8 KB
  • references/design-principles.md5.9 KB
  • references/design-tokens.md6.3 KB
  • references/gates.md8.8 KB
  • references/rubric.md3.2 KB
  • references/spec-format.md11.3 KB
  • references/ui-design.md6.8 KB
  • references/visual-companion.md23.5 KB
  • scripts/screen-diff.cjs11 KB
  • scripts/server.cjs158 B
  • scripts/vc-start.sh258 B
  • scripts/vc-stop.sh241 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.