/thebous-os:create-prfrom thebous-os
Creates a pull request for the current branch against main, auto-generating title and description from the branch diff and linked Jira or Notion task. Validates implementation against task requirements before creating the PR.
Ships in thebous-os. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Create a Pull Request for the current branch against main. Generate the
title and description from the branch diff, plus the linked Jira or Notion task
when one exists.
If the user asks to merge a branch or an existing pull request rather than to
create one, load skills/merge-pr/SKILL.md and follow that workflow instead.
Do not run the PR-creation steps for a merge request.
git branch --show-current
git status --short
If there are uncommitted changes, warn the user and ask if they want to proceed anyway.
Verify the branch is pushed to origin:
git ls-remote --exit-code origin "$(git branch --show-current)" 2>/dev/null || echo "NOT_PUSHED"
If not pushed:
git push -u origin "$(git branch --show-current)"
Follow references/task-context.md with:
<SOURCES> = the current branch name<REQUIRED> = optional<DETAILS> = basicIf no task resolves, continue with no task context and make no provider calls.
Otherwise set TASK_REF, PROVIDER, EXTERNAL_ID, TASK_URL,
TASK_SUMMARY and TASK_DESCRIPTION from the normalized task.
Fetch the full diff against main:
git diff main...HEAD --stat
git log main..HEAD --pretty=format:"%s" --no-merges
git diff main...HEAD -- . ':(exclude)*.lock' ':(exclude)package-lock.json'
Analyze the diff to identify:
Don't trust the diff hunk alone for this — when it doesn't show the full function body, type definitions, or imports needed to judge the change, read the full file locally (it's already checked out on this branch, no need for the GitHub API).
If no task is resolved, skip this step.
Compare the full diff and tests against <TASK_REQUIREMENTS> from the provider-neutral context.
For each requirement, record ✅ Met, ⚠️ Partially met / unverifiable, or ❌ Not met, with concise evidence from the changed files or tests.
Show the checklist to the user and ask:
✅ Task validation complete for <PROVIDER>:<EXTERNAL_ID>. Are all listed requirements satisfied and can I create the PR?
Do not create the PR unless every item is ✅ Met and the user confirms. If any item is partial, unverifiable, or not met, stop and report what must be addressed.
Title: <type>(<scope>): <concrete action and outcome> [<PROVIDER>:<EXTERNAL_ID>] when a task exists.
Use a short, concrete imperative title that is understandable without opening
the PR. Choose <type> from feat, fix, refactor, perf, docs,
test, build, ci, or chore; use a meaningful component for <scope>.
Keep the task reference at the end so the title remains searchable without
making the identifier the only useful context. For Jira, preserve the existing
[<KEY>] convention. Examples:
feat(auth): add passwordless login with email links [AUTH-142]
fix(api): prevent duplicate invoice creation [BILL-87]
refactor(checkout): centralize payment validation [PAY-31]
Do not use generic titles such as Fix bug, Update code, Phase 1, or
Various improvements. If the repository has an established title convention
that conflicts with this format, preserve the repository convention while
retaining the same concrete action-and-outcome content.
Description: fill .github/PULL_REQUEST_TEMPLATE.md using the task context
and diff analysis. If CONTRIBUTING.md exists, follow any compatible
repository-specific rules as well.
Don't leave placeholder text — each section must reflect the actual diff.
When filling the template, delete HTML comments and placeholder bullets,
always pass --body, and add Fixes <JIRA_BASE_URL>/browse/<KEY> only for a
Jira task. For Notion, add its task URL as a plain reference instead of a
GitHub closing keyword. Automatically check the correct checkbox in "Type of change"
based on the analyzed diff. Remove sections that are genuinely not
applicable. Keep the description focused on one purpose and do not repeat the
diff mechanically.
Based on the diff analysis from step 3, decide whether this change is screenshot-worthy: new or modified UI (components, pages, styles, layouts) — yes; pure backend/core logic, refactoring, config, or non-visual bug fixes — no.
If it's screenshot-worthy, ask the user:
📸 This looks like a UI change — got a screenshot of the result? (paste an image URL, or say no to skip)
## Evidence section: .gh/the API can't upload images — tell them to drag the file into the PR description on GitHub after it's created, then move on.If the change isn't screenshot-worthy, skip this step silently. For non-obvious backend or architecture flows, include a small Mermaid diagram in ## Evidence; do not add Mermaid by default.
If no task is resolved, show the generated title and body and wait for the user to confirm before creating.
gh pr create \
--base main \
--title "<generated title>" \
--body "<generated description>"
Capture the PR URL from the output.
If the command fails with a TLS/certificate error (e.g. tls: failed to verify certificate: x509: ...), use this fallback:
OWNER_REPO=$(git remote get-url origin | sed -E 's#.*[:/]([^/]+/[^/]+)(\.git)?$#\1#')
curl -sf \
-H "Authorization: Bearer $(gh auth token)" \
-H "Accept: application/vnd.github+json" \
-X POST "https://api.github.com/repos/$OWNER_REPO/pulls" \
-d "{\"title\":\"<generated title>\",\"body\":\"<generated description>\",\"head\":\"$(git branch --show-current)\",\"base\":\"main\"}" \
| jq '{number, url: .html_url}'
If no task is resolved, skip this step. If OBSIDIAN_VAULT_PATH is configured,
follow references/obsidian-log.md:
source "scripts/helpers.sh"
load_env
obsidian_log_pr_task "${OBSIDIAN_VAULT_PATH:-}" "<TASK_REF>" "<PR_URL>" "<PROVIDER>:<EXTERNAL_ID> — PR opened: <PR_URL>"
If no task is resolved, skip steps 8 and 9 and make no provider calls.
For Jira, leave the existing comment through MCP and use jira_comment as the
fallback:
source "scripts/helpers.sh"
load_env
Use the MCP tool addCommentToJiraIssue with issueKey: "<EXTERNAL_ID>" and
comment: "🔍 PR opened: <PR_URL>".
If the MCP call fails, use the jira_comment helper as fallback:
source "scripts/helpers.sh"
jira_comment "<EXTERNAL_ID>" "🔍 PR opened: <PR_URL>"
For Notion:
source "scripts/notion.sh"
notion_add_comment "<EXTERNAL_ID>" "🔍 PR opened: <PR_URL>"
For Jira, if JIRA_IN_REVIEW_ID is configured and not empty, transition the
ticket using references/jira-transition.md with:
<TRANSITION_ID> = $JIRA_IN_REVIEW_ID<COMMENT_TEXT> = (empty/skip comment in jira-transition, we already left one in step 8)For Notion:
source "scripts/notion.sh"
notion_set_status "<EXTERNAL_ID>" "in_review"
If the comment or status operation fails, report the exact semantic error and the partial result. Continue with Slack only after reporting it; never claim both operations succeeded when one failed.
source "scripts/helpers.sh"
load_env
If a Jira task is resolved:
slack_notify "🔍 PR opened: *<PR_TITLE>*\n🔗 <PR_URL>\n🎫 <$JIRA_BASE_URL/browse/<KEY>|<KEY>> → *In Review*"
If a Notion task is resolved:
slack_notify "🔍 PR opened: *<PR_TITLE>*\n🔗 <PR_URL>\n🎫 <<TASK_URL>|notion:<EXTERNAL_ID>> → *In Review*"
If no task is resolved:
slack_notify "🔍 PR opened: *<PR_TITLE>*\n🔗 <PR_URL>"
If Slack notification fails, continue anyway — the PR (and Jira comment, if any) were already done.
Show the user:
<PR_URL><PROVIDER>:<EXTERNAL_ID> (or skipped, no task)<PROVIDER>:<EXTERNAL_ID> → in_review (if status update succeeded; otherwise report the partial result)/thebous-os:review-pr-multiharness to get it reviewedWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
13 skills in this plugin
/address-reviewAssess code review comments against code evidence, fix confirmed issues on your PR after user approval, reply to every comment on GitHub, and update documentation for a linked Jira or Notion task/architecture-first-developmentUse when implementing or refactoring features, bug fixes, handlers, integrations, or domain logic where architecture, maintainability, validation, errors, complexity, I/O, or over-engineering matter/create-jira-taskCreate a Jira task from a user request using the repository's fixed description format with the sections "Descrizione" and "Acceptance Criteria". Use when the user asks to create, open, or draft a new Jira task./create-taskCreate a task in Jira or Notion with the shared Italian description and acceptance-criteria format/jira-git-syncGit → Jira/Notion → Slack → Confluence workflow automation. Use when the user wants to start a task from a Jira or Notion task, create a branch, open/review/merge a PR, or tag a release. Route the request to the matching workflow skill./merge-prMerge a PR to main, transition the linked Jira or Notion task, and notify Slacknpx claudepluginhub thebous/thebous-os --plugin thebous-osOther plugins' skills for the same job