gh-create-pr-linked

Create a GitHub pull request linked to a specified issue.

18|5|Updated Nov 3, 2025
One-click install
npx skills add https://github.com/mvillmow/ml-odyssey --skill gh-create-pr-linked
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gh-create-pr-linked
Source: https://github.com/mvillmow/ml-odyssey/tree/main/.claude/skills/gh-create-pr-linked
Command: npx skills add https://github.com/mvillmow/ml-odyssey --skill gh-create-pr-linked

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires github-cli, and includes scripts (resource) components.

What problem does it solve? This Skill simplifies pull request creation by automatically linking PRs to GitHub issues, ensuring proper traceability and reducing manual linking errors. It automates a crucial step in the development workflow, saving time and ensuring accuracy.

Core Features & Use Cases:

  • Automatic Issue Linking: Creates PRs that automatically reference and link to a specified GitHub issue, updating issue status upon merge.
  • Customizable PR Body: Allows for custom descriptions and summaries while maintaining essential issue linkage.
  • Use Case: After completing a feature for issue #42, use this skill to create a pull request. It will automatically link the PR to issue #42, ensuring the issue's status is updated when the PR merges, streamlining project tracking.

Quick Start: Use the gh-create-pr-linked skill to create a pull request linked to GitHub issue number 42.

Frequently Asked Questions about gh-create-pr-linked

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automatically link a pull request to a GitHub issue?

Automatically link a pull request to a GitHub issue by using the GitHub CLI (gh) to create a PR with the --issue flag or by including a 'Closes #ISSUE' reference in the PR body. This ensures the issue status updates automatically when the PR merges, maintaining traceability without manual linking.

What do I need to create a linked pull request with GitHub CLI?

You need a Git repository with an upstream branch configured, GitHub CLI installed and authenticated, a valid GitHub issue number, and a feature branch with committed changes. These prerequisites ensure gh can push your branch and create the linked PR.

Can I customize the PR description while keeping it linked to an issue?

Yes, you can write a custom PR title and body while maintaining issue linkage by including a 'Closes #ISSUE' reference in the description or using the --issue flag with gh pr create. This combines custom context with automatic issue tracking.

Why should I link pull requests to issues in GitHub?

Linking PRs to issues provides traceability, automatically updates issue status upon merge, and reduces manual tracking errors. This ensures your project workflow reflects which code changes resolve which issues, improving team visibility and project management.

Does GitHub CLI support automatic issue linking in pull requests?

Yes, GitHub CLI supports automatic issue linking through the --issue flag when creating a PR, or by including 'Closes #ISSUE' in the PR body. Both methods integrate issue tracking directly into the pull request workflow.

What happens when a linked pull request is merged?

When a linked pull request merges, GitHub automatically closes the associated issue and updates its status. This maintains accurate project tracking without requiring separate issue management steps.