Skip to content

generic-automation-and-it/smooth-ai-stockanalysis / .agents/skills/git-commit-push-pr

git-commit-push-pr

Verified

Commit current changes, push to remote, and create or update a pull request on GitHub. Use when making changes and preparing a complete pull request for review.

FileKindSize
AGENTS.mdmarkdown1.9 KB
SKILL.mdskill md10.3 KB
agents/openai.yamlconfig322 B
scripts/get-base-branch.shexecutablescript538 B
scripts/get-pr-metadata.shexecutablescript1.1 KB

scripts/get-pr-metadata.sh

View on GitHub
#!/bin/bash
set -e

# Get PR metadata from the current branch name, which follows the
# git-policy convention: <type>/<issue>-short-description (issue segment optional).
# Output: JSON {type, issue, slug, branch, pr_title_prefix}
#   type            conventional commit type from the branch prefix ("" if non-conforming)
#   issue           numeric issue from the branch name ("" if none)
#   slug            the short-description segment
#   pr_title_prefix ready-made "<type>[<issue>]" / "<type>[NO-TICKET]" PR-title prefix ("" if type unknown)

BRANCH=$(git branch --show-current)

TYPE=""
ISSUE=""
SLUG=""

if [[ "$BRANCH" =~ ^(feat|fix|chore|docs|refactor|test|ci|perf|build)/(([0-9]+)-)?([^/]+)$ ]]; then
    TYPE="${BASH_REMATCH[1]}"
    ISSUE="${BASH_REMATCH[3]}"
    SLUG="${BASH_REMATCH[4]}"
fi

PREFIX=""
if [ -n "$TYPE" ]; then
    PREFIX="${TYPE}[${ISSUE:-NO-TICKET}]"
fi

jq -n \
    --arg type "$TYPE" \
    --arg issue "$ISSUE" \
    --arg slug "$SLUG" \
    --arg branch "$BRANCH" \
    --arg prefix "$PREFIX" \
    '{type: $type, issue: $issue, slug: $slug, branch: $branch, pr_title_prefix: $prefix}'
receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementationStars: 322kUpdated Claude CodeCodexVerifiedInstall
requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirementsStars: 322kUpdated Claude CodeCodexVerifiedInstall
using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallbackStars: 322kUpdated Claude CodeCodexVerifiedInstall
verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions alwaysStars: 322kUpdated Claude CodeCodexVerifiedInstall