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.
curl -O https://raw.githubusercontent.com/cp-yu/cc-switch-web/main/.github/prompts/opsx-apply.prompt.mdgit clone --depth 1 https://github.com/cp-yu/cc-switch-webWrote 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.
[](https://agentmods.dev/commands/cp-yu/cc-switch-web/opsx-apply)<a href="https://agentmods.dev/commands/cp-yu/cc-switch-web/opsx-apply"><img src="https://agentmods.dev/badge/commands/cp-yu/cc-switch-web/opsx-apply/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/cp-yu/cc-switch-web/opsx-apply"><img src="https://agentmods.dev/badge/commands/cp-yu/cc-switch-web/opsx-apply.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00010 | $0.03261 |
| Opus 5.5 | $0.00004 | $0.01304 |
| Sonnet 5.5 | $0.00002 | $0.00652 |
| Haiku 4.5 | $0.00001 | $0.00326 |
Grade A, and why
opsx-apply 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 1mo 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.
How it starts
The opening of the file, as written. The whole thing — 268 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 (e.g., /opsx:apply add-auth). If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
Steps
-
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 --jsonto 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>). -
Check status to understand the schema
openspec status --change "<name>" --jsonParse 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)
-
Get apply instructions
openspec instructions apply --change "<name>" --jsonThis returns:
- Context file paths (varies by schema)
- 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/opsx:continue - 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
-
Read context files
Before reading other context files, check whether
openspec/project.opsx.yamlexists.
-
If it exists, read it first for domains → capabilities structure
-
Check
openspec/project.opsx.code-map.yamlfor 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
contextFilesfrom 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.jsondefensively: newer results may include anoptimizationobject in addition toresult,issues, andverificationContext - If the file exists and
result === 'FAIL_NEEDS_REMEDIATION':- Read the persisted
issuesarray - Keep only CRITICAL issues as mandatory remediation context
- Read the persisted
- If
optimization.statusisDEGRADEDorABORTED_UNSAFE, treat it as advisory context only; do NOT let it override the canonical Phase 1 remediation signal - If
tasks.mdcontains a## Remediationsection:- 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.yamlas 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
docLanguageprojection is present, keep the default writing behavior for prose
-
Show current progress
Display:
- Schema being used
- Progress: "N/M tasks complete"
- Remaining tasks overview
- Summary of prior CRITICAL verify issues when
.verify-result.jsonreportsFAIL_NEEDS_REMEDIATION - Summary of open remediation items grouped by
[code_fix]and[artifact_fix] - Dynamic instruction from CLI
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.
- 1mo ago First seen · 268 lines · 10 tokens per session scan A c22a4ac35b02
opsx-apply is a command published in the GitHub repository cp-yu/cc-switch-web (47 stars, last pushed 1mo ago), licensed MIT. It adds 10 tokens to every session and 3,261 once invoked, about $0.0000 per session on Opus 5.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-09-12.
Other commands, from other repositories
template
Manage issue templates for streamlined issue creation.
fest-show
Show festival progression (in-progress tasks, roadmap, and dependency view).
add-note
Add an internal or external note to a ConnectWise PSA ticket.
dispatcher
Use when you want the orchestrator to pick the next repo to work on across your whole portfolio — it enumerates candidate repos below the confinement root, resolves free/busy from each repo's session.lock lease, ranks the FREE ones by backlog priority × staleness × readiness, recommends the single most worthwhile one…
sync-linear
Sync current work with Linear ticket status.
workpm
A project-management workflow for coordinating multiple AI workers through five stages. It includes task assignment, shared activity logs, worker replacement, and final checks.