Skip to content
Agentmart
Submit a tool

pr-draft

Create or update a draft PR with a validated body and issue linkage when applicable.

Skill by LightForgeLabsStudio

IndexedMIT
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/lightforgelabsstudio-pr-draft

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Create or update a draft PR with a validated body and issue linkage when applicable.

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/pr-draft

What's inside

Skill name
pr-draft
Description
Create or update a draft PR with a validated body and issue linkage when applicable.
License
MIT
Instructions
59 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# PR Draft

Create or update a draft PR using a consistent template. Validate its body locally before publishing.

## Inputs

Read the consuming project's root AGENTS.md and any workflow document it names. Resolve the base branch from explicit input or `MAIN_BRANCH` (default `main`). Inputs also include head branch (default current), PR title, requirements or linked issue, summary bullets (between 1 and 4), implementation checklist items, and validation checklist items.

## Workflow

1. **Confirm branch state** — Verify the head differs from the resolved base branch and has commits beyond it. Use an existing PR's head when updating it. Push if needed:
   ```
   git push -u origin <branch>
   ```

   Look for an existing PR for this head and base with `gh pr list --head <head> --base <base> --state open --json number,url,isDraft`. Update that PR rather than creating a duplicate. Do not silently convert a ready PR back to draft.

2. **Build PR body** — Write a temporary markdown file:
   ```markdown
   Fixes #<number>

   ## Summary
   - <bullet>

   ## Implementation Plan
   - [ ] <step>

   ## Validation
   - [ ] <criterion>
   ```

   Include `Fixes #<number>` only when a linked issue should close on merge. For pasted requirements without an issue, omit that line and capture the requirements in the summary and checklists; do not invent an issue.

3. **Validate body** — Locate the validator from the repository root before running it. Check both the repository-level path and the AIDE-submodule path; this repository may keep it under `.aide/tools/`:
   ```
   $validator = @("tools/validate_pr_body.ps1", ".aide/tools/validate_pr_body.ps1") |
       Where-Object { Test-Path -LiteralPath $_ } |
       Select-Object -First 1
   if (-not $validator) {
       throw "Validator not found; search hidden files and inspect submodules before proceeding."
   }
   powershell -ExecutionPolicy Bypass -File $validator -Body (Get-Content -Raw <tmpfile>)
   ```
   If neither path exists, search the repository including hidden files and inspect submodules before calling the validator unavailable. Do not replace the validator with manual checks. Fix and re-run until green; if validation fails, provide the specific errors and suggest corrections.

4. **Publish** — For a new PR, run:
   ```
   gh pr create --draft --base <base> --head <head> --title "<title>" --body-file <tmpfile>
   ```

   For an existing PR, run `gh pr edit <pr> --title "<title>" --body-file <tmpfile>` instead.

5. **Verify & cleanup** — Run `gh pr view --json number,url,body`. Confirm formatting persisted. Delete the temporary body file.

## Output

PR URL, current draft/ready state, linked issue number if applicable, validation result.

From LightForgeLabsStudio/AIDE, MIT.

More from LightForgeLabsStudio/AIDE

Signals

Stars
0
Forks
2
Open issues
1
Last commit (this folder)
Oct 5, 2026 (24 days ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from LightForgeLabsStudio

Cite this page

pr-draft skill. Agent Mart. https://agentmart.dev/skills/lightforgelabsstudio-pr-draft (last updated 2026-10-24)