openspec-bootstrap-opsx

openspec-bootstrap-opsx is a skill for Claude Code, Codex from cp-yu/cc-switch-web. It costs 33 tokens per session (1,340 once invoked), scanned A, original, MIT.

A structured workflow for building an OPSX architecture map from an existing codebase. OPSX is the project’s architecture documentation system, and the workflow saves intermediate results while it scans and reviews the code.

In plain words
What is it for?
Use it to start, resume, refresh, review, and promote an architecture-mapping process through the OPSX bootstrap phases.
Why use it?
It gives an existing project a documented architecture map without requiring the map to be written from scratch in one step.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

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/cp-yu/cc-switch-web/openspec-bootstrap-opsx
Any agent
npx skills add cp-yu/cc-switch-web --skill openspec-bootstrap-opsx
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-bootstrap-opsx

README.md
[![agentmods](https://agentmods.dev/badge/skills/cp-yu/cc-switch-web/openspec-bootstrap-opsx.svg)](https://agentmods.dev/skills/cp-yu/cc-switch-web/openspec-bootstrap-opsx)
Your own site
<a href="https://agentmods.dev/skills/cp-yu/cc-switch-web/openspec-bootstrap-opsx"><img src="https://agentmods.dev/badge/skills/cp-yu/cc-switch-web/openspec-bootstrap-opsx.svg" alt="Measured on agentmods" height="20"></a>
Per session 33 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,340 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00033 $0.01340
Opus 5 $0.00016 $0.00670
Sonnet 5 $0.00007 $0.00268
Haiku 4.5 $0.00003 $0.00134

Measured 6d ago against content hash 7969358d9f24, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

openspec-bootstrap-opsx 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 6d 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-bootstrap-opsx/SKILL.md · 135 lines

How it starts

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

Bootstrap the OPSX architecture map from the existing codebase.

This is a structured, multi-phase workflow. Each phase produces intermediate artifacts in openspec/bootstrap/ before writing formal OPSX files.

Treat openspec/config.yaml as the source of truth for authoring policy, but consume its compiled projection semantics: prose-bearing bootstrap artifacts follow the projected documentation language policy, while canonical headings, IDs, schema keys, paths, and commands stay unchanged.

Input: No argument required. Scope hints (folders, domain names) are passed to init.

Steps

  1. Determine current phase

    openspec bootstrap status --json
    
    • If no workspace exists, start with init
    • If workspace exists and is in progress, resume from the current phase
    • If workspace exists and is completed, restart explicitly with openspec bootstrap init --mode refresh --restart
  2. Execute the current phase

    Get phase-specific instructions:

    openspec bootstrap instructions [phase] --json
    

    Phase: init

    openspec bootstrap init --mode full
    

    Creates workspace at openspec/bootstrap/ with scope configuration. Supported upgrade paths:

    • specs-based -> full
    • raw -> full
    • raw -> opsx-first
    • formal-opsx -> refresh Use opsx-first only for raw repositories when you want the formal OPSX bundle plus a README-only specs starter now, and full behavior specs later. Use refresh only for repositories that already have the formal OPSX bundle and need a delta-first refresh that merges reviewed changes back into the existing formal files. Use --restart only when a completed retained workspace already exists and you want a fresh run; it snapshots the old openspec/bootstrap/ into openspec/bootstrap-history/ first.

    Phase: scan

    • Read package.json, README, OpenSpec config, openspec/specs/
    • Scan source code for structural boundaries
    • Write openspec/bootstrap/evidence.yaml with candidate domains:
      domains:
        - id: dom.cli
          confidence: high
          sources: [code:src/cli/, spec:openspec/specs/cli/]
          intent: CLI entry point and command routing
      
    - Run `openspec bootstrap validate` to verify gates
    - In `refresh`, treat the current formal OPSX bundle as the baseline and use git diff only to narrow scan scope when a stored anchor commit is still reachable
    
    **Phase: map**
    - For each domain in evidence.yaml, create `openspec/bootstrap/domain-map/<domain-id>.yaml`:
      ```yaml
      domain:
        id: dom.cli
        type: domain
        intent: CLI entry point and command routing
        status: active
      capabilities:
        - id: cap.cli.init
          type: capability
          intent: Initialize OpenSpec in a project
          status: active
      relations:
        - from: cap.cli.init
          to: dom.cli
          type: contains
      code_refs:
        - id: cap.cli.init
          refs:
            - path: src/core/init.ts
              line_start: 1
    
    • Map incrementally — one domain at a time
    • Run openspec bootstrap status to track per-domain progress
    • Run openspec bootstrap validate after all domains mapped

    Phase: review

    • Validate regenerates review.md and candidate OPSX files from current evidence.yaml and domain-map/*.yaml
    • Review each domain checkbox in review.md
    • In refresh, review the delta summary against the current formal OPSX baseline instead of re-approving the whole model
    • Check all validation checkboxes
    • If evidence or domain maps change, rerun validate and re-approve the regenerated review
    • Low-confidence domains appear first for priority review

    Phase: promote

    openspec bootstrap promote -y
    

    Re-validates all upstream gates before writing.

    • opsx-first: writes the formal OPSX three-file bundle plus only openspec/specs/README.md
    • full on raw: writes the formal OPSX bundle plus one validated spec per mapped capability
    • full on specs-based: preserves existing specs, adds only missing capability specs, and fails fast on target-path conflicts
    • refresh on formal-opsx: merges the reviewed delta into the existing formal OPSX bundle, preserves existing specs, adds only missing specs for newly added capabilities, and fails fast on conflicts Retains the bootstrap workspace on success for audit history. Start the next refresh run with openspec bootstrap init --mode refresh --restart, which snapshots the retained workspace into openspec/bootstrap-history/.

Read the full file on GitHub · 135 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. 6d ago First seen · 135 lines · 33 tokens per session scan A 7969358d9f24

Subscribe to this mod's changes

openspec-bootstrap-opsx is a skill published in the GitHub repository cp-yu/cc-switch-web (43 stars, last pushed 1mo ago), licensed MIT. It adds 33 tokens to every session and 1,340 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

next-cache-components-optimizer

Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…

vercel/next.js · 170 tokens

next-partial-prefetching-adoption

Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the partialPrefetching flag, opt routes in with export const prefetch = 'partial', audit Link prefetch={true} behavior, preserve existing prefetched UI with…

vercel/next.js · 103 tokens

chronicle

Analyze Copilot session history for standup reports, usage tips, session search, and session reindexing. Use when the user asks for a standup, daily summary, usage tips, workflow recommendations, wants to search or find past sessions by keyword/file/PR, wants to reindex their session store, or asks about deleting…

microsoft/vscode · 72 tokens