Create Pr moeru-ai-create-pr

Prepare and create an AIRI pull request or issue with the request context, agent attribution, verifiable change context, architecture evidence, and required visual evidence.

Use it when an agent must open, create, publish, or prepare a PR from the current branch, file an issue, or write commit messages for a PR.

Works in Claude, ChatGPT, Codex and more
Our test
9/10✓ Verified
tested Dec 6, 2026
GitHub stars
52k
moeru-ai/airi
Added by
0
members
Updated
Dec 6
commit f28d10e
Content
3 files
no scripts · 19 KB
License
MIT
free to use

What our test found

The skill provides a rigorous, evidence-oriented workflow for producing reviewable PRs, including useful safeguards for stacked changes, privacy, verification, attribution, and UI evidence.

Request we tested it on“Prepare a pull request for my current branch that fixes a settings page bug. Inspect the diff and repository guidance, run relevant checks, capture before-and-after UI evidence, and draft the PR body without inventing details.”

Limits spotted

  • The workflow can be costly for small changes if applied too literally, though it explicitly encourages proportional detail.
  • It relies on external skills and repository-specific tools such as Vishot and attachment upload, so availability may block UI PR creation.
View on GitHub ↗
name: create-pr
description: Prepare and create an AIRI pull request or issue with the request context, agent attribution, verifiable change context, architecture evidence, and required visual evidence. Use when an agent must open, create, publish, or prepare a PR from the current branch, file an issue, or write commit messages for a PR.

Create Pull Request

Create a reviewable PR from the exact commits intended for publication. The PR body must explain the changed system, not only list changed files.

The and sections also apply to issues and commit messages.

Workflow

  1. Inspect the repository instructions, status, branch, remotes, and target branch.
  2. Compute the merge base. Record the exact base...head comparison that the PR will publish.
  3. Detect stacked work. Separate inherited changes from this PR's own changes.
  4. Review the complete diff. Trace changed files to their entry points, callers, state owners, persistence, and external boundaries.
  5. Classify the PR as a feature, fix, refactor, maintenance change, or a combination. Select context evidence that helps reviewers understand this change.
  6. Run checks that match the changed surfaces. Run the tests of the branch changes, as AGENTS.md describes. Satisfy the repository's required final checks.
  7. If the diff changes user-visible UI, follow the visual-evidence workflow below.
  8. Read . Compose the body from verified code and runtime evidence. Include the request context and the agent attribution.
  9. Publish the intended commits through the available GitHub or gh workflow.
  10. Create the PR. Then open it and verify the title, base, head, body, diagrams, tables, and image Markdown.
  11. Get the PR review threads, comments, and check status. Fix each confirmed error and run focused checks.
  12. Push each correction. Reply with evidence and resolve the applicable thread.

Context Evidence

Build a small context brief before you write the PR body. Keep the analysis read-only until the normal publication step.

  • Record the repository, target branch, head branch, merge base, and inspected commit range.
  • For a stacked PR, identify the parent PR or branch. Do not describe inherited changes as this PR's own changes.
  • Separate runtime code from generated files, lockfiles, snapshots, and migrations.
  • Trace the changed files to real module boundaries. Include entry points, composition roots, protocols, domain services, persistence, adapters, and callers when applicable.
  • Support architecture claims with file paths or symbols. Mark an unproven business intent as an assumption or an open question.
  • Do not expose tokens, secrets, full user records, or webhook payloads.

Request Context

Maintainers review a change against the need that caused it. Give them that need, not only the diff.

In each PR and issue that an agent writes, add a ## Context section. Put it after ## Summary in a PR. Put it first in an issue.

  • Give the request of the user. Write it as a short paraphrase in English. Keep the decisions and the constraints that the user gave.
  • Give the scenario: what the user did, on which app or platform, and what they saw or expected.
  • Give the scope limits: what the user asked you not to change, and the work that you left for a later PR.
  • If the request came from an issue, a review, or a discussion, link it.
  • If you inferred the need, label it as an assumption.

Obey the private-data rules of AGENTS.md. Do not paste the chat, logs, or screenshots of the user. Remove names, paths, host names, account data, and tokens. Generalize a private scenario, for example "a self-hosted provider on a local network".

Keep the section short. Three to six lines are usually enough.

Agent Attribution

Reviewers need to know which agent and which model wrote a change. They use it to calibrate the review and to find repeated agent failures.

In the PR or issue body

End the body with a ## Agent section:

## Agent

- Harness: Claude Code
- Model: claude-opus-5-5
  • Harness is the agent product or framework that ran the work, for example Claude Code, Codex CLI, Cursor, Devin, Jules, or GitHub Copilot.
  • Model is the exact model ID that the runtime reports to you. Do not write a marketing name when you know the ID.
  • If several harnesses or models did meaningful parts of the work, list each one.
  • If the runtime does not tell you a value, write Unknown. Do not guess.
  • Keep the harness footer that your runtime requires, for example "Generated with Claude Code". Put it after the ## Agent section.
In commit messages

Add one Assisted-by trailer for each agent in the commit message body. Use the format of the Linux kernel coding-assistants guide:

feat(stage-ui): add provider retry badge

Show a retry badge when a provider request fails and a retry is pending.

Assisted-by: claude-code:claude-opus-5-5
  • The format is Assisted-by: <harness>:<model> [tool ...].
  • Write <harness> in kebab-case without spaces, for example claude-code, codex-cli, cursor, or devin.
  • Write <model> as the model ID that the runtime reports. Use unknown when you do not know it.
  • Optional tools are analysis tools that did part of the work. Do not list git, pnpm, editors, or the test runner.
  • Put the trailer in the last paragraph of the message, after one blank line. Git and GitHub read trailers only there.

Do not use Co-authored-by for an agent or a model. GitHub treats Co-authored-by as a human co-author. It links the address to an account and lists it as a contributor. Agent entries in that trailer pollute the contributor list and the commit history.

  • Keep Co-authored-by for real people only.
  • Do not invent other agent trailers, such as Co-authored-by-agent or Authored-by-agent. Old commits use them. New commits use Assisted-by.
  • Do not add Signed-off-by for an agent. Only a human can sign off.
  • Some harnesses add a Co-authored-by trailer for themselves by default. Replace it with Assisted-by. If a harness instruction requires that trailer, the repository rule takes precedence.

PR Body Contract

Use the structure in as a decision guide. Match the detail to the scope, risk, and review cost.

  • Every PR needs a concise ## Summary, ## Context, ## Verification, and ## Agent section. A PR that a human writes without an agent can omit ## Agent.
  • Add ## Change map when the diff changes several modules, responsibilities, or ownership boundaries.
  • Add ## Architecture and behavior when a diagram explains the change faster or more accurately than prose.
  • Add ## Boundaries and risks when the change has meaningful failure modes, invariants, migrations, or external effects.
  • Keep a small and local PR body small. Do not add a table or diagram only to satisfy a template.

When a change map is useful, prefer this table:

| Module | Before | After | Description | | --- | --- | --- | --- | | <module or boundary> | <previous responsibility or behavior> | <new responsibility or behavior> | <reason and effect> |

Use module or domain names in the first column. Do not use a raw file list as the module map. Prose is sufficient for a single local module.

Behavior Evidence Workflow

Apply this workflow when the diff changes runtime behavior. A small wording, styling, or local cleanup change does not need a behavior diagram.

  1. List the changed behavior scenarios with a stable ID and short title. Include affected state transitions, async ordering, retries, cancellation, event routing, persistence, cleanup, and failure or recovery paths.
  2. For each scenario, select the smallest evidence form that makes the change reviewable: prose for a local path, a module flow for changed ownership or dependencies, a sequence diagram for ordering, or a state diagram for changed transitions or terminal states.
  3. For a fix that changes a flow or state model, provide comparable Before and After diagrams. For a feature, show the resulting flow or state model and explain any replaced behavior.
  4. Cover every listed scenario in the PR body or name it as unverified. Do not silently omit a changed path because a diagram seems optional.
  5. Inspect the evidence against the diff. Keep node names and abstraction level consistent across a Before and After pair.

When a scenario changes state, show the states, triggering events or commands, and terminal or recovery states that the diff affects. When it changes ordering, show the participants and the order of calls, events, retries, or cleanup. Name correlation and idempotency keys when they isolate concurrent work.

Keep diagrams tied to code. Label arrows with calls, events, commands, or data. Identify domain-rule and mutable-state owners. Show external systems, IPC, queues, databases, caches, and configuration when they affect the behavior. Match each alt branch to a code branch. Mark inferred paths as assumptions or open questions.

Boundary and Verification Mapping

Select risks that match the diff. Start with inputs and side effects. Then examine failure, retry, duplicate delivery, concurrency, ordering, authorization, cleanup, migration, and rollback. Reuse the behavior scenario IDs when they connect an invariant to its evidence.

Map each high-risk invariant to existing tests, new tests, CI checks, or an unverified runtime condition. A green CI result proves only that its configured checks passed.

Use a table when the PR has several meaningful edge cases or invariants:

| Invariant or boundary | Failure mode | Protection | Evidence or gap | | --- | --- | --- | --- | | <required behavior> | <how it can fail> | <code or design guard> | <test, runtime evidence, or unverified gap> |

Distinguish verified facts, assumptions, and unverified conditions. Do not write "safe," "fixed," or "backward compatible" without evidence.

Visual Evidence Workflow

  1. Trace the diff to every affected page, window, dialog, route, responsive state, theme, and locale. Shared primitives and global styles can require several consumers, not one representative page.
  2. Record a stable ID and human-readable title for each state. Prefer existing product-owned Vishot scenarios, Histoire stories, routes, and nearby tests.
  3. Use the recorded merge base. Create a detached temporary worktree for that commit. Never switch or overwrite the contributor's active worktree.
  4. Use $use-vishot to capture the same scenario from the merge base and proposed HEAD. It delegates by runtime:
  5. $use-vishot-with-electron for Electron windows.
  6. $use-vishot-with-web for browser routes.
  7. $use-vishot-with-capacitor for Stage Pocket or another Capacitor app.
  8. Use identical scenario definitions, viewports, locale, theme, fixture data, and readiness conditions for both revisions.
  9. Construct explicit Vishot output directories using the repository-owned .vishot/[branch/][group/] convention. Omit the branch segment for the default branch and use a filesystem-safe segment for other branches. Keep capture group and name identical across revisions.
  10. Inspect every image. Reject blank, loading, error, permission, onboarding, or unstable captures unless that is the documented state.
  11. Pair results by stable ID and retain this handoff record:
   id: settings-connection
   title: Settings / Connection
   runtime: web
   viewport: 1440x900
   before: /absolute/repo/.vishot/settings/settings-connection.png
   after: /absolute/repo/.vishot/feat-settings/settings/settings-connection.png

Use before: absent for a new state and after: removed for a deleted state. A capture failure is blocking. Record its reason instead of silently omitting the state.

  1. Upload every local image as a GitHub user asset by invoking $upload-github-attachment while composing the PR.
  2. Put all pairs under ## Visual changes. Put an image row before its component or page name row:
   | Before | After |
   |---|---|
   | ![](before-user-asset-url) | ![](after-user-asset-url) |
   | Settings / Connection | Settings / Connection |
  1. Verify that every user-asset URL matches the intended capture. Follow $upload-github-attachment for upload success criteria. Do not add GET/HEAD probes or block on anonymous 404 responses. Remove temporary worktrees only after upload succeeds. Clear ignored .vishot captures when they are no longer useful locally.

Visual Evidence Contract

Treat Vishot output as ephemeral handoff data. GitHub owns the uploaded copy. The repository must remain free of tracked PR-only images.

If GitHub asset upload is unavailable, stop before you create an incomplete UI PR. Report the local image paths that the PR needs.