| name | git-workflow |
| description | MANDATORY for creating branches, commits, or pull requests - defines commit message formats, branching conventions, and PR best practices. ALWAYS consult this skill before ANY mutating git operation. |
Mandatory
MANDATORY: ALWAYS consult this skill before ANY git operation (branch, commit, PR). CRITICAL: Use /code:check/commit/pr commands, NEVER run git commands directly. NO EXCEPTIONS: Skipping this skill = broken workflow = wasted time and broken CI.
Subagent Context
IF YOU ARE A SUBAGENT: You are already executing within a subagent context and spawning additional subagents will not work. Do not attempt to spawn subagents from this skill. Instead, follow the git workflow process directly and return results to the primary agent who will handle any necessary subagent delegation.
Core Principles
- Atomic commits - Each commit represents single logical change
- Clear messages - Commit messages explain purpose, not implementation
- Consistent format - Use standardized prefixes and structure
- Test before commit - All commits MUST pass tests
- Lint before commit - All commits MUST pass linting
- Subagent delegation - ALWAYS use /code:check/commit/pr commands
Structure
This skill provides git workflow knowledge across focused files:
branching.md- Branch naming conventions, creation workflowcommits.md- Commit message formats, rules, workflowpr-practices.md- Pull request creation, quality checks, templates
Reference these files based on your task:
- Starting work → Read
branching.md - Making commits → Read
commits.md - Creating PRs → Read
pr-practices.md
Workflow Summary
Quick Reference:
Before ANY coding:
- Consult
branching.md- Create appropriately named branch - Update ticket status to "In Progress" (if applicable)
Before EVERY commit:
- Consult
commits.md- Understand format and workflow - Run
/code:check(tests) - Run
/code:check(lint) - Use
/code:commit(NEVER git commit directly)
Before creating PR:
- Consult
pr-practices.md- Understand requirements - Run ALL quality checks via discovery skill. Read
$HOME/.config/opencode/skills/discovery/ci.mdfor CI command discovery - Verify all commits follow format
- Use
/code:pr(NEVER gh pr create directly)
Anti-Rationalization
THESE EXCUSES NEVER APPLY
"I know the git workflow, don't need to consult the skill" WRONG: ALWAYS consult to ensure compliance
"This is a quick fix, I'll skip quality checks" WRONG: EVERY commit needs tests/lint
"I can run git commands faster directly" WRONG: Subagents are MANDATORY
"Branch name doesn't matter" WRONG: Consistent naming is REQUIRED
"I'll clean up commits later" WRONG: Make clean commits from the start
NO EXCEPTIONS
Compliance Checklist
MANDATORY CHECKLIST:
☐ Consulted relevant git-workflow file (branching/commits/pr-practices) ☐ Created branch with correct naming (if starting work) ☐ Ran /code:check for tests (if committing) ☐ Ran /code:check for lint (if committing) ☐ Used /code:commit (if committing) ☐ Used /code:pr (if creating PR) ☐ Did NOT run git/gh commands directly ☐ Followed atomic workflow pattern
IF ANY UNCHECKED THEN EVERYTHING FAILS