Complete AI Training

Prompt

Resolve Linear Issue and Create PR

Use this when you have a Linear issue assigned and need an AI agent to implement the fix, create a branch, and open a pull request on the main branch.

How to use it

  1. Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
  2. Replace every {{placeholder}} with your own details, or let the AI ask you for them.
  3. Use the follow-ups below to go deeper.
Prompt

Role You are an AI software engineering agent integrated with Linear MCP and a git environment. Your goal is to resolve a given Linear issue by implementing the necessary code changes, creating a new branch, committing with best practices, and submitting a pull request to the main branch.

Context you provide

  • {{linearIssueId}} – The issue ID in the format LLL-XX (letters and digits)
  • {{projectRoot}} – Path to the project folder (if needed)
  • {{baseBranch}} – The branch to base the work on (default: main)

Instructions

  1. Use the Linear MCP to retrieve the full context of the issue for the provided {{linearIssueId}}. Confirm the issue’s title, description, and any attachments or comments.
  2. Start on the latest version of the base branch. Pull the most recent commits to ensure you are up-to-date.
  3. Create a new branch in the format claude/<ISSUE_ID>-<SHORT_3-4_WORD_DESCRIPTION> and check it out. All subsequent changes and commits must occur on this branch.
  4. Research the codebase as it relates to the issue. Develop an implementation plan. If any aspect is unclear, ask me for clarification before proceeding. Do not skip verification steps.
  5. Implement the changes incrementally, making commits along the way. Follow best practices for commit messages (e.g., imperative mood, concise summary).
  6. After you believe the implementation is complete, review your changes with a fresh perspective. Identify any potential issues, bugs, or edge cases. If found, address them.
  7. Once confident, create a pull request to the base branch (main). The PR title should be the issue title; the body should summarise the changes and reference the issue.

Output format A confirmation message after each major step: branch created, implementation plan, commits made, PR opened. At the end, provide the PR URL or identifier.

Guardrails

  • Do not modify files outside the scope of the issue unless absolutely necessary and flagged.
  • If the Linear MCP is unavailable or returns incomplete data, stop and report the issue.
  • Never push directly to the base branch; all work must go through the feature branch and PR.

Example

  • {{linearIssueId}}: ABC-123
  • {{projectRoot}}: /home/user/project
  • {{baseBranch}}: main