# Openspec Bulk Archive Change

Archive multiple completed changes at once.

- Repository: https://github.com/fengshao1227/ccg-workflow (5956 stars)
- Category: Engineering
- License: MIT
- Last updated: 2026-10-21
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add fengshao1227/ccg-workflow --skill openspec-bulk-archive-change -g -a claude-code -y`
Codex: `npx skills add fengshao1227/ccg-workflow --skill openspec-bulk-archive-change -g -a codex -y`
Cursor: `npx skills add fengshao1227/ccg-workflow --skill openspec-bulk-archive-change -g -a cursor -y`
Gemini CLI: `npx skills add fengshao1227/ccg-workflow --skill openspec-bulk-archive-change -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add fengshao1227/ccg-workflow`

## Description

Archive multiple completed changes at once. Use when archiving several parallel changes.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

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**

1. **Get active changes**

   Run `openspec list --json` to get all active changes.

   If no active changes exist, inform user and stop.

2. **Prompt for change selection**

   Use **AskUserQuestion tool** with multi-select to let user choose changes:
   - Show each change with its schema
   - Include an option for "All changes"
   - Allow any number of selections (1+ works, 2+ is the typical use case)

   **IMPORTANT**: Do NOT auto-select. Always let the user choose.

3. **Batch validation - gather status for all selected changes**

   For each selected change, collect:

   a. **Artifact status** - Run `openspec status --change "<name>" --json`
      - Parse `schemaName` and `artifacts` list
      - Note which artifacts are `done` vs other states

   b. **Task completion** - Read `openspec/changes/<name>/tasks.md`
      - Count `- [ ]` (incomplete) vs `- [x]` (complete)
      - If no tasks file exists, note as "No tasks"

   c. **Delta specs** - Check `openspec/changes/<name>/specs/` directory
      - List which capability specs exist
      - For each, extract requirement names (lines matching `### Requirement: <name>`)

4. **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.

5. **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

The rest: https://github.com/fengshao1227/ccg-workflow/blob/HEAD/.agents/skills/openspec-bulk-archive-change/SKILL.md
