Agent skill

Openspec Git Discipline

by intent-driven-dev in intent-driven-dev/intent-driven-template

A skill your agent uses when running OpenSpec propose, continue, apply, verify, archive, or worktree workflows where proposal artifacts, branches, merges, or archive timing affect git history.

MITAuto-check passedDevelopment

Install Openspec Git Discipline

skills CLI
$ npx skills add intent-driven-dev/intent-driven-template --skill openspec-git-discipline -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install intent-driven-dev/intent-driven-template openspec-git-discipline --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/intent-driven-dev/intent-driven-template.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/openspec-git-discipline .claude/skills/openspec-git-discipline && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
openspec-git-discipline
GitHub stars
161
Token cost
~746 tokens
SKILL.md length
412 words
Files
1
Skills in repo
10
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when running OpenSpec propose, continue, apply, verify, archive, or worktree workflows where proposal artifacts, branches, merges, or archive timing affect git history.

  • Works in 3 steps: Run git status --short. → Verify openspec/changes// has no… → Verify the proposal change exists on…
  • Running OpenSpec propose
  • SKILL.md covers Core Rule, Gates, Required Checks and Red Flags
  • Calls git

What it does

Openspec Git Discipline is an agent skill from intent-driven-dev/intent-driven-template. Use when running OpenSpec propose, continue, apply, verify, archive, or worktree workflows where proposal artifacts, branches, merges, or archive timing affect git history.

Its SKILL.md is about 750 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts. Compatibility notes: Requires git and OpenSpec workflow artifacts.

It sits in Development, covering Git workflow and Git worktrees. It works with Git. The repository describes itself as: OpenSpec and OpenCode template for intent-driven development with specs, ADRs, C4 diagrams, Gherkin, TDD, Multi-Model Adversarial Spec Authoring, Glossary for Domain Terms, and… The licence is MIT.

When your agent uses it

  • Running OpenSpec propose
  • Worktree workflows where proposal artifacts
  • Archive timing affect git history

Example prompts

  • “/openspec-git-discipline”

Requirements

  • Compatibility (from SKILL.md): Requires git and OpenSpec workflow artifacts.

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Run git status --short.
  2. Verify openspec/changes// has no uncommitted proposal files.
  3. Verify the proposal change exists on main before applying from any branch/worktree.

What it can do on your machine

Read from SKILL.md and the folder at commit 73f54d5. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Requires git and OpenSpec workflow artifacts.

    From compatibility in the SKILL.md frontmatter.

Context cost

Openspec Git Discipline loads about 746 tokens when it runs. Until then it costs about 49 tokens; SKILL.md has 412 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~49
When it runs · the whole SKILL.md, loaded when a task matches
~746

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from intent-driven-dev/intent-driven-template at commit 73f54d5, republished under its MIT licence (© intent-driven-dev). 412 words, ~746 tokens.

