speckit-branch-convention-validate
Skill107 starsChanged 9 months agoMITView on GitHub
Check all feature branches and spec folders against the configured naming
In this repository48 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
- commitSkill
- create-pull-requestSkill
- create-release-branchSkill
- create-release-notesSkill
- handle-pr-reviewSkill
- qlty-checkSkill
- record-code-review-feedbackSkill
- record-spec-feedbackSkill
- recreate-test-dbSkill
- redmine-playwright-loginSkill
- regression-checkSkill
- rubocopSkill
- speckit-agent-context-updateSkill
- speckit-analyzeSkill
- speckit-branch-convention-configureSkill
- speckit-branch-convention-renameSkill
- speckit-checklistSkill
- speckit-clarifySkill
- speckit-constitutionSkill
- speckit-convergeSkill
- speckit-git-commitSkill
- speckit-git-featureSkill
- speckit-git-initializeSkill
- speckit-git-remoteSkill
- speckit-git-validateSkill
- speckit-implementSkill
- speckit-planSkill
- speckit-review-codeSkill
- speckit-review-commentsSkill
- speckit-review-errorsSkill
- speckit-review-runSkill
- speckit-review-simplifySkill
- speckit-review-testsSkill
- speckit-review-typesSkill
- speckit-specifySkill
- speckit-tasksSkill
- speckit-taskstoissuesSkill
- speckit-token-budget-compactSkill
- speckit-token-budget-conciseSkill
- speckit-token-budget-scopeSkill
- speckit-token-budget-usageSkill
- speckit-wiki-ingestSkill
- speckit-wiki-initSkill
- speckit-wiki-lintSkill
- speckit-wiki-querySkill
- speckit-wiki-statusSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 17
Check all existing feature branches and spec folders against the configured naming convention.
- Very specific: line 29
Verify a spec-kit project exists by checking for .specify/ directory
- Very specific: line 31
If no convention is configured, use the default pattern ({seq}-{kebab} for both branch and folder)
- Very specific: line 35
Load convention: Read .specify/branch-convention.yml and extract:
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 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
Branch Convention Validate Skill
Validate Branch Convention
Check all existing feature branches and spec folders against the configured naming convention. Reports compliance status and identifies violations.
User Input
$ARGUMENTSYou MUST consider the user input before proceeding (if not empty). The user may specify a specific branch to validate (e.g., "003-user-auth") or "all" to check everything.
Prerequisites
- Verify a spec-kit project exists by checking for
.specify/directory - Load convention config from
.specify/branch-convention.yml - If no convention is configured, use the default pattern (
{seq}-{kebab}for both branch and folder)
Outline
- Load convention: Read
.specify/branch-convention.ymland extract:branch_pattern— the expected branch naming patternfolder_pattern— the expected spec folder naming pattern- Token definitions (seq_padding, separator, lowercase, etc.)
- Collect branches and folders: Gather all feature-related items:
- Git branches: List all local branches matching spec-kit patterns (exclude
main,master,develop) - Spec folders: List all directories under
specs/ - Match pairs: Associate each branch with its corresponding spec folder
- Git branches: List all local branches matching spec-kit patterns (exclude
Validate each item: For every branch and folder, check:
Check Rule Example Violation Pattern match Branch matches branch_patternstructureuser-authmissing sequence numberType prefix If pattern includes {type}, prefix must be intype_prefixmapfeature/003-authinstead offeat/003-authSequence format {seq}must be zero-padded toseq_paddingdigits3-authinstead of003-authLength limit Branch name must not exceed max_lengthcharacters003-very-long-branch-name-that-exceeds-limit...Case rule If lowercase: true, no uppercase characters (except ticket IDs)003-User-AuthSeparator Words must use configured separator003_user_authwhen separator is-Branch-folder sync Branch name and folder name must be derivable from same source Branch feat/003-authbut folder004-authTicket format If pattern includes {ticket}, must matchticket_patternregexproj-142when pattern requires[A-Z]+-[0-9]+Output compliance report:
# Branch Convention Compliance Report **Convention**: {preset name or "custom"} **Branch pattern**: {branch_pattern} **Folder pattern**: {folder_pattern} ## Results | Branch | Folder | Status | Issues | |--------|--------|--------|--------| | feat/003-user-auth | 003-user-auth | ✅ Compliant | — | | 004-chat-system | 004-chat-system | ⚠️ Non-compliant | Missing type prefix | | feat/5-api | 5-api | ⚠️ Non-compliant | Sequence not zero-padded | ## Summary - **Total**: {N} branches - **Compliant**: {X} ✅ - **Non-compliant**: {Y} ⚠️ - **Orphaned folders** (no branch): {Z} ## Recommended Actions 1. Run `/speckit.branch-convention.rename` to fix non-compliant items- Report: Output the compliance report. Do not modify any files — this command is read-only.
Rules
- Read-only — this command never modifies any files or branches
- Always show all items — include compliant and non-compliant for full visibility
- Be specific about violations — explain exactly which rule was violated and what the correct name should be
- Handle missing config gracefully — if no convention is configured, validate against the default pattern and note that no custom convention has been set
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.

