.claude/skills/openspec-bulk-archive-change/SKILL.md
Archive multiple completed changes at once. Use when archiving several parallel changes.
npx skillsauth add aehrc/pathling openspec-bulk-archive-changeInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Archive multiple completed changes in a single operation.
This skill allows you to batch-archive changes, handling spec conflicts intelligently by checking the codebase to determine what's actually implemented.
Input: None required (prompts for selection)
Steps
Get active changes
Run openspec list --json to get all active changes.
If no active changes exist, inform user and stop.
Prompt for change selection
Use AskUserQuestion tool with multi-select to let user choose changes:
IMPORTANT: Do NOT auto-select. Always let the user choose.
Batch validation - gather status for all selected changes
For each selected change, collect:
a. Artifact status - Run openspec status --change "<name>" --json
schemaName and artifacts listdone vs other statesb. Task completion - Read openspec/changes/<name>/tasks.md
- [ ] (incomplete) vs - [x] (complete)c. Delta specs - Check openspec/changes/<name>/specs/ directory
### Requirement: <name>)Detect spec conflicts
Build a map of capability -> [changes that touch it]:
auth -> [change-a, change-b] <- CONFLICT (2+ changes)
api -> [change-c] <- OK (only 1 change)
A conflict exists when 2+ selected changes have delta specs for the same capability.
Resolve conflicts agentically
For each conflict, investigate the codebase:
a. Read the delta specs from each conflicting change to understand what each claims to add/modify
b. Search the codebase for implementation evidence:
c. Determine resolution:
d. Record resolution for each conflict:
Show consolidated status table
Display a table summarizing all changes:
| Change | Artifacts | Tasks | Specs | Conflicts | Status |
|---------------------|-----------|-------|---------|-----------|--------|
| schema-management | Done | 5/5 | 2 delta | None | Ready |
| project-config | Done | 3/3 | 1 delta | None | Ready |
| add-oauth | Done | 4/4 | 1 delta | auth (!) | Ready* |
| add-verify-skill | 1 left | 2/5 | None | None | Warn |
For conflicts, show the resolution:
* Conflict resolution:
- auth spec: Will apply add-oauth then add-jwt (both implemented, chronological order)
For incomplete changes, show warnings:
Warnings:
- add-verify-skill: 1 incomplete artifact, 3 incomplete tasks
Confirm batch operation
Use AskUserQuestion tool with a single confirmation:
If there are incomplete changes, make clear they'll be archived with warnings.
Execute archive for each confirmed change
Process changes in the determined order (respecting conflict resolution):
a. Sync specs if delta specs exist:
b. Perform the archive:
mkdir -p openspec/changes/archive
mv openspec/changes/<name> openspec/changes/archive/YYYY-MM-DD-<name>
c. Track outcome for each change:
Display summary
Show final results:
## Bulk Archive Complete
Archived 3 changes:
- schema-management-cli -> archive/2026-01-19-schema-management-cli/
- project-config -> archive/2026-01-19-project-config/
- add-oauth -> archive/2026-01-19-add-oauth/
Skipped 1 change:
- add-verify-skill (user chose not to archive incomplete)
Spec sync summary:
- 4 delta specs synced to main specs
- 1 conflict resolved (auth: applied both in chronological order)
If any failures:
Failed 1 change:
- some-change: Archive directory already exists
Conflict Resolution Examples
Example 1: Only one implemented
Conflict: specs/auth/spec.md touched by [add-oauth, add-jwt]
Checking add-oauth:
- Delta adds "OAuth Provider Integration" requirement
- Searching codebase... found src/auth/oauth.ts implementing OAuth flow
Checking add-jwt:
- Delta adds "JWT Token Handling" requirement
- Searching codebase... no JWT implementation found
Resolution: Only add-oauth is implemented. Will sync add-oauth specs only.
Example 2: Both implemented
Conflict: specs/api/spec.md touched by [add-rest-api, add-graphql]
Checking add-rest-api (created 2026-01-10):
- Delta adds "REST Endpoints" requirement
- Searching codebase... found src/api/rest.ts
Checking add-graphql (created 2026-01-15):
- Delta adds "GraphQL Schema" requirement
- Searching codebase... found src/api/graphql.ts
Resolution: Both implemented. Will apply add-rest-api specs first,
then add-graphql specs (chronological order, newer takes precedence).
Output On Success
## Bulk Archive Complete
Archived N changes:
- <change-1> -> archive/YYYY-MM-DD-<change-1>/
- <change-2> -> archive/YYYY-MM-DD-<change-2>/
Spec sync summary:
- N delta specs synced to main specs
- No conflicts (or: M conflicts resolved)
Output On Partial Success
## Bulk Archive Complete (partial)
Archived N changes:
- <change-1> -> archive/YYYY-MM-DD-<change-1>/
Skipped M changes:
- <change-2> (user chose not to archive incomplete)
Failed K changes:
- <change-3>: Archive directory already exists
Output When No Changes
## No Changes to Archive
No active changes found. Use `/opsx:new` to create a new change.
Guardrails
tools
Expert guidance for using WireMock in Java applications for HTTP API mocking and testing. Use this skill when the user asks to mock HTTP APIs, create API stubs, test REST clients, simulate network faults, verify HTTP requests, or integrate WireMock with Spring Boot. Trigger keywords include "wiremock", "mock http", "stub api", "http mock", "api testing", "rest mock", "simulate fault", "verify request", "spring boot wiremock".
documentation
Expert guidance for implementing SQL on FHIR v2 ViewDefinitions and operations to create portable, tabular projections of FHIR data. Use this skill when the user asks to create ViewDefinitions, flatten FHIR resources into tables, write FHIRPath expressions for data extraction, implement forEach/forEachOrNull/repeat patterns for unnesting, create where clauses for filtering, use constants in view definitions, combine data with unionAll, execute ViewDefinitions with $run or $export operations, or implement SQL on FHIR server capabilities. Trigger keywords include "ViewDefinition", "SQL on FHIR", "flatten FHIR", "tabular FHIR", "FHIR to SQL", "FHIR analytics", "FHIRPath columns", "unnest FHIR", "$viewdefinition-run", "$export", "view runner", "repeat", "recursive", "QuestionnaireResponse".
development
Expert guidance for working with the Apache Spark Catalyst query optimisation framework. Use this skill when working with Spark SQL internals, creating custom expressions, implementing query optimisations, working with logical/physical plans, or extending Catalyst. Trigger keywords include "catalyst", "spark sql", "expression", "logical plan", "physical plan", "tree node", "query optimisation", "rule executor", "analyzer", "optimizer", "code generation".
development
Expert guidance for using the SonarCloud API to interact with code quality analysis, projects, issues, quality gates, and metrics. Use this skill when making API calls to SonarCloud, automating code quality workflows, retrieving analysis results, managing projects programmatically, or integrating SonarCloud with CI/CD pipelines. Trigger keywords include "SonarCloud", "SonarCloud API", "code quality API", "SonarQube Cloud", "quality gate", "code analysis API", "SonarCloud measures", "SonarCloud issues".