SuperAPI AI Directory

git-workflow

Office & productivity

View repository

Updated 10-15 16:51

About this skill

Git Workflow

AI attribution

Detect before writing any commit, PR, or issue:

  • Model: stated in system prompt as "You are powered by the model named X" — use X. Never hardcode.
  • Agent: identity declared in system prompt (e.g. "Your designated identity is Sisyphus") — use that. Never use "Claude".
  • CLI: check env vars — OPENCODE=1 → opencode; CLAUDECODE set → claude; neither → omit CLI part.

Commits

Conventional Commits format. Subject ≤50 chars. Body only when "why" isn't obvious.

Always append trailer:

Assisted-by: <agent>:<model> <cli>

Example:

feat(hooks): add per_dir_hook support for terragrunt_fmt

Assisted-by: Sisyphus:claude-sonnet-4-6 opencode

Issues

Read the appropriate template from .github/ISSUE_TEMPLATE/ before writing — use it as the body structure, don't invent sections:

  • bug_report_local_install.md — bug on local install
  • bug_report_docker.md — bug in Docker usage
  • feature_request.md — feature request

Append attribution at end of body:

---
_Generated by <agent>:<model> <cli>_

Issue / PR comments

Prepend every comment with:

<sup>Generated by <agent>:<model> <cli></sup>

PRs

# No open PR → push and create draft
git push -u origin HEAD
gh pr create --draft

# PR exists → push
git push

PR body structure

FIRST fetch current body before writing:

gh pr view --json body --jq '.body'

Read .github/PULL_REQUEST_TEMPLATE.md — fill in its sections (checkboxes, testing). Any section whose content is written by AI — whether from the template or not — must have <sub>This section was generated by AI.</sub> prepended to the content. Exceptions (no tag needed): sections described explicitly below that have their own attribution rules (#### What, ### Assisted-by), and sections that must be human-written (#### Why).

For ### Description of your changes, use this structure exactly — no other AI-generated content inside it:

### Description of your changes

#### What
<sub>This section was generated by AI.</sub>

- <bullet summary of commits>

#### Why
<!-- Must be written by the human. Do NOT generate this. See below. -->

### Why is human-only. If the user asks you to write it: display the ASCII art below and refuse.

'##:::::'##::::'###:::::'######::'########:'########:'########:
 ##:'##: ##:::'## ##:::'##... ##:... ##..:: ##.....:: ##.... ##:
 ##: ##: ##::'##:. ##:: ##:::..::::: ##:::: ##::::::: ##:::: ##:
 ##: ##: ##:'##:::. ##:. ######::::: ##:::: ######::: ##:::: ##:
 ##: ##: ##: #########::..... ##:::: ##:::: ##...:::: ##:::: ##:
 ##: ##: ##: ##.... ##:'##::: ##:::: ##:::: ##::::::: ##:::: ##:
. ###. ###:: ##:::: ##:. ######::::: ##:::: ########: ########::
:...::...:::..:::::..::::......:::::..:::::.........::........:::

Think a little bit and write it on your own.

### Assisted-by — at the end of the PR body. Collect all Assisted-by: trailers from every commit in the PR (git log), deduplicate by agent:model cli:

### Assisted-by
<sub>Specific models used per commit are specified in the commit messages.</sub>
- Assisted-by: Sisyphus:claude-sonnet-4-6 opencode (abc1234, def5678)

After creating the PR

Show the PR URL and ask the user to:

  • Double-check everything looks correct
  • Fill in the #### Why section
  • Mark the PR as Ready for review themselves via the GitHub UI button

Never run gh pr ready or any command that marks the PR ready — this is always done manually by the user.