openspec-schema
Create and manage custom workflow schemas using `openspec schema init/fork/validate/which`. Use when the user says "create a custom workflow", "custom schema", "fork a schema", or wants to define their own artifact types and dependencies.
Best use case
openspec-schema is best used when you need a repeatable AI agent workflow instead of a one-off prompt. It is especially useful for teams working in multi. Create and manage custom workflow schemas using `openspec schema init/fork/validate/which`. Use when the user says "create a custom workflow", "custom schema", "fork a schema", or wants to define their own artifact types and dependencies.
Create and manage custom workflow schemas using `openspec schema init/fork/validate/which`. Use when the user says "create a custom workflow", "custom schema", "fork a schema", or wants to define their own artifact types and dependencies.
Users should expect a more consistent workflow output, faster repeated execution, and less time spent rewriting prompts from scratch.
Practical example
Example input
Use the "openspec-schema" skill to help with this workflow task. Context: Create and manage custom workflow schemas using `openspec schema init/fork/validate/which`. Use when the user says "create a custom workflow", "custom schema", "fork a schema", or wants to define their own artifact types and dependencies.
Example output
A structured workflow result with clearer steps, more consistent formatting, and an output that is easier to reuse in the next run.
When to use this skill
- Use this skill when you want a reusable workflow rather than writing the same prompt again and again.
When not to use this skill
- Do not use this when you only need a one-off answer and do not need a reusable workflow.
- Do not use it if you cannot install or maintain the related files, repository context, or supporting tools.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/openspec-schema/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How openspec-schema Compares
| Feature / Agent | openspec-schema | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Create and manage custom workflow schemas using `openspec schema init/fork/validate/which`. Use when the user says "create a custom workflow", "custom schema", "fork a schema", or wants to define their own artifact types and dependencies.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# OpenSpec Schema Skill
Use **openspec schema** subcommands to create and manage custom workflow schemas. Schemas define what artifacts exist and their dependencies. The default `spec-driven` schema provides proposal -> specs -> design -> tasks, but custom schemas allow different workflows.
## When to Use
- The user wants a custom workflow (e.g. research-first, rapid iteration).
- The user says "create a schema", "custom workflow", "fork the spec-driven schema".
- Debugging schema resolution (`openspec schema which`).
- Validating a custom schema's structure.
## Prerequisites
- **OpenSpec CLI** installed (see **openspec-install**).
## Workflow
### Create a new schema from scratch
```bash
openspec schema init my-workflow
# Interactive: prompts for description, artifacts, default
# Non-interactive:
openspec schema init rapid --description "Rapid iteration" --artifacts "proposal,tasks" --default
```
Creates `openspec/schemas/my-workflow/` with `schema.yaml` and `templates/`.
### Fork an existing schema
```bash
openspec schema fork spec-driven my-workflow
```
Copies the `spec-driven` schema for customization.
### Validate a schema
```bash
openspec schema validate my-workflow
# Or validate all:
openspec schema validate
```
### Check schema resolution
```bash
openspec schema which spec-driven
# Shows: package, project, or user source
openspec schema which --all
```
## Schema Structure
```
openspec/schemas/<name>/
├── schema.yaml # Artifact definitions and dependencies
└── templates/
├── proposal.md # Template for each artifact
├── specs.md
├── design.md
└── tasks.md
```
### Example schema.yaml
```yaml
name: research-first
artifacts:
- id: research
generates: research.md
requires: []
- id: proposal
generates: proposal.md
requires: [research]
- id: tasks
generates: tasks.md
requires: [proposal]
```
## Schema Precedence
1. **Project**: `openspec/schemas/<name>/` (local, version controlled)
2. **User**: `~/.local/share/openspec/schemas/<name>/` (global)
3. **Package**: Built-in schemas (e.g. `spec-driven`)
## Outputs
- Custom schema in `openspec/schemas/<name>/` with `schema.yaml` and templates.
## Next Steps
- Use the schema with **openspec-new**: `/opsx:new my-change --schema my-workflow`.
- Or set as default in **openspec-config** (`openspec/config.yaml`).
## Troubleshooting
- **"Schema not found"**: Check `openspec schemas` for available schemas; check `openspec schema which <name>` for resolution.
- **Validation errors**: Run `openspec schema validate <name> --verbose` for details.
- **Unknown artifact IDs in rules**: Check `openspec schemas --json` for artifact IDs per schema.
## References
- [OpenSpec CLI: schema commands](https://github.com/Fission-AI/OpenSpec/blob/main/docs/cli.md)
- [OpenSpec Concepts: Schemas](https://github.com/Fission-AI/OpenSpec/blob/main/docs/concepts.md)
- [OpenSpec Customization](https://github.com/Fission-AI/OpenSpec/blob/main/docs/customization.md)Related Skills
openspec-verify
Validate that implementation matches change artifacts using `/opsx:verify`, checking completeness, correctness, and coherence. Use when the user says "verify implementation", "check my work", "/opsx:verify", or wants quality validation before archiving.
openspec-update
Run `openspec update` to regenerate AI tool instruction files after upgrading the OpenSpec CLI. Use when the user says "update OpenSpec", "openspec update", or "refresh OpenSpec skills/commands".
openspec-sync
Sync delta specs from a change into main specs using `/opsx:sync`, without archiving the change. Use when the user says "sync specs", "merge specs to main", "/opsx:sync", or needs to update main specs mid-change.
openspec-onboard
Guided onboarding through the complete OpenSpec workflow using `/opsx:onboard`, walking the user through a real change in their codebase. Use when the user says "onboard me", "tutorial", "/opsx:onboard", "how does OpenSpec work", or is new to OpenSpec.
openspec-new
Start a new OpenSpec change with `/opsx:new`, creating a change folder with metadata and scaffolding. Use when the user says "start a new change", "new feature", "/opsx:new", or "create an OpenSpec change".
openspec-install
Install the OpenSpec CLI globally via npm, pnpm, yarn, bun, or nix. Use when the user says "install OpenSpec", "set up OpenSpec", or "openspec command not found".
openspec-initial
Run `openspec init` to initialize OpenSpec in a project directory, creating the openspec/ folder structure and configuring AI tool integrations. Use when the user says "initialize OpenSpec", "openspec init", or "set up OpenSpec in this project".
openspec-ff
Fast-forward through artifact creation with `/opsx:ff`, generating all planning artifacts (proposal, specs, design, tasks) at once. Use when the user says "fast forward", "create all artifacts", "/opsx:ff", or has a clear picture of what to build.
openspec-explore
Think through ideas, investigate problems, and clarify requirements before committing to a change using `/opsx:explore`. Use when the user says "explore an idea", "think through this", "investigate options", or wants to brainstorm before creating a formal change.
openspec-continue
Create the next artifact in the dependency chain with `/opsx:continue`, building up a change incrementally. Use when the user says "continue the change", "create next artifact", "/opsx:continue", or wants step-by-step artifact creation.
openspec-config
Configure OpenSpec project settings and global CLI configuration using `openspec/config.yaml` and `openspec config` commands. Use when the user says "configure OpenSpec", "project config", "add project context", or wants to set per-artifact rules.
openspec-bulk-archive
Archive multiple completed changes at once with `/opsx:bulk-archive`, handling spec conflicts between changes. Use when the user says "archive all changes", "bulk archive", "/opsx:bulk-archive", or has multiple completed changes.