skills/send-it/SKILL.md
Push feature branch and create a GitHub PR with structured title and description. Auto-detects branch context, drafts a structured PR body, gets user confirmation, then pushes and creates the PR. GitHub-only, uses gh CLI. Use when user says "send it", "push and PR", "create PR", "open a PR", "ship it", or "send this branch".
npx skillsauth add nathan13888/nice-skills send-itInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Push the current feature branch and create a structured GitHub PR in one shot. Gathers context from git history, drafts a PR with a clear title and body, confirms with the user, then pushes and opens the PR.
Follow all 5 steps sequentially.
Run a single Bash call to detect the full context:
IS_GIT=$(git rev-parse --is-inside-work-tree 2>&1)
CURRENT=$(git symbolic-ref --short HEAD 2>/dev/null || echo "DETACHED")
if git rev-parse --verify main &>/dev/null; then TRUNK="main"
elif git rev-parse --verify master &>/dev/null; then TRUNK="master"
else TRUNK=""; fi
GH_AUTH=$(gh auth status 2>&1)
GH_AUTH_EXIT=$?
if [ -n "$TRUNK" ] && [ "$CURRENT" != "$TRUNK" ]; then
AHEAD=$(git rev-list --count ${TRUNK}..HEAD 2>/dev/null || echo "0")
else
AHEAD="0"
fi
EXISTING_PR=$(gh pr view --json number,url,state 2>&1)
EXISTING_PR_EXIT=$?
echo "IS_GIT=$IS_GIT"
echo "CURRENT=$CURRENT"
echo "TRUNK=$TRUNK"
echo "GH_AUTH_EXIT=$GH_AUTH_EXIT"
echo "GH_AUTH=$GH_AUTH"
echo "AHEAD=$AHEAD"
echo "EXISTING_PR_EXIT=$EXISTING_PR_EXIT"
echo "EXISTING_PR=$EXISTING_PR"
Route based on results:
| Condition | Action |
| -------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Not a git repo (IS_GIT is not true) | Report "Not a git repository." and STOP |
| gh not authenticated (GH_AUTH_EXIT != 0) | Report "GitHub CLI not authenticated. Run gh auth login." and STOP |
| On trunk (CURRENT == TRUNK) | Report "You're on {trunk} -- switch to a feature branch first." and STOP |
| Detached HEAD (CURRENT == "DETACHED") | Report "Detached HEAD -- checkout a branch first." and STOP |
| No trunk found (TRUNK is empty) | Use AskUserQuestion to ask the user for their trunk branch name, then continue |
| No commits ahead (AHEAD == 0) | Report "No commits ahead of {trunk} -- nothing to send." and STOP |
| PR already exists (EXISTING_PR_EXIT == 0) | Use AskUserQuestion: "PR already exists at {url} ({state}). Options: (1) Update existing PR description, (2) Continue and create a new PR anyway, (3) Stop." Route accordingly. |
If all checks pass, proceed to Step 2.
Compute the merge base, then run parallel Bash calls to collect data:
MERGE_BASE=$(git merge-base HEAD $TRUNK) && echo "MERGE_BASE=$MERGE_BASE"
Then in parallel:
git log --format="%h %s%n%w(0,4,4)%b" ${MERGE_BASE}..HEAD
git diff --stat ${MERGE_BASE}..HEAD
git diff ${MERGE_BASE}..HEAD
git rev-parse --abbrev-ref --symbolic-full-name @{u} 2>&1
echo "EXIT=$?"
Parse all output silently. Do NOT echo raw git output to the user. Extract:
Analyze the commits, diff stat, and full diff to draft the PR.
feat:, fix:, etc.)Structure the body with exactly these 4 sections:
{One-liner: a single sentence describing the overall change. No heading.}
## Summary
- {Bullet points describing what changed and why}
- {Up to 2 levels of nesting for sub-details}
- {Sub-detail}
## Implementation
1. **{Bold item}**: {Explanation of how this was implemented}
2. **{Bold item}**: {Explanation}
## Followup
- {Tests to add or run}
- {Migrations or deployment steps}
- {Deferred features or known limitations}
- {Other remarks}
Drafting rules:
Present the draft to the user:
## PR Draft
**Title:** {title}
**Body:**
{full body}
---
Ready to send?
Use AskUserQuestion with these options:
If the user chooses "Edit", apply their changes to the draft and present the updated version. Repeat Step 4 until the user confirms with option 1 or 2.
Check whether upstream tracking exists (from Step 2):
git push -u origin {branch}git pushIf push fails, report the error and STOP. Do not force-push.
Write tool:Write /tmp/send-it-pr-body.md with the final PR body content
For a draft PR:
gh pr create --title "{title}" --body-file /tmp/send-it-pr-body.md --draft
For a ready PR:
gh pr create --title "{title}" --body-file /tmp/send-it-pr-body.md
Capture the PR URL from the command output.
Clean up the temp file:
rm -f /tmp/send-it-pr-body.md
## Sent!
**Title:** {title}
**URL:** {pr_url}
**Status:** {Draft | Ready for review}
**Branch:** {branch} -> {trunk}
**Commits:** {N} | **Files:** {N} | **Changes:** +{insertions} -{deletions}
Write tool for temp files -- use the Write tool to create /tmp/send-it-pr-body.md. DO NOT use echo, cat <<EOF, or shell redirects. Always pass the body via --body-file.git push fails, report the error and stop. Let the user decide how to resolve.rm -f /tmp/send-it-pr-body.md after PR creation, even if the gh command fails.gh pr create, ensure it's properly quoted to handle special characters.gh pr edit {number} --title "{title}" --body-file /tmp/send-it-pr-body.md instead of gh pr create.data-ai
Ingest arbitrary feedback (GitHub/GitLab URL, pasted review, image, file path, free text) about the current repo, decompose it into a prioritized action plan with per-item owners (human / main-agent / subagent), confirm with the user, then dispatch execution. Use when user says "/tackle", "address this feedback", "act on this review", "work through this feedback", or "what should I do about this".
development
Capture a problem or change request, verify it lightly against the codebase, draft a structured issue report, then route to one of: upload to GitHub/GitLab, document in code, hand off for implementation, or a free-text next step. Use when user says "/issue", "report a problem", "file a bug", "raise an issue", "track this", or "open a ticket".
testing
Create a new git branch off trunk using the project's existing naming convention. Detects trunk (main/master/etc.) and the dominant prefix pattern (feat/, <username>/, etc.) from existing branches, slugifies the feature description, and runs git checkout -b. Use when user says "feature branch", "new branch", "create branch", "git branch", or "/feature-branch".
development
Quick situational awareness for the current git branch. Summarizes what a feature branch is about by analyzing commits and changes against trunk. On trunk, highlights recent interesting activity. Use when user says "wtf", "what's going on", "what is this branch", "what changed", or "catch me up".