TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/lnardev/opencode-config-agent/llms.txt
Use this file to discover all available pages before exploring further.
branch-pr skill codifies a strict issue-first pull request workflow. It activates whenever the agent is creating a pull request, preparing a branch for submission, or helping a contributor open a PR. Every rule it enforces exists to prevent incomplete or unreviewed work from being merged — GitHub Actions will block any PR that skips the requirements.
Trigger
This skill loads automatically when:- Creating or opening a pull request
- Preparing a branch for review
- Helping a contributor submit changes
Critical Rules
- Every PR MUST link an approved issue — no exceptions. The linked issue must carry the
status:approvedlabel before a PR can be opened. - Every PR MUST have exactly one
type:*label — adding zero or multiple type labels fails the PR validation check. - Automated checks must pass before a merge is possible — all four CI jobs must be green.
- Blank PRs without issue linkage will be blocked by GitHub Actions — the
Check Issue Referencejob validatesCloses/Fixes/Resolves #Nin the PR body.
Workflow
Verify the issue is approved
Confirm the linked issue has the
status:approved label. If it only has status:needs-review, stop — a maintainer must approve it first.Create the branch
Branch off
main using the type/description format. See Branch Naming for the full regex and type table.Implement changes with conventional commits
Every commit must match the conventional commit format. See Commit Format for the regex, type list, and label mappings.
Run shellcheck on modified scripts
Before pushing, run
shellcheck scripts/*.sh on any shell scripts touched by the change. CI will fail if shellcheck finds errors.Open the PR using the template
Use
.github/PULL_REQUEST_TEMPLATE.md. The body must include: linked issue (Closes #N), PR type checkbox, summary bullets, a changes table, a test plan, and the contributor checklist.Add exactly one type:* label
Add the label that matches your primary commit type. See the PR Type table for checkbox-to-label mappings.
Branch Naming
Branch names must match this regex exactly — any deviation fails the branch validation check:type/description — all lowercase, no spaces, only a-z0-9._- in the description.
| Type | Branch Pattern | Example |
|---|---|---|
| Feature | feat/<description> | feat/user-login |
| Bug fix | fix/<description> | fix/zsh-glob-error |
| Chore | chore/<description> | chore/update-ci-actions |
| Docs | docs/<description> | docs/installation-guide |
| Style | style/<description> | style/format-scripts |
| Refactor | refactor/<description> | refactor/extract-shared-logic |
| Performance | perf/<description> | perf/reduce-startup-time |
| Test | test/<description> | test/add-setup-coverage |
| Build | build/<description> | build/update-shellcheck |
| CI | ci/<description> | ci/add-branch-validation |
| Revert | revert/<description> | revert/broken-setup-change |
Commit Format
Commit messages must match this regex:type(scope): description or type: description
type— required, one of the conventional commit types(scope)— optional, lowercase witha-z0-9._-!— optional, marks a breaking changedescription— required, starts after:
type:* label the PR should carry:
| Commit Type | PR Label |
|---|---|
feat | type:feature |
fix | type:bug |
docs | type:docs |
refactor | type:refactor |
chore, style, test, build, ci | type:chore |
perf | type:feature |
revert | type:bug |
feat! / fix! | type:breaking-change |
PR Body Format
The PR template requires six sections — all must be present:View required PR template sections
View required PR template sections
1. Linked Issue (REQUIRED)Valid keywords:
Check exactly one checkbox and add the matching label:
3. Summary — 1–3 bullet points describing what the PR does.4. Changes Table5. Test Plan6. Contributor Checklist — all boxes must be checked before requesting review.
Closes #N, Fixes #N, Resolves #N (case-insensitive). The linked issue must have status:approved.2. PR Type (REQUIRED)Check exactly one checkbox and add the matching label:
| Checkbox | Label |
|---|---|
| Bug fix | type:bug |
| New feature | type:feature |
| Documentation only | type:docs |
| Code refactoring | type:refactor |
| Maintenance/tooling | type:chore |
| Breaking change | type:breaking-change |
Automated Checks
| Check | Job Name | What It Verifies |
|---|---|---|
| PR Validation | Check Issue Reference | Body contains Closes/Fixes/Resolves #N |
| PR Validation | Check Issue Has status:approved | Linked issue has status:approved |
| PR Validation | Check PR Has type:* Label | PR has exactly one type:* label |
| CI | Shellcheck | Shell scripts pass shellcheck |