openspec-config

$npx mdskill add partme-ai/full-stack-skills/openspec-config

Manages OpenSpec project and global CLI configuration to set context and rules for AI artifacts.

  • Helps users add project context and define per-artifact rules to improve AI-generated artifact quality.
  • Integrates with OpenSpec CLI commands and YAML configuration files for project-specific settings.
  • Recommends actions based on user prompts about configuration, project context, or artifact rules.
  • Presents results through CLI outputs and updates to configuration files like openspec/config.yaml.

SKILL.md

.github/skills/openspec-configView on GitHub ↗
---
name: openspec-config
description: 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 Config Skill

Manage OpenSpec configuration at two levels: **project config** (`openspec/config.yaml`) for project-specific context and rules, and **global CLI config** (`openspec config` subcommands) for user-level settings.

## When to Use

- The user wants to add project context to improve AI artifact quality.
- Setting per-artifact rules (e.g. "specs must use Given/When/Then").
- Changing the default schema for the project.
- Managing global CLI settings (telemetry, editor, etc.).

## Prerequisites

- **OpenSpec initialized** in the project (see **openspec-initial**).

## Project Configuration

### openspec/config.yaml

```yaml
# Default schema for new changes
schema: spec-driven

# Project context injected into all artifact instructions
context: |
  Tech stack: TypeScript, React, Node.js
  API conventions: RESTful, JSON responses
  Testing: Vitest for unit tests, Playwright for e2e
  Style: ESLint with Prettier, strict TypeScript

# Per-artifact rules
rules:
  proposal:
    - Include rollback plan
    - Identify affected teams
  specs:
    - Use Given/When/Then format for scenarios
  design:
    - Include sequence diagrams for complex flows
```

### Config Fields

| Field | Type | Description |
|-------|------|-------------|
| `schema` | string | Default schema for new changes (e.g. `spec-driven`) |
| `context` | string | Project context injected into all artifact instructions (max 50KB) |
| `rules` | object | Per-artifact rules, keyed by artifact ID |

### How It Works

- **Schema precedence** (highest to lowest): CLI flag -> change metadata -> project config -> default (`spec-driven`).
- **Context injection**: Prepended to every artifact's instructions in `<project-context>` tags.
- **Rules injection**: Only for matching artifacts, in `<project-rules>` tags, after context.

### Artifact IDs (spec-driven schema)

- `proposal` — Change proposal
- `specs` — Specifications
- `design` — Technical design
- `tasks` — Implementation tasks

## Global CLI Configuration

```bash
openspec config list          # Show all settings
openspec config get <key>     # Get a value
openspec config set <key> <value>  # Set a value
openspec config unset <key>   # Remove a key
openspec config reset --all --yes  # Reset to defaults
openspec config edit          # Open in $EDITOR
openspec config path          # Show config file location
```

### Common Settings

| Setting | Example |
|---------|---------|
| Disable telemetry | `openspec config set telemetry.enabled false` |
| Set user name | `openspec config set user.name "My Name" --string` |

## Outputs

- `openspec/config.yaml` with project context and rules.
- Improved AI artifact quality through context injection.

## Next Steps

- Start working with **openspec-new** or **openspec-explore**.
- Create a custom schema with **openspec-schema** and set it as default in config.

## Troubleshooting

- **"Unknown artifact ID in rules"**: Check artifact IDs match your schema; run `openspec schemas --json`.
- **Config not applied**: Ensure file is at `openspec/config.yaml` (not `.yml`); check YAML syntax.
- **Context too large**: Limit is 50KB; summarize or link to external docs.

## References

- [OpenSpec CLI: config](https://github.com/Fission-AI/OpenSpec/blob/main/docs/cli.md)
- [OpenSpec OPSX: Project Configuration](https://github.com/Fission-AI/OpenSpec/blob/main/docs/opsx.md)

More from partme-ai/full-stack-skills

SkillDescription
adobe-xd"Guides creation of UI/UX designs, interactive prototypes, reusable components, and design specs in Adobe XD. Use when the user asks about Adobe XD artboards, prototype links, repeat grids, component states, design tokens export, or developer handoff."
angular"Provides comprehensive guidance for Angular framework including components, modules, services, dependency injection, routing, forms, and TypeScript integration. Use when the user asks about Angular, needs to create Angular applications, implement Angular components, or work with Angular features."
ansible"Provides comprehensive guidance for Ansible automation including playbooks, roles, inventory, and module usage. Use when the user asks about Ansible, needs to automate IT tasks, create Ansible playbooks, or manage infrastructure with Ansible."
ant-design-mini"Builds mini-program UIs with Ant Design Mini components for Alipay and WeChat mini-programs. Covers Button, Form, List, Modal, Tabs, NavBar, and 60+ components with theme customization and CSS variable theming. Use when the user needs to create mini-program interfaces with Ant Design Mini, configure themes, or implement mini-program-specific UI patterns."
ant-design-mobile"Builds React mobile UIs with Ant Design Mobile (antd-mobile) components including Button, Form, List, Modal, Picker, Tabs, PullToRefresh, InfiniteScroll, and 50+ mobile-optimized components. Use when the user needs to create mobile-first React interfaces, implement mobile navigation, forms, or data display with Ant Design Mobile."
ant-design-react"Builds enterprise React UIs with Ant Design (antd) including 60+ components (Button, Form, Table, Select, Modal, Message), design tokens, TypeScript support, and ConfigProvider theming. Use when the user needs to create React applications with Ant Design, build forms with validation, display data tables, or customize the Ant Design theme."
ant-design-vueProvides comprehensive guidance for Ant Design Vue (AntDV) component library for Vue 3. Covers installation, usage, API reference, templates, and all component categories. Use when building enterprise-class UI with Vue 3 and Ant Design.
api-doc-generator"Generate API documentation by scanning Controller classes, extracting endpoint URLs, HTTP methods, parameters, and response structures, then producing standardized docs from templates. Use when the user explicitly mentions generating API documentation, creating API docs, scanning interfaces, or documenting REST APIs. Do not trigger for generic documentation requests without explicit API mention."
appium"Provides comprehensive guidance for Appium mobile testing including mobile app automation, element location, gestures, and cross-platform testing. Use when the user asks about Appium, needs to test mobile applications, automate mobile apps, or write Appium test scripts."
ascii-ansi-colorizer"Add an ANSI color layer to existing ASCII/plain-text output (gradient/rainbow/highlights) with alignment-safe rules and a required no-color fallback. Use when the user wants to colorize terminal output, add rainbow effects to CLI text, or style ASCII art with ANSI colors."