openspec-archive

Archives completed OpenSpec changes with verification gates, spec sync, and PR summary generation.

1|Updated Jun 27, 2026
One-click install
npx skills add https://github.com/TE-QuanBZhang/skills-pool --skill openspec-archive-te-quanbzhang
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: openspec-archive
Source: https://github.com/TE-QuanBZhang/skills-pool/tree/main/ai-coding/skills/openspec-archive
Command: npx skills add https://github.com/TE-QuanBZhang/skills-pool --skill openspec-archive-te-quanbzhang

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Finalizing a completed change is error-prone: incomplete tasks get archived, delta specs drift out of sync with main specs, and no record exists of what code was affected. This Skill enforces a structured archive workflow so every completed change is verified, documented, and stored consistently. ## Core Features & Use Cases - Completion Gating: Checks artifact status via openspec status --json and counts incomplete tasks in tasks.md, prompting for confirmation before archiving unfinished work. - Delta Spec Sync Assessment: Compares delta specs against main specs and optionally invokes the openspec-sync-specs workflow before archiving. - PR Summary Generation: Builds a pull-request-ready PR.md from proposal, design, and tasks artifacts, and can create the PR via the gh CLI. - CodeGraph Snapshot: Captures affected code areas with codegraph explore so the archive preserves architectural context. - Use Case: After finishing an implementation change, run the archive flow to verify the build, sync specs, generate a PR description, and move the change into a dated archive directory. ## Quick Start Archive the completed OpenSpec change named add-user-auth after verifying its artifacts and tasks are done.

Frequently Asked Questions about openspec-archive

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I archive a completed OpenSpec change?

Run the archive workflow with a change name, or let it prompt you to select from active changes via `openspec list --json`. It checks artifact and task completion, then moves the change directory into an archive folder named with the current date.

What happens if tasks are incomplete when archiving a change?

The workflow counts incomplete tasks marked with `- [ ]` in tasks.md and displays a warning with the count. It asks for confirmation before proceeding, so archiving unfinished work is possible but never silent.

Does openspec archive sync delta specs to main specs?

Yes, it assesses delta specs against main specs at openspec/specs/<capability>/spec.md and shows a combined summary of pending changes. You can choose to sync via the openspec-sync-specs workflow or archive without syncing.

Can I create a pull request when archiving a change?

Yes, the workflow generates a PR.md description from the proposal, design, and tasks artifacts plus the git commit log. If the gh CLI is available, it can run `gh pr create` with that file as the body.

What are the limitations of the OpenSpec archive workflow?

Workspace-planning mode changes cannot be archived; the workflow stops rather than moving workspace changes into repo-local archives. CodeGraph snapshots are optional enhancements and fall back to grep-based search if unavailable.