Claude Skills
CollectionsCompareWorkflowsNominate
Sign inSign up
© 2026 Curated Agent Skills·Learn more about Agent Skills
Back to repository

openspec-init

verified

Initialize OpenSpec in a project. Use when: user says 'init openspec', 'setup openspec', or asks to add OpenSpec to a project.

View on GitHub

Marketplace

digital-stoic-marketplace

digital-stoic-org/agent-skills

Plugin

dstoic

Repository

digital-stoic-org/agent-skills

dstoic/skills/openspec-init/SKILL.md

Last Verified

February 3, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/digital-stoic-org/agent-skills/blob/main/dstoic/skills/openspec-init/SKILL.md -a claude-code --skill openspec-init

Installation paths:

Claude
.claude/skills/openspec-init/
Powered by add-skill CLI

Instructions

# OpenSpec Init

Initialize OpenSpec in a project. Detects framework and creates structure.

## Commands

### detect

Analyze project to identify framework and structure.

**Steps**:
1. Check for framework markers:
   - `package.json` → Node.js (check for `next`, `react`, `vue`, `svelte`)
   - `pyproject.toml` or `requirements.txt` → Python
   - `Cargo.toml` → Rust
   - `go.mod` → Go
2. Output detected framework, language, and key files

**Output format**:
```yaml
framework: [detected]
language: [detected]
package_manager: [detected]
entry_points: [list]
```

### init

Create OpenSpec directory structure.

**Input**: `$ARGUMENTS` = project description (optional)

**Steps**:
1. Run `detect` if not already done
2. Create structure:
   ```
   openspec/
   ├── project.md    # From template + detected context
   └── AGENTS.md     # Copy from openspec CLI or template
   ```
3. Generate `project.md` with:
   - Tech Stack (from detection)
   - Naming Conventions (kebab-case default)
   - Code Style (framework-appropriate)
   - Git Workflow (conventional commits)
   - Exploration Strategy (tools + must-read files)
   - Execution Philosophy (mode + principles)

**Exploration Strategy template**:
```yaml
context_sources:
  primary:
    - openspec/project.md
    - openspec/changes/{id}/proposal.md
    - openspec/changes/{id}/specs/*.md
  must_read:
    - CLAUDE.md
tools:
  codebase: [Glob, Grep, Read, Task:Explore]
  # mcp_serena: true      # Uncomment for large C#/.NET
  # mcp_sourcegraph: true # Uncomment for monorepos
```

**Execution Philosophy template**:
```yaml
mode: garage  # garage | scale | maintenance

modes:
  garage:
    description: Fast iteration, validate ideas quickly
    principles:
      - Ship fast, iterate faster (speed > polish)
      - Working > perfect (80% solution now beats 100% later)
      - Validate with real usage (dogfood immediately)
      - Defer optimization until patterns stabilize
      - Fail fast, learn faster
    accept: [tech_debt, rough_

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
3164 chars