create-pr-from-spec
giuseppe-trisciuoglio/developer-kit
Automate GitHub PR creation from specifications using pull_request_template.md
What is create-pr-from-spec?
This skill converts finalized specifications into GitHub Pull Requests with template-compliant titles and bodies. Use it when you have a specification ready for review and want to automate PR creation while ensuring duplicate prevention and proper assignment to the creator.
- Analyzes pull_request_template.md to extract PR structure requirements
- Creates draft PRs and verifies no duplicate PRs exist before proceeding
- Populates PR title and body with template-compliant content from the specification
- Marks PRs as ready for review and automatically assigns them to the creator
- Returns the PR URL and summary of contents to the user
How to install create-pr-from-spec
npx skills add https://github.com/giuseppe-trisciuoglio/developer-kit --skill create-pr-from-spec- Specification file must be finalized and ready for review
- Target branch must exist in the repository
- `.github/pull_request_template.md` must exist in the repository
- Write access to create pull requests in the repository
How to use create-pr-from-spec
- 1.Ensure your specification is complete and the target branch is identified
- 2.Run the skill and provide the target branch name (e.g., main, develop)
- 3.The skill analyzes pull_request_template.md to understand required sections
- 4.A draft PR is created; the skill checks for existing PRs to prevent duplicates
- 5.The PR title and body are populated with template-compliant content from your spec
- 6.The PR is marked as ready for review and assigned to you
- 7.Review the returned PR URL and share with your team
Use cases
- Convert finalized specifications into PRs for team review without manual drafting
- Batch process multiple specifications into PRs while maintaining template compliance
- Automate spec-to-PR workflow for teams that use specifications as the source of truth
- Ensure all PRs follow organizational template standards by generating them programmatically
- Prevent duplicate PRs by checking for existing PRs before creation
- Development teams using specification-driven workflows
- Teams with pull_request_template.md standards that need enforcement
- Developers automating PR creation from design or specification documents
- Engineering managers streamlining spec-to-code processes
create-pr-from-spec FAQ
The skill detects existing PRs and stops, reporting the URL of the existing PR instead of creating a duplicate.
This skill only creates and configures the PR metadata (title, body, assignment, state). It does not modify any code.
The PR title and body are generated based on your specification and the pull_request_template.md structure. The skill ensures template compliance automatically.
The skill requires pull_request_template.md to exist at `.github/pull_request_template.md`. You must create this file first.
No. The skill only creates the PR and marks it ready for review. CI/CD and merging must be handled separately.
Full instructions (SKILL.md)
Source of truth, from giuseppe-trisciuoglio/developer-kit.
name: create-pr-from-spec description: "Create GitHub Pull Request from specification using pull_request_template.md. Use when: spec needs to be converted to PR, spec is ready for review/merge, need to automate PR creation from specification file with template-based body and title." allowed-tools: Read, Grep, Glob, Bash
Create Pull Request from Specification
Create a GitHub Pull Request for a specification using the pull_request_template.md template located at ${workspaceFolder}/.github/pull_request_template.md.
Overview
This skill automates the creation of GitHub Pull Requests directly from specifications. It follows a structured process:
- Analyzes the specification template requirements
- Creates a draft PR with the target branch
- Verifies no duplicate PRs exist
- Updates PR body and title with template-compliant content
- Marks PR as ready for review
- Automatically assigns to the creator
- Returns PR URL to user
Key Benefits:
- ✅ Automated PR creation from specifications
- ✅ Template-compliant PR body and title
- ✅ Duplicate PR prevention
- ✅ Auto-assignment to creator
- ✅ Streamlined spec-to-PR workflow
When to Use
Use this skill when:
- Specification is ready to merge - Convert finalized spec to PR
- Need automated PR creation - Avoid manual PR drafting
- Template compliance required - Ensure PR follows pull_request_template.md
- Multiple PRs from specs - Batch process specifications into PRs
- Team collaboration - Share specs as PRs for review
Trigger phrases:
- "Create pull request from spec"
- "Convert spec to PR"
- "Open PR for specification"
- "Submit spec as pull request"
- "Automate PR creation"
Instructions
Prerequisites
Before using this skill, ensure:
- Specification file is finalized and ready for review
- Target branch is specified (e.g.,
main,develop) .github/pull_request_template.mdexists in the repository- You have write access to create PRs
Step-by-Step Process
1. Analyze specification template
- Extract requirements from
${workspaceFolder}/.github/pull_request_template.md - Use search tool to parse template sections and placeholders
2. Create pull request draft
- Use
create_pull_requesttool to create draft PR to target branch - First verify no existing PR exists using
get_pull_requestto prevent duplicates - If PR already exists, stop and report to user
3. Get pull request changes
- Use
get_pull_request_difftool to analyze differences - Verify code changes are correct before updating
4. Update pull request
- Use
update_pull_requesttool to populate PR body and title - Incorporate template sections from step 1
- Ensure all required fields are filled
5. Mark ready for review
- Use
update_pull_requesttool to change state from draft to ready for review - Verify PR is no longer in draft mode
6. Assign pull request
- Use
get_meto retrieve current user information - Use
update_issuetool to assign PR to creator
7. Return pull request URL
- Provide user with clickable PR URL
- Include summary of PR contents
Examples
Example 1: Basic PR Creation
Input: Create PR from spec to main branch
Process:
1. Analyze pull_request_template.md
2. Create draft PR to main
3. Check for existing PRs
4. Update PR title: "feat: [Feature Name from Spec]"
5. Update PR body with template sections
6. Mark as ready for review
7. Assign to creator
Output: https://github.com/user/repo/pull/123
Example 2: Template-Compliant PR
PR Title: feat: Implement user authentication system
PR Body:
## Description
Implements JWT-based authentication with token refresh mechanism
## Related Issue
Closes #456
## Changes
- Added JWT middleware
- Implemented token validation
- Added refresh token endpoint
## Testing
- Unit tests for auth middleware
- Integration tests for token endpoints
## Checklist
- [x] Tests pass
- [x] Documentation updated
- [x] No breaking changes
Example 3: Duplicate Prevention
Input: Create PR from spec
Check: PR for current branch already exists?
→ Yes: Report error, don't create duplicate
→ No: Proceed with PR creation
Output: "PR already exists at https://github.com/user/repo/pull/789"
Requirements
- Single pull request for the complete specification
- Clear title and body identifying the specification/feature
- Pull request body follows pull_request_template.md structure
- Verification that no duplicate pull requests exist
- PR automatically assigned to creator
- No draft PRs left behind
Success Criteria
- ✅ PR created without errors
- ✅ PR body follows pull_request_template.md structure
- ✅ PR title clearly identifies the specification/feature
- ✅ No duplicate PRs exist for the branch
- ✅ PR assigned to creator
- ✅ PR URL returned to user
- ✅ PR is ready for review (not in draft)
Constraints and Warnings
⚠️ Important:
- PR creation requires write access to repository
- Target branch must exist before PR creation
- Template file must exist at
.github/pull_request_template.md - Cannot create PR without valid branch target
- Duplicate PRs will be detected and rejected
- PR assignment requires valid GitHub user
🚫 Limitations:
- Does not perform code review automatically
- Does not trigger CI/CD pipelines
- Does not merge PRs automatically
- Cannot modify existing code, only PR metadata
Best Practices
- Verify before creating - Always review specification before converting to PR
- Use descriptive titles - PR titles should clearly indicate feature/fix purpose
- Complete template - Ensure all required template sections are filled
- Link related issues - Include issue references in PR body
- Test first - Ensure all tests pass before creating PR
- Team review - Get team approval before marking ready for review
- Clean git history - Ensure commits are clean and well-documented
Tools Used
search- Analyze specification template requirementscreate_pull_request- Create new PR in draft modeget_pull_request- Check for existing PRs before creationget_pull_request_diff- Analyze PR changesupdate_pull_request- Update PR title, body, and stateupdate_issue- Assign PR to creatorget_me- Retrieve current user information
Related skills
More from giuseppe-trisciuoglio/developer-kit and the wider catalog.

docs-updater
Automatically sync README, CHANGELOG, and docs with git changes since the last release tag.

drawio-logical-diagrams
Create professional logical flow, architecture, and process diagrams in draw.io XML format.

drizzle-orm-patterns
Type-safe database patterns for Drizzle ORM across PostgreSQL, MySQL, SQLite, MSSQL, and CockroachDB.

dynamodb-toolbox-patterns
TypeScript patterns for type-safe DynamoDB access with DynamoDB-Toolbox v2 and AWS SDK v3.

gemini
Delegate large-context analysis and complex reasoning tasks to Gemini 3.0 Flash or Pro models via CLI.

github-issue-workflow
Guided 8-phase workflow for resolving GitHub issues from description to pull request in Claude Code.