Download SKILL.mdSave it as .claude/skills/openspec-git-discipline/SKILL.md (or your agent's skills folder).
name
openspec-git-discipline
description
Use when running OpenSpec propose, continue, apply, verify, archive, or worktree workflows where proposal artifacts, branches, merges, or archive timing affect git history.
compatibility
Requires git and OpenSpec workflow artifacts.
license
MIT

OpenSpec Git Discipline

Core Rule

Every OpenSpec state change must cross main before the next lifecycle phase depends on it.

  • Propose/continue artifacts may be drafted on a branch, but must be committed and merged to main before apply starts.
  • Apply may run on main, a branch, or a worktree only if that exact proposal change is already available on main.
  • Archive may run only from main after implementation is merged back.

Never create commits, branches, or merges unless the user explicitly asks.

Gates

MomentGate
Before proposePrefer main; if not, warn and ask whether to continue intentionally.
During continueBefore creating the next artifact, ask the user to commit completed artifact changes or explicitly continue without that checkpoint.
After proposeAsk the user to commit proposal artifacts; offer to create a PR branch for review.
Before applyConfirm the proposal change is committed on main; then apply may run from main, a branch, or a worktree.
Before archiveStop unless implementation is merged back to main and archive is running from main.
After archiveAsk the user to commit archive/spec sync changes.

Required Checks

Before apply:

  1. Run git status --short.
  2. Verify openspec/changes/<change>/ has no uncommitted proposal files.
  3. Verify the proposal change exists on main before applying from any branch/worktree.

Use this language if the proposal has not reached main:

I should not apply this yet because the proposal change has not reached main. A proposal can be drafted on a branch, but apply must start only after that proposal state is available on main. Please merge or commit the proposal to main first, then I can apply from main, a branch, or a worktree.

Show full SKILL.md (134 more words)Show less

Before archive:

  1. Run git branch --show-current and git status --short.
  2. Stop if not on main.
  3. Stop if implementation work has not been merged back to main.

Use this language:

I should not archive this yet because archive must run from main after implementation is merged back. Verify makes a change eligible to merge; it does not replace the merge.

Red Flags

  • Applying a proposal that exists only on the current branch/worktree.
  • Treating worktree visibility as proof that the proposal reached main.
  • Creating the next continue artifact without asking about committing the previous one.
  • Archiving from a feature branch or before implementation is merged to main.
  • Auto-committing, branching, or merging without explicit user approval.

All of these mean: pause, explain the boundary, and ask the user to make the git state explicit.

© intent-driven-dev, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/openspec-git-discipline of intent-driven-dev/intent-driven-template.

Open the folder on GitHubat commit 73f54d5

Compare with similar skills

Openspec Git Discipline next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Openspec Git Discipline compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Openspec Git Discipline this skillintent-driven-dev/intent-driven-template161—~746Automated safety check: PassMIT
Finishing a Development Branchobra/superpowers297k5 repos~1.9kAutomated safety check: PassMIT
Git Worktree Cleanuplobehub/lobehub83k—~2.8kAutomated safety check: PassCustom licence
Ccmanager Configkbwo/ccmanager1.3k—~1.5kAutomated safety check: PassMIT
Git Worktree Managermicrosoft/WindowsAppSDK4.7k—~2kAutomated safety check: PassMIT
Git Worktree IsolationjnMetaCode/superpowers-zh8.3k1 repos~982Automated safety check: PassMIT

Similar skills

  • Walks the last step of a branch: confirm tests pass, detect the git environment, ask how to integrate, carry out your choice and clean up the worktree.

    297k GitHub starsUsed in 5 repos~1.9k tokens
    DevelopmentAuto-check passed
  • Git Worktree Cleanup

    lobehub/lobehub

    Audits stale Git worktrees and branches with a bundled script, classifies each one, and deletes only after you approve the exact candidates.

    83k GitHub stars~2.8k tokensUpdated today
    DevelopmentAuto-check passed
  • Ccmanager Config

    kbwo/ccmanager

    Set up, review, or repair a CCManager config — .ccmanager.json at a git repository root, or the global ~/.config/ccmanager/config.json.

    1.3k GitHub stars~1.5k tokensUpdated today
    DevelopmentAuto-check passed
  • Git Worktree Manager

    microsoft/WindowsAppSDK

    Official

    Creates and manages Git worktrees with PowerShell scripts so separate issues and Copilot sessions each get an isolated branch, build and test environment.

    4.7k GitHub stars~2k tokensUpdated today
    DevelopmentAuto-check passed
  • Git Worktree Isolation

    jnMetaCode/superpowers-zh

    Sets up an isolated workspace before feature work or plan execution, preferring native worktree tools and falling back to git worktree, with instructions in Chinese.

    8.3k GitHub starsUsed in 1 repo~982 tokens
    DevelopmentAuto-check passed
  • Git Commit

    tisfeng/Easydict

    起草、创建或汇报 Angular-style 本地 Git 提交。用于明确的提交交付;分支集成使用 worktree-rebase-merge,不 push。

    15k GitHub stars~535 tokensUpdated 2 days ago
    DevelopmentAuto-check passed

More from intent-driven-dev/intent-driven-template

All 10 skills in this repo
  • Acceptance Test Authoring

    intent-driven-dev/intent-driven-template

    A skill your agent uses when creating or modifying acceptance tests, configuring cucumber-js or behave runners, writing or refactoring step definitions, linting executable Gherkin specs, choosing an…

    161 GitHub stars~2k tokensUpdated 4 days ago
    Auto-check passed
  • Adversarial Authoring

    intent-driven-dev/intent-driven-template

    A skill your agent uses when rules or instructions mention "adversarial-authoring", "adversarial authoring", "must use adversarial-authoring skill", "model council", "cross-model review", or…

    161 GitHub stars~1k tokensUpdated 4 days ago
    Auto-check passed
  • Architectural Decision Records

    intent-driven-dev/intent-driven-template

    A skill your agent uses when documenting, drafting, reviewing, or updating architectural decisions, ADRs, decision logs, tradeoffs, rationale, consequences, alternatives, or architecture decision…

    161 GitHub stars~1k tokensUpdated 4 days ago
    Auto-check passed
  • Gherkin Authoring

    intent-driven-dev/intent-driven-template

    A skill your agent uses when drafting, reviewing, or improving Gherkin, Cucumber scenarios, BDD acceptance criteria, feature examples, Scenario Outlines, Backgrounds, Rules, Doc Strings, Data…

    161 GitHub stars~1.4k tokensUpdated 4 days ago
    Auto-check passed
  • Glossary

    intent-driven-dev/intent-driven-template

    A skill your agent uses when authoring or reviewing specs, requirements, design docs, ADRs, tasks, glossary entries, domain terms, technical terms, or wording consistency across artifacts

    161 GitHub stars~767 tokensUpdated 4 days ago
    Auto-check passed
  • Openspec Bulk Apply Change

    intent-driven-dev/intent-driven-template

    A skill your agent uses when multiple active OpenSpec changes should be applied concurrently in isolated worktrees with delegated verification and no merge.

    161 GitHub stars~1.4k tokensUpdated 4 days ago
    Auto-check passed

Works with

Categories

Questions about Openspec Git Discipline

What does Openspec Git Discipline do?

A skill your agent uses when running OpenSpec propose, continue, apply, verify, archive, or worktree workflows where proposal artifacts, branches, merges, or archive timing affect git history. Openspec Git Discipline is an agent skill from intent-driven-dev/intent-driven-template. Use when running OpenSpec propose, continue, apply, verify, archive, or worktree workflows where proposal artifacts, branches, merges, or archive timing affect git history.

When should I use Openspec Git Discipline?

Openspec Git Discipline fits situations like: running OpenSpec propose; worktree workflows where proposal artifacts; archive timing affect git history.

How do I install Openspec Git Discipline in Claude Code?

Run `npx skills add intent-driven-dev/intent-driven-template --skill openspec-git-discipline -a claude-code`. Or copy the skill folder (.agents/skills/openspec-git-discipline in intent-driven-dev/intent-driven-template) into .claude/skills/openspec-git-discipline in your project. Claude Code loads it when a task matches its description.

How do I install Openspec Git Discipline in Codex?

Run `npx skills add intent-driven-dev/intent-driven-template --skill openspec-git-discipline -a codex`. Or copy the skill folder (.agents/skills/openspec-git-discipline in intent-driven-dev/intent-driven-template) into .agents/skills/openspec-git-discipline in your project. Codex loads it when a task matches its description.

Can I use Openspec Git Discipline in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add intent-driven-dev/intent-driven-template --skill openspec-git-discipline -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/openspec-git-discipline, .gemini/skills/openspec-git-discipline, .github/skills/openspec-git-discipline and .opencode/skills/openspec-git-discipline in your project.

What does Openspec Git Discipline need to run?

Going by SKILL.md and its folder, Openspec Git Discipline needs the command-line tools its instructions call (git). Compatibility (from SKILL.md): Requires git and OpenSpec workflow artifacts..

Does Openspec Git Discipline access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Openspec Git Discipline safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Openspec Git Discipline use?

Openspec Git Discipline is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Openspec Git Discipline use?

About 746 tokens (SKILL.md is roughly 3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Openspec Git Discipline?

Skills that share tags, products or a category with Openspec Git Discipline: Finishing a Development Branch (obra/superpowers, 297k stars), Git Worktree Cleanup (lobehub/lobehub, 83k stars), Ccmanager Config (kbwo/ccmanager, 1.3k stars) and Git Worktree Manager (microsoft/WindowsAppSDK, 4.7k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Openspec Git Discipline?

intent-driven-dev (a GitHub organization) maintains it in intent-driven-dev/intent-driven-template, which has 161 GitHub stars. The repository holds 10 skills in this directory. The repository was last updated on October 4, 2026.

Source: intent-driven-dev/intent-driven-template on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.