kramme-cc-workflow/skills/kramme:pr:create/SKILL.md
Use when creating a PR from the current branch with narrative-quality commits and a generated description. Orchestrates branch setup, commit restructuring via kramme:git:recreate-commits, and description generation via kramme:pr:generate-description before pushing and opening the PR via gh.
npx skillsauth add abildtoft/kramme-cc-workflow kramme:pr:createInstall 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.
Orchestrate the creation of a clean, well-documented PR by validating git state, setting up the branch, recreating commits as a narrative, generating a description, and pushing + creating the PR via gh.
kramme:pr:finalize / kramme:pr:generate-description to refresh the description) instead of running the full creation flow.recreate-commits will reorganize history. Push and gh pr create manually.origin/HEAD) as the PR base./kramme:pr:create
|
v
Step 1 Pre-Validation .................... abort on any failure
|
Step 2 Resolve base branch ({base-branch})
Step 3 Branch handling (on base? Linear? upstream?)
|
Step 4 Changes detection ................. abort if nothing to ship
|
Step 5 Capture {original-branch} / {original-commit} / {stash-created}
|
Step 6 Invoke kramme:git:recreate-commits --> on failure, Step 10 rollback
|
Step 7 Invoke kramme:pr:generate-description (with title-fallback path)
|
Step 8 Preview + confirmation
- Abort --> Step 10 rollback
- Edit --> loop until user confirms
- Create --> push + gh pr create
|
Step 9 Success output
Steps 6 and 7 each invoke a sub-skill via the Skill tool. After a sub-skill returns, continue to the next step in this skill. Do not summarize and wait for user input between sub-skills. The only stop points are: a confirmation prompt that explicitly requires input, a --auto-suppressed prompt that hits a hard blocker, or a routed-to Step 10 abort.
references/pre-validation-checks.md — Step 1: repository safety checks.references/branch-and-platform-handling.md — Steps 2–3: base-branch detection, branch creation, Linear lookup, upstream handling.references/state-and-rollback.md — Steps 5 and 10: state capture, stash handling, abort/rollback.references/confirmation-and-creation.md — Steps 8–9: preview, confirmation, edit loop, push, gh pr create, draft mode, success output.Parse $ARGUMENTS for optional flags before starting:
--auto -> set AUTO_MODE=true and remove the flag from the remaining arguments.--draft -> set DRAFT_MODE=true and remove the flag from the remaining arguments.Defaults: AUTO_MODE=false, DRAFT_MODE=false. Flag order is not significant.
--auto means:
Narrative)--draft means:
gh pr create --draft).Without --draft, the PR is created ready for review.
Read the pre-validation checks from references/pre-validation-checks.md. Run all four checks (git repo, merge conflicts, rebase/merge in progress, remote configuration) and abort on any failure.
Read the branch handling instructions from references/branch-and-platform-handling.md. Validate the branch is a feature branch, detect the base branch (capture as {base-branch} — used in later display strings and as the PR base), and handle edge cases (detached HEAD, on base branch, Linear issue integration, no upstream).
git status --porcelain
git rev-list --count origin/{base-branch}..HEAD
If both checks return empty/zero:
Error: No changes detected compared to {base-branch}.
Current state:
- Branch: {feature-branch}
- Uncommitted changes: None
- Commits ahead of {base-branch}: 0
Nothing to create a PR for. Make some changes first, then run /kramme:pr:create again.
Action: Abort.
If changes exist: Continue to next step.
Read references/state-and-rollback.md and execute Step 5 (capture {original-branch}, {original-commit}, {stash-created}; stash uncommitted changes if any). Keep these values for the rest of the workflow — they are agent-tracked state, not shell variables.
If AUTO_MODE=true, skip this question and choose Narrative (recommended).
Otherwise use AskUserQuestion:
header: "Commit style"
question: "How should commits be structured for the PR?"
options:
- label: "Narrative (recommended)"
description: "Reorganize into logical story: setup, core implementation, tests, polish"
- label: "Keep original"
description: "Keep existing commit structure, just clean up messages"
- label: "Single squash"
description: "Combine all changes into one well-documented commit"
multiSelect: false
IMPORTANT: Use the Skill tool to invoke recreate-commits:
If AUTO_MODE=true:
skill: "kramme:git:recreate-commits", args: "--auto"
Otherwise:
skill: "kramme:git:recreate-commits"
This skill will:
{base-branch}When it returns, continue to Step 7. See the "Workflow rule" near the top of this skill.
If the skill fails or encounters an error:
Error: The recreate-commits skill encountered an issue.
Original state preserved:
- Branch: {original-branch}
- Commit: {original-commit}
What happened:
{skill error message}
Recovery:
1. Your original work is safe — rollback restored the branch and any stash
2. Check git status to confirm
3. Try again with /kramme:pr:create
Action: Execute Step 10 (rollback via references/state-and-rollback.md), then abort.
Invoke kramme:pr:generate-description via the Skill tool. Pass --auto when AUTO_MODE=true, no arguments otherwise.
The skill will:
<type>(<scope>): <description>)When it returns, continue to Step 8. See the "Workflow rule" near the top of this skill.
Capture both the title and the full description for Step 8.
If the skill returns no usable output, build a fallback:
Fallback title — derive in this order, picking the first that works:
git log --format=%s {base-branch}..HEAD | head -1 if there is at least one commit ahead./ replaced by : (e.g., feature/oauth → feature: oauth).AskUserQuestion (header "PR title", no preset options) — required, do not continue without a title.Fallback description:
## Summary
[Brief description of changes]
## Technical Details
[Implementation approach]
## Test Plan
- [ ] Manual testing completed
- [ ] Unit tests pass
## Breaking Changes
None
Continue to Step 8 with the fallback title and description. When AUTO_MODE=true, prefer fallback (1) or (2) over prompting.
Read references/confirmation-and-creation.md and execute Step 8 from that file. It contains the preview format, confirmation prompt, the "Edit description first" loop, draft-mode substitutions, push command, gh pr create invocation, and failure fallbacks. Substitute {base-branch}, {original-branch}, the captured title, and the generated description when emitting commands.
Use Step 9 in references/confirmation-and-creation.md for the final success message. Preserve the draft-specific wording when DRAFT_MODE=true.
Triggered by an "Abort" choice in Step 8 or a critical failure in Steps 6–8. Execute Step 10 from references/state-and-rollback.md, which performs the checkout/reset, restores any stash, and prints the rollback confirmation.
Never add Generated with [Claude Code], Co-Authored-By: Claude, or any mention of AI assistance to commits. recreate-commits enforces this for commit messages; this skill must not undo it.
Never modify git config or add AI as author. All commits must reflect the user's authorship.
Draft PRs are opt-in via the --draft flag. Default behavior is to create PRs ready for review. Pass --draft to gh pr create only when DRAFT_MODE=true.
This skill creates PRs with gh pr create --assignee @me. This is intentional — the author opening the PR is the assignee. If you need to assign someone else, edit the PR after creation.
Even for simple changes, invoke both sub-skills:
kramme:git:recreate-commits for clean commit historykramme:pr:generate-description for a comprehensive descriptionThis keeps PRs consistent across the workflow.
development
Compare an existing PR's title and body against the actual branch diff and report drift — false claims, missing major changes, stale scope, missing risk callouts. Use after pushing changes to a branch with an open PR, or before requesting review. Read-only by default; add --fix to delegate to kramme:pr:generate-description for an updated description. Complements kramme:pr:code-review (which checks description accuracy as one signal among many code-quality checks) by being a fast, focused, single-purpose check that runs in seconds.
tools
Reviews plugin skills for focused scope, progressive disclosure, portability, safety, retry behavior, and documentation quality. Use when auditing a SKILL.md, skill directory, or proposed skill text against skill-authoring standards. Not for creating new skills, editing skills, or reviewing ordinary application code.
tools
Reviews recent agent session transcripts to find repeated manual workflows or repeated user asks, then proposes and optionally scaffolds only useful new skills or custom subagents. Use when the user asks to inspect recent sessions, find automation opportunities, or create reusable workflows from repeated work. Not for summarizing one session, general retrospectives, or codebase refactoring.
data-ai
Remove all DONE issues and renumber remaining issues within each prefix group. Not for editing live issue content, archiving still-open issues, or moving issues between prefix groups.