cc-switch-web: Skill for Claude Code

.github/skills/openspec-apply-change/SKILL.md

openspec-apply-change is a skill for Claude Code, Codex from cp-yu/cc-switch-web. It costs 31 tokens per session (3,325 once invoked), scanned A, original, MIT.

An agent for implementing an OpenSpec change, where an OpenSpec change is a named set of proposed project updates with accompanying tasks. It checks the change’s status and instructions before starting.

In plain words
What is it for?
Use it to select or continue an OpenSpec change, inspect its progress, read its implementation instructions, and complete its tasks.
Why use it?
It prevents work from being applied to the wrong change and shows which tasks and supporting files remain.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents; names the AskUserQuestion tool.

This is cp-yu/cc-switch-web's own configuration. It tells Claude Code and Codex how to work on cc-switch-web itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything cc-switch-web configures →

Reuse

Borrowing it

Nothing to install: this file belongs to cp-yu/cc-switch-web. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/cp-yu/cc-switch-web/main/.github/skills/openspec-apply-change/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/cp-yu/cc-switch-web

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for openspec-apply-change

README.md
[![agentmods](https://agentmods.dev/badge/skills/cp-yu/cc-switch-web/openspec-apply-change.svg)](https://agentmods.dev/skills/cp-yu/cc-switch-web/openspec-apply-change)
Your own site
<a href="https://agentmods.dev/skills/cp-yu/cc-switch-web/openspec-apply-change"><img src="https://agentmods.dev/badge/skills/cp-yu/cc-switch-web/openspec-apply-change.svg" alt="Measured on agentmods" height="20"></a>
Per session 31 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,325 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found 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.1 $0.00031 $0.03325
Opus 5 $0.00015 $0.01663
Sonnet 5 $0.00006 $0.00665
Haiku 4.5 $0.00003 $0.00332

Measured 7d ago against content hash edba751c6075, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, 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 7d 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.

.github/skills/openspec-apply-change/SKILL.md · 275 lines

How it starts

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

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:

    • Context 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: "needs_verify": skip back to Phase 1 and run canonical verification
    • If state: "needs_seal": skip implementation and continue with Phase 2/3
    • If state: "all_done": congratulate, suggest archive
    • Otherwise: proceed to implementation
  4. Read context files

    Before reading other context files, check whether openspec/project.opsx.yaml exists.

  • If it exists, read it first for domains → capabilities structure

  • Check openspec/project.opsx.code-map.yaml for code location references

  • Check openspec/specs/ for behavior documentation

  • Treat it as navigation context, not as a replacement for change artifacts

    Read the files listed in 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
    • Build path.join(changeDir, '.verify-result.json') and check whether the previous verify result exists
    • Read .verify-result.json defensively: newer results may include an optimization object in addition to result, issues, and verificationContext
    • If the file exists and result === 'FAIL_NEEDS_REMEDIATION':
      • Read the persisted issues array
      • Keep only CRITICAL issues as mandatory remediation context
    • If optimization.status is DEGRADED or ABORTED_UNSAFE, treat it as advisory context only; do NOT let it override the canonical Phase 1 remediation signal
    • If tasks.md contains a ## Remediation section:
      • Parse each checkbox item
      • Track whether the item is tagged [code_fix] or [artifact_fix]
      • Treat unchecked remediation items as priority work

Document Language Contract:

  • Treat openspec/config.yaml as the compact source of truth, but consume its compiled prompt projection rather than reinterpreting raw keys ad hoc
  • If the compiled projection includes docLanguage, apply it only to natural-language prose you write in the artifact body
  • Follow the existing template structure exactly; do not invent a different layout because the prose language changes
  • Keep template headings, IDs, schema keys, relation types, BDD keywords, file paths, commands, and code identifiers in their canonical form
  • If no docLanguage projection is present, keep the default writing behavior for prose
  1. Show current progress

    Display:

    • Schema being used
    • Progress: "N/M tasks complete"
    • Remaining tasks overview
    • Summary of prior CRITICAL verify issues when .verify-result.json reports FAIL_NEEDS_REMEDIATION
    • Summary of open remediation items grouped by [code_fix] and [artifact_fix]
    • Dynamic instruction from CLI

Read the full file on GitHub · 275 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. 7d ago First seen · 275 lines · 31 tokens per session scan A edba751c6075

Subscribe to this mod's changes

openspec-apply-change is a skill published in the GitHub repository cp-yu/cc-switch-web (43 stars, last pushed 1mo ago), licensed MIT. It adds 31 tokens to every session and 3,325 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens

insight-error-page

Write or audit an insight-kind error page for the Next.js dev overlay. Use when creating a new errors/ .mdx page, auditing an existing one, or checking that a page matches the framework fix cards. Covers page structure, title alignment, FixCard cards with Copy prompt button, code snippets, terminology verification…

vercel/next.js · 83 tokens