Update docs and context for OpenSpec changes. Use when: saving session state, refreshing docs after implementation, or syncing change status.
View on GitHubdstoic/skills/openspec-sync/SKILL.md
February 3, 2026
Select agents to install to:
npx add-skill https://github.com/digital-stoic-org/agent-skills/blob/main/dstoic/skills/openspec-sync/SKILL.md -a claude-code --skill openspec-syncInstallation paths:
.claude/skills/openspec-sync/# OpenSpec Sync
Context and documentation synchronization for OpenSpec changes. Keeps CONTEXT-llm.md and docs in sync with implementation state.
## Workflow: Check → Gather → Write
```mermaid
flowchart LR
A["Get status via CLI"] --> B["Read current state"]
B --> C["Gather context"]
C --> D["Write updates"]
D --> E["Verify idempotent"]
classDef action fill:#C8E6C9,stroke:#388E3C,color:#000
class A,B,C,D,E action
```
**Critical**: Use `openspec status` for change state, never parse files directly.
## Exploration Strategy
Before syncing, consult `openspec/project.md` → Exploration Strategy section:
1. **Context sources**: Read `primary` files (project.md, proposal.md, tasks.md)
2. **Must-read files**: CLAUDE.md, settings.json (project constraints)
3. **Tools**: Use configured codebase tools (Glob, Grep, Read)
4. **Philosophy**: Read Execution Philosophy section for current mode
## Commands
### sync
Full synchronization: updates CONTEXT-llm.md and refreshes docs in one command.
**Input**: `$ARGUMENTS` = `change-id`
**Workflow**:
1. Run `openspec status {change-id}` for current state
2. Read git state: `git status --short`, `git log -1 --oneline`
3. Read `openspec/changes/{change-id}/tasks.md` for progress
4. Update CONTEXT-llm.md with gathered state
5. Identify docs affected by implementation (Glob for modified files)
6. Refresh affected docs if out of sync
**Output**:
```
✅ Sync complete for {change-id}
- CONTEXT-llm.md: updated
- Docs refreshed: {count} files
- Change status: {status from CLI}
```
### docs
Refresh documentation files only (no CONTEXT-llm.md update).
**Input**: `$ARGUMENTS` = `change-id`
**Workflow**:
1. Run `openspec status {change-id}` for affected files
2. Read `openspec/changes/{change-id}/proposal.md` → Affected Files
3. Glob for modified files since change started
4. Identify docs that reference changed files
5. Update those docs to reflect current implementation
**Output**:
```
📚 Docs refresh for {chan