OpenSpec Workflow Installer
Purpose
Install or update the OpenSpec workflow assets that let an agent use a spec-driven process inside a repository.
This skill prepares the project for other OpenSpec skills. It does not plan a specific feature, implement code, sync specs, or archive changes.
When To Invoke
Invoke when the user asks to:
- initialize OpenSpec in a project
- install a spec-driven workflow
- create the
openspec/directory structure - install or refresh agent skills or commands
- adapt an existing project for OpenSpec-style work
- update workflow instructions after changing tools or profiles
Do not invoke for normal feature implementation unless the workflow assets are missing.
Inputs
Useful inputs include:
- target project path
- target agent host, such as Trae, Claude, or custom
- whether to include a sample
openspec/template - whether to update existing files or only install missing assets
Repository Files
This skill may create or update:
openspec/openspec/config.yamlopenspec/specs/openspec/changes/openspec/changes/archive/- agent skill directories, such as
.trae/skills/or.claude/skills/ - agent command directories, such as
.trae/commands/or.claude/commands/
Procedure
- Resolve the target project root.
- Check whether
openspec/already exists. - Detect existing agent-specific directories when possible.
- Create the minimal
openspec/directory structure if missing. - Create
openspec/config.yamlonly when missing or explicitly requested. - Install or update requested skills and command prompts.
- Preserve user-authored files and avoid destructive replacement.
- Report what was installed, skipped, or updated.
Decision Rules
- If
openspec/exists, treat the operation as an update or extension. - If a target file exists and is user-authored, do not overwrite it without user approval.
- If the target agent is unclear, ask which host should be configured.
- If the user wants a template and
openspec/already exists, ask before adding example content.
Guardrails
- Never delete existing workflow assets unless the user explicitly requests cleanup.
- Never overwrite
openspec/config.yamlsilently. - Never install sample changes into an existing real project without confirmation.
- Keep installation separate from feature planning or implementation.
Output Format
OpenSpec workflow installation
Target: <project-root>
Mode: <install|update>
Created:
- <path>
Updated:
- <path>
Skipped:
- <path> (<reason>)
Next action: <recommended next step>
Examples
User: "Install OpenSpec workflow in this project for Trae."
Action: create openspec/, install Trae skill and command prompts, then report installed paths.