diff --git a/.agents/skills/branch-validate b/.agents/skills/branch-validate new file mode 120000 index 0000000..0027f89 --- /dev/null +++ b/.agents/skills/branch-validate @@ -0,0 +1 @@ +../../skills/branch-validate \ No newline at end of file diff --git a/.claude/skills/branch-validate b/.claude/skills/branch-validate new file mode 120000 index 0000000..0027f89 --- /dev/null +++ b/.claude/skills/branch-validate @@ -0,0 +1 @@ +../../skills/branch-validate \ No newline at end of file diff --git a/README.md b/README.md index 0d04f76..455c047 100644 --- a/README.md +++ b/README.md @@ -37,3 +37,13 @@ You can then ask an AI agent to create a PR, or call the skill directly in the p ``` The skill drafts a PR summary from the branch's diff (title, overview, test instructions, risks) and offers to create a new PR or update an existing one. + +### Validate branch names + +A skill is available to ensure git branch names conform to the Alloy organization standard. + +```sh +gh skill install UseAlloy/.github branch-validate +``` + +It ships with a `validate-branch.sh` script to validate branch names. diff --git a/skills/branch-validate/SKILL.md b/skills/branch-validate/SKILL.md new file mode 100644 index 0000000..9691369 --- /dev/null +++ b/skills/branch-validate/SKILL.md @@ -0,0 +1,63 @@ +--- +name: branch-validate +description: Ensure a git branch name is validated against standard naming conventions. +--- + +## Goal + +Ensure git branches are created with our standard organize-wide convention. + +In the case where a branch or PR is already created and is incorrect, recreate it until it's valid. + +## Validating the branch + +The current branch name can be validated with the script inside of this skill: + +```bash +./validate-branch.sh +``` + +If the branch is not yet created, pass it to the script: + +```bash +./validate-branch.sh 'feature/TICKET-123/example-branch-name' +``` + +If a PR was created for the existing, incorrectly-named branch, close that PR. Create a new PR for the new correctly-named branch. + +Use this fallback format when the ticket ID is not known at all: `task/