Skip to content

feat: add git-workflow skill with GitHub/GitLab support and template-aware operations #130

@Besthope-Official

Description

@Besthope-Official

Use Case

Currently there's no unified git workflow skill in this project. Developers rely on ad-hoc natural language prompts for git operations (commits, PRs, branching), which leads to inconsistent commit messages, PR descriptions, and branch naming across the team.

We need a git-workflow skill that:

  • Enforces project conventions (branch naming, commit format, PR/MR templates)
  • Auto-detects and uses existing templates from .github/ or .gitlab/ directories
  • Supports both GitHub (gh CLI) and GitLab (glab CLI) depending on project configuration

Proposed Solution

Build a .claude/skills/git-workflow/SKILL.md skill that extends daymade/claude-code-skills github-ops with:

1. Platform Configuration (Copier Option)

A .copier templating option at project init time to select the git platform:

  • github (default) — uses gh CLI
  • gitlab — uses glab CLI

This determines which CLI tool the skill invokes and which directory (.github/ vs .gitlab/) to read templates from.

2. Template-Aware Operations

On activation, the skill should:

  • Detect .github/ or .gitlab/ directory in the repo root
  • Read PR/MR templates (e.g., .github/pull_request_template.md, .gitlab/merge_request_templates/)
  • Read issue templates (e.g., .github/ISSUE_TEMPLATE/, .gitlab/issue_templates/)
  • Apply templates automatically when creating PRs/MRs and issues, filling in sections from context

3. Core Git Workflow Operations

Building on github-ops, the skill provides:

  • Branching: Create branches following project naming convention (feat/, fix/, refactor/, etc.)
  • Commits: Conventional commits format enforced
  • PR/MR Creation: Auto-populate from detected templates, link related issues
  • PR/MR Review: View checks, approve, request changes
  • Issue Management: Create using detected issue templates

4. Skill Structure

.claude/skills/git-workflow/
├── SKILL.md              # Main skill definition

Alternatives Considered

  • Install github-ops directly: GitHub-only, no template detection, no project convention enforcement
  • Use built-in Claude Code git: Works but no convention enforcement, inconsistent across sessions

Implementation Notes

  • The copier option should be in the project's copier.yml so new projects get the platform choice at init
  • Existing repo: this project already has .github/ with PR template and issue templates — skill should detect and use them
  • The skill should gracefully degrade if no templates are found (use sensible defaults)
  • Platform detection could also be inferred from git remote URL (github.com vs gitlab.com) as a fallback

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions