openspec-apply-change

Instructions for carrying out the tasks defined in an OpenSpec change. OpenSpec is a workflow for describing proposed software changes and their implementation tasks.

In plain words
What is it for?
Use it when starting or continuing implementation from an OpenSpec change, especially when several changes may be available.
Why use it?
It helps select the correct change, inspect its status and instructions, and implement the listed work in the intended order.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/creativedswork/dscode/openspec-apply-change
Any agent
npx skills add creativedswork/dscode --skill openspec-apply-change
Clone the repo
git clone --depth 1 https://github.com/creativedswork/dscode

Made for: Claude Code, Codex.

Per session 31 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,513 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 75% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00031 $0.01513
Opus 5 $0.00015 $0.00757
Sonnet 5 $0.00006 $0.00303
Haiku 4.5 $0.00003 $0.00151

Measured 2d ago against content hash 922413755848, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

openspec-apply-change scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

75% identical to openspec-apply-change — 41 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.dscode/skills/openspec-apply-change/SKILL.md · 189 lines

How it starts

The opening of the file, as written. The whole thing — 189 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Apply OpenSpec Change

Implement tasks from an OpenSpec change.

Input: Optionally specify a change name. If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.

Steps

  1. Select the change

    If a name is provided, use it. Otherwise:

    • Infer from conversation context if the user mentioned a change
    • Auto-select if only one active change exists
    • If ambiguous, run openspec list --json to get available changes and use the AskUserQuestion tool to let the user select

    Always announce: "Using change: " and how to override (e.g., /opsx:apply <other>).

  2. Check status to understand the schema

    openspec status --change "<name>" --json
    

    Parse the JSON to understand:

    • schemaName: The workflow being used (e.g., "spec-driven")
    • Which artifact contains the tasks (typically "tasks" for spec-driven, check status for others)
  3. Get apply instructions

    openspec instructions apply --change "<name>" --json
    

    This returns:

    • contextFiles: artifact ID -> array of concrete file paths (varies by schema - could be proposal/specs/design/tasks or spec/tests/implementation/docs)
    • Progress (total, complete, remaining)
    • Task list with status
    • Dynamic instruction based on current state

    Handle states:

    • If state: "blocked" (missing artifacts): show message, suggest using openspec-continue-change
    • If state: "all_done": skip implementation tasks, but still run the prototype-retention and consolidate completion steps below before suggesting archive
    • Otherwise: proceed to implementation
  4. Read context files

    Read every file path listed under contextFiles from the apply instructions output. The files depend on the schema being used:

    • spec-driven: proposal, specs, design, tasks
    • Other schemas: follow the contextFiles from CLI output
  5. Show current progress

    Display:

    • Schema being used
    • Progress: "N/M tasks complete"
    • Remaining tasks overview
    • Dynamic instruction from CLI
  6. Implement tasks (loop until done or blocked)

    For each pending task:

    • Show which task is being worked on
    • Make the code changes required
    • Keep changes minimal and focused
    • Mark task complete in the tasks file: - [ ]- [x]
    • Continue to next task

    Pause if:

    • Task is unclear → ask for clarification
    • Implementation reveals a design issue → suggest updating artifacts
    • Error or blocker encountered → report and wait for guidance
    • User interrupts

    After all tasks are complete and the schema is spec-driven-plus, finalize prototype retention before generating consolidate:

    • Read <changeRoot>/prototype.md. If it is a non-UI stub, record Prototype retention: not applicable and continue.
    • If it references HTML files, load prototype-workflow and apply its long-term-value and validity gates to every file.
    • Add or update the ## Prototype Retention table with one final archive or delete decision and a concrete rationale per file.
    • For every delete decision, immediately delete the HTML from docs/prototypes/, remove its docs/prototypes/README.md index entry, and replace or remove references in the current change so no broken link remains.
    • Leave archive files in the staging directory until /opsx:archive.
    • Verify every referenced prototype has a final decision and every deleted path no longer exists.

    After all tasks are complete and the schema is spec-driven-plus, check for the consolidate artifact:

    openspec instructions consolidate --change "<name>" --json
    

    If the instructions indicate consolidate is pending (not already done), read the consolidate template, scan related archived changes, and generate consolidate.md before proceeding to completion.

    Skip if:

    • Schema is not spec-driven-plus (only this schema has consolidate)
    • consolidate.md already exists and is complete

Read the full file on GitHub · 189 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 189 lines · 31 tokens per session scan A 922413755848

Subscribe to this mod's changes

openspec-apply-change is a skill published in the GitHub repository creativedswork/dscode (10 stars, last pushed 19d ago), licensed MIT. It adds 31 tokens to every session and 1,513 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 75% identical to openspec-apply-change, differing in 41 lines, and is treated as a copy.

Related

Other skills, from other repositories

dsh-doc-site-sync

Use when publishing, updating, moving, or removing DeepSeek Harness documentation website pages; editing website/docs.ts mappings or navigation; diagnosing a page missing from the VitePress site; fixing projected documentation links; or running the docs:dev, docs:check, and doc-sync workflow after website-content…

whitelonng/dshcode · 67 tokens

dsh-doc-standards

Use when writing, moving, reviewing, or auditing documentation in the deepseek-harness repo — choosing hierarchy and detail, separating tutorials from references, checking tutorial progression, trimming doc slop, responding to a verify-doc-budgets failure, or requests like "improve the docs", "audit the docs", "where…

whitelonng/dshcode · 84 tokens

dsh-trim-cot-leakage

Use when auditing or fixing prose that reads like a leaked reasoning transcript — dead design-session citations such as (decision N), audit item codes, or §N of uncommitted drafts; change narration such as "used to", "no longer", "this cut"; stack or review vantage ("a later PR in this stack", "rejected in review")…

whitelonng/dshcode · 109 tokens

deepseek-harness

Use when building AI agent applications with a plugin-based architecture — Web UI, CLI, Python SDK, Cordis plugin system, multi-model orchestration. DeepSeek Harness (dsh): open-source agent harness by DeepSeek AI where everything is a plugin, powered by Cordis for spatiotemporal composability.

znlgis/opengis-skills · 68 tokens

deepseek-harness

Use this skill whenever the user wants to call DeepSeek V4-Pro / V4-Flash (or its legacy aliases deepseek-chat / deepseek-reasoner), or you see code that imports from openai import OpenAI with baseurl="https://api.deepseek.com". This skill teaches you the 10 protocol contract rules required to avoid the 16 documented…

HenryZ838978/deepseek-harness · 144 tokens

dsh-pre-push-checks

Use before pushing, force-pushing, marking ready for review, or claiming checks pass on a deepseek-harness branch, and immediately after gh stack sync publishes rewritten branches, to select the smallest tests and checks that cover the outgoing or just-published diff without reflexively running the full repository…

whitelonng/dshcode · 68 tokens