Codely Openspec Spec Create From Code logo

Codely Openspec Spec Create From Code

Organization
CodelyTV
codely-openspec-spec-create-from-code

Create the OpenSpec specs of behaviour that already exists in the code, so the next change can modify or remove it instead of only adding to it.

Overview

PublisherCodelyTV
Repositoryagent-harness
Skill namecodely-openspec-spec-create-from-code
Stars
287
Forks
13
Bundled files
2
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 2 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by CodelyTV on GitHub. Read the source before you install it.

Installation

Install the Codely Openspec Spec Create From Code AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/CodelyTV/agent-harness/tree/main/.agents/skills/codely-openspec-spec-create-from-code
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/CodelyTV/agent-harness.git /tmp/agent-harness
mkdir -p .claude/skills
cp -r /tmp/agent-harness/.agents/skills/codely-openspec-spec-create-from-code .claude/skills/codely-openspec-spec-create-from-code
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Codely Openspec Spec Create From Code in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Codely Openspec Spec Create From Code on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Codely Openspec Spec Create From Code is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

🧬 How to create OpenSpec specs from existing code

An OpenSpec change can only MODIFY or REMOVE a requirement that already lives in openspec/specs/. Behaviour built before the team adopted OpenSpec has no spec, so every change over it lands as ADDED and the spec forgets what was there before. This skill writes that missing baseline: main specs for behaviour that already ships.

The baseline is the spec OpenSpec would have archived if the feature had been built with it: intent that was implemented and verified. Every sentence holds against the code, and every requirement is something someone meant. A baseline that flatters the code is worse than none, because the next proposal builds on it.

📥 Input

The argument is free text. Read it as one of these:

InputExampleScope
Nothing, or a question about what lacks a specwhich features have no spec?The inventory in resources/evidence-guidelines.md. Build it and stop until the user picks a row.
A capabilitycheckoutThat capability.
A change the user is about to makeadd discount coupons to checkoutThe current behaviour the change will touch. The new behaviour belongs to the change, not to the baseline.
A path or a screensrc/app/admin/ordersThe business concept that path serves, traced back from it.

🪜 Steps

1. Check the preconditions

  • Run openspec --version. If the CLI is missing, stop and ask the user to install it.
  • Locate the OpenSpec root: the openspec/ folder holding config.yaml. When that config points to a store, the specs live in the store.
  • Read the context: of config.yaml. It sets the language of the specs; without it, write them in English.

Done when the CLI answers and you know the folder the specs go into.

2. Bound the capability

  • A capability is one folder under openspec/specs/, named in kebab-case after the business concept (checkout, order-management), never after a class, a table or a folder.
  • Run openspec list --specs. When an existing spec already covers part of the behaviour, extend that spec.
  • When the areas involved share no business concept, they are several capabilities: propose the split to the user.
  • For a change the user is about to make, list the existing behaviour it will touch and confirm that scope with the user.
  • Run openspec list and look for openspec/changes/<change>/specs/<capability>/ in each active change. When an active change has a delta on the capability, warn the user that extending the main spec can break that change's archive, and ask whether to go on.

Done when the user has confirmed every capability, and whether each one is new or extended.

3. Collect the evidence

Read resources/evidence-guidelines.md and dispatch the subagents it describes. Delegate the exploration: your job is to cross the reports, not to read the codebase.

Done when every area of every capability has a report, and every candidate behaviour in it carries its evidence.

4. Classify

Sort every candidate behaviour into one of the four cases of resources/evidence-guidelines.md. Then ask the user about all the ambiguous candidates in a single round, as that file describes. Use the tool to question the user if you have one.

Done when every candidate has a case, and every ambiguous one has the user's verdict.

5. Write the specs

Read resources/spec-format.md and write openspec/specs/<capability>/spec.md with the intended and verified behaviour only.

When you extend an existing spec, add requirements and scenarios and keep every existing one exactly as it is. An existing requirement that the code contradicts is drift: it goes to the report, and changing it is the job of an OpenSpec change.

Done when every intended and verified candidate is a requirement or a scenario in the spec.

6. Validate

Run openspec validate <capability> --type spec --strict for every spec you wrote, fix every error and warning, and rerun.

Done when every spec passes strict validation.

7. Report and close

Answer in the language the user writes in. Report, in this order:

  1. The specs written or extended, each with its capability id.
  2. The scope decisions: splits, extensions, what you left out of the scope and why.
  3. The candidates you left out of the spec, each with its case and its evidence.
  4. The drift between existing requirements and the code.

Do not paraphrase the specs: the files are the deliverable. Then close with the steps that this run's facts call for, in this order, translated to the user's language:

  • Always, the review:

    Review <spec paths>: they come from the code, and from now on agents will treat them as the truth. Once you agree with them, commit them with `/codely-git-conventional-commit`.
  • When the input was a change the user is about to make, the way back to it:

    With the baseline ready, go on with your change: `/openspec-explore <the change, as the user described it>`
  • When you left a bug out of the spec, one ready-to-paste command per bug, with the evidence inline:

    ⚠️ <n> inconsistencies left out of the spec. To fix one:
    - `/openspec-explore <the behaviour the intent asks for> fails when <the case that breaks> (<file:line>; <the test that covers it, or "no test covers it">)`

🧱 Boundaries

  • Write only under openspec/specs/. Changes, config.yaml and the code stay as they are.
  • Leave the specs uncommitted: committing comes after the user's review.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Codely Openspec Spec Create From Code AI skill do?

Create the OpenSpec specs of behaviour that already exists in the code, so the next change can modify or remove it instead of only adding to it.

Why use Codely Openspec Spec Create From Code on TypingMind?

Because you install it once and use it with any model. Codely Openspec Spec Create From Code is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Codely Openspec Spec Create From Code in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/CodelyTV/agent-harness/tree/main/.agents/skills/codely-openspec-spec-create-from-code. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Codely Openspec Spec Create From Code?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Codely Openspec Spec Create From Code?

As many as you like. As long as a model supports skills, you can use Codely Openspec Spec Create From Code with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Codely Openspec Spec Create From Code AI skill free?

It is published on GitHub by CodelyTV. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