Skip to content

LedgerHQ/lumen / .claude/skills/open-pr

open-pr

Verified

Open a PR from the current branch to `main`: find the DLS ticket in the current sprint, ensure an Nx version plan exists, commit, push, and create the PR from the repo's PR template. Run only when the user explicitly asks to open/create a PR.

open-pr

Run the whole flow without asking for confirmation. Only stop to ask where a step says so, or when something fails.

1. Ticket and branch

Resolve the DLS key once; the title and the body both use it.

  1. If the branch name contains DLS-<n> (any case), use it.
  2. Otherwise run the current-sprint lookup from the jira-ticket skill and match the summaries against the branch name and the diff. Use a single clear match silently; otherwise ask one question with the top candidates plus "No ticket".
  3. If the Jira tools are missing or unauthorized, ask once for the key or "No ticket".

On main, create the branch once the key is known: git checkout -b DLS-<n>-<short-slug> (just <short-slug> without a ticket).

2. Commit

Commit any uncommitted changes with a conventional message, so every later check sees the whole change.

3. Version plan

Run the same check as CI, against a fresh origin/main:

git fetch origin main && npx nx release plan:check --base=origin/main --verbose

It lists every affected publishable package that has no plan, and already ignores tests, stories and docs (nx.json → ignorePatternsForPlanCheck). Add one plan per listed package following the release-plan skill, commit them, and rerun until it passes.

4. Push

Push to the branch's own name, never to its upstream (a branch created from origin/main tracks main, and a bare push would target it):

git push -u origin "HEAD:refs/heads/$(git branch --show-current)"

If gh pr view --json url finds a PR, print its URL and stop.

5. Title

<prefix> DLS-<n> <type>(<scope>): <summary>, e.g. [M] DLS-1023 feat(Toast): add Toast component

  • <prefix>: the platform prefix defined in the jira-ticket skill, derived from the changed libs.
  • <type>: feat, fix, refactor, perf, chore, docs or test. Add ! after the scope when consumers must change their code (removed or renamed export or prop, changed default): feat(Link)!: …, as in the version plan (see the release-plan skill).
  • Without a ticket, drop DLS-<n>.

6. Body

Fill .github/pull_request_template.md from git diff origin/main...HEAD, then strip every HTML comment:

Keep it short: a reviewer should get the high-level change and anything important in under a minute. Every line must earn its place. No narration of how you found the fix, no restating the diff, no numbers or logs the reviewer doesn't need.

  • Context: the why in 1–2 sentences, readable by someone who won't open the code. Set the ticket link, or remove that line without a ticket.
  • Technical details: 2–4 one-line bullets on what changed and where to start reviewing, never a file-by-file list. A fix states the root cause in one bullet, a feature shows a short usage snippet, an architectural change links its ADR in docs/adr/.
  • How to test: 1–3 steps or story names, and a reminder to add before/after screenshots for UI changes. Remove it when CI covers the change.
  • Breaking change: uncomment and fill (before → after, migration) when the title has ! after the scope; remove it otherwise.

Put deeper detail in a collapsible block, and only when it helps the reviewer (a tricky root cause, a rejected alternative, repro measurements). Leave it out otherwise:

<details>
<summary>Root cause in detail</summary>

…

</details>

7. Create

gh pr create --base main --head "$(git branch --show-current)" --title "<title>" --body-file - <<'EOF'
<body>
EOF

Print the PR URL. If gh is missing or unauthenticated, tell the user to install the GitHub CLI and run gh auth login.

planning-and-task-breakdownaddyosmani/agent-skillsBreaks work into ordered tasks. Use when you have a spec or clear requirements and need to break work into implementable tasks. Use when a task feels too large to start, when you need to estimate scope, or when parallel work is possible.Stars: 118kUpdated Claude CodeCodexVerifiedInstall
screenpipethedotmack/claude-memSearch screen and audio history recorded by Screenpipe and optionally save selected context into claude-mem. Use when the user asks to recall desktop activity, a meeting, or something seen in another app through Screenpipe.Stars: 118kUpdated Claude CodeCodexVerifiedInstall
contact-widgetnexu-io/open-designSelf-contained floating chat widget with welcome screen, social links, meeting button, and message input. Single HTML file, zero dependencies.Stars: 108kUpdated Claude CodeCodexVerifiedInstall
meeting-notesnexu-io/open-designMeeting notes page — title bar with attendees, agenda checklist, decisions block, action items table with owners + dates, and a "next meeting" footer. Use when the brief mentions "meeting notes", "minutes", "1:1 notes", "all-hands recap", or "会议纪要".Stars: 108kUpdated Claude CodeCodexVerifiedInstall