openspec-init-config
Skill0 starsChanged 2 months agoMITView on GitHub
Loads the project context into openspec/config.yaml by exhaustively reading the project documentation (README.md, CLAUDE.md, AGENTS.md). Use when you want to initialize or update the OpenSpec context for a project.
In this repository20 other files it gives its agents.
- AGENTS.mdAGENTS.md
- code-backend-nestjsSkill
- code-frontend-library-reactSkill
- doc-changelog-generationSkill
- doc-design-generationSkill
- doc-domain-generationSkill
- doc-guardrail-generationSkill
- doc-policy-generationSkill
- doc-readme-generationSkill
- git-tbd-for-sddSkill
- git-worktrees-useSkill
- openspec-generate-baselineSkill
- security-auditSkill
- skill-masterSkill
- skill-test-evalsSkill
- test-cypress-cucumberSkill
- test-nestjs-jest-testing-moduleSkill
- test-nestjs-supertestSkill
- test-playwright-cucumberSkill
- test-react-testing-librarySkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 2 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 21
Does not modify the schema: or rules: fields (or their comments) in openspec/config.yaml.
- Distinctive: line 34
Read the following files in order, if they exist:
- Distinctive: line 40
IMPORTANT: Do not skip any of these files if they exist.
- Very specific: line 44
Read the whole file to understand its current structure and the comment template that indicates how to fill in the context: field.
- Very specific: line 48
Use the Edit tool to update only the context: field in openspec/config.yaml.
- Very specific: line 50
If the context: field already exists, replace it with the new content
- Very specific: line 51
If the context: field does not exist, add it after the schema: spec-driven line
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
OpenSpec Context Initialization
Overview
Loads the project context into openspec/config.yaml by exhaustively reading the project's existing documentation, so that OpenSpec has an accurate context (stack, architecture, conventions, and domain).
Capabilities:
- Reads the project documentation (
README.md,CLAUDE.md,AGENTS.md, and other root files). - Infers stack and dependencies from manifests (
package.json,pyproject.toml, etc.). - Writes or updates only the
context:field inopenspec/config.yaml.
Limitations:
- Does not modify the
schema:orrules:fields (or their comments) inopenspec/config.yaml. - The resulting context is only as good as the documentation that exists in the project.
Prerequisites
- The
openspec/config.yamlfile must exist in the project. - Ideally one or more documentation files exist (
README.md,CLAUDE.md,AGENTS.md). - The Edit tool is available to update the configuration file.
Execution
Exhaustively read the project documentation
Read the following files in order, if they exist:
README.md— primary source: project purpose, technology stack, architecture, conventionsCLAUDE.md— project instructions, directory structure, agent and skill patternsAGENTS.md— agent definitions, roles, and capabilities- Other relevant files you find in the project root (for example
package.json,pyproject.toml, etc.) to infer stack and dependencies
IMPORTANT: Do not skip any of these files if they exist. The context you write will be only as good as the documentation you read.
Read the
openspec/config.yamlfileRead the whole file to understand its current structure and the comment template that indicates how to fill in the
context:field.Write the
context:field inopenspec/config.yamlUse the Edit tool to update only the
context:field inopenspec/config.yaml.- If the
context:field already exists, replace it with the new content - If the
context:field does not exist, add it after theschema: spec-drivenline - Keep intact the
schema:field and therules:field (and their comments) — only modifycontext:
The content of the
context:field must include (in YAML multiline format with|):- Technology stack: languages, frameworks, main tools
- Architecture: project structure, patterns used, key modules
- Conventions: naming, commits, file organization, code style
- Domain: what the project does, for whom, what its purpose is
Example format:
context: | Stack: Python, Markdown, YAML Architecture: multi-agent system with specialized skills and agents Conventions: kebab-case for file names, conventional commits Domain: agile specification framework for software projects- If the
Output
- The
context:field ofopenspec/config.yamlcreated or updated, in YAML multiline format (|), with stack, architecture, conventions, and domain. - The
schema:andrules:fields remain intact. - The final content of the
context:field is shown to the user, confirming the file was updated correctly.
Examples
Manual invocation:
/openspec-init-config
→ Reads README.md, CLAUDE.md, and AGENTS.md, infers the stack from package.json, and writes the context: field in openspec/config.yaml, showing the final result.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

