link-this-pr-to-issue

link-this-pr-to-issue is a skill for Claude Code, Codex from aiya000/dotfiles. It costs 84 tokens per session (1,774 once invoked), scanned A, original, MIT.

A GitHub procedure for linking a pull request (PR) to an issue, a GitHub task or bug report, by adding a closing phrase such as “Closes #123” to the PR description. Merging the PR can then close the linked issue automatically.

In plain words
What is it for?
Use it to find a PR and its target issue, check whether they are already linked, and add the correct closing reference after the user approves the change.
Why use it?
It keeps the code change and its tracked task connected in GitHub and avoids manually closing the issue after a successful merge. It also requires approval before changing GitHub content.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to find a PR and its target issue, check whether they are already linked, and add the correct closing reference after the user approves the change.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/aiya000/dotfiles/link-this-pr-to-issue
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add aiya000/dotfiles --skill link-this-pr-to-issue
Clone the repo
git clone --depth 1 https://github.com/aiya000/dotfiles

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for link-this-pr-to-issue

README.md
[![agentmods](https://agentmods.dev/badge/skills/aiya000/dotfiles/link-this-pr-to-issue/github.svg)](https://agentmods.dev/skills/aiya000/dotfiles/link-this-pr-to-issue)
Your own site
<a href="https://agentmods.dev/skills/aiya000/dotfiles/link-this-pr-to-issue"><img src="https://agentmods.dev/badge/skills/aiya000/dotfiles/link-this-pr-to-issue/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for link-this-pr-to-issue

Your own site · 80×15
<a href="https://agentmods.dev/skills/aiya000/dotfiles/link-this-pr-to-issue"><img src="https://agentmods.dev/badge/skills/aiya000/dotfiles/link-this-pr-to-issue.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 84 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,774 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00084 $0.01774
Opus 5.5 $0.00034 $0.00710
Sonnet 5.5 $0.00017 $0.00355
Haiku 4.5 $0.00008 $0.00177

Measured 2d ago against content hash 001e53944552, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

link-this-pr-to-issue scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.kiro_global/skills/link-this-pr-to-issue/SKILL.md · 115 lines

How it starts

The opening of the file, as written. The whole thing — 115 lines — stays where its author put it; the contents beside it link to each section on GitHub.

PRをIssueへDevelopmentでリンク

目的

PR本文へclosing keyword(Closes #N 等)を記載し、GitHubの「Development」欄にPRとIssueの相互リンクを確立する。これにより、PRがマージされたときに対象Issueが自動でクローズされる。

GitHubへの書き込み前に、必ず変更内容をユーザーへ提示して明示的な承認を得る。

入力

  • PR番号またはURL。#3797 と 3797 の両形式を受け付ける。省略時は現在のブランチに紐づくPRを使う
  • Issue番号またはURL。省略時はPR本文から推測する(「2. 対象Issueを特定する」参照)
  • 対象リポジトリ。省略時は現在のリポジトリを使う

手順

1. PRを特定する

  1. 対象リポジトリと gh auth status を確認する
  2. PR番号が指定されていない場合は、gh pr view --json number -q .number で現在のブランチに紐づくPR番号を取得する
  3. gh pr view <PR> --json number,title,body,url でPRのタイトル、本文、URLを取得する
  4. PRを特定できない場合は、ユーザーにPR番号またはURLを確認する

2. 対象Issueを特定する

Issue番号が明示されている場合はそれを使う。省略された場合は、PR本文から次のパターンを大文字小文字を区別せず検索する。

  • Close #N、Closes #N、Closed #N
  • Fix #N、Fixes #N、Fixed #N
  • Resolve #N、Resolves #N、Resolved #N
  • Issue: #N、- Issue: #N、関連 Issue: #N などの参照
  1. 1件見つかった場合は、それを対象Issueの候補とする
  2. 複数のIssue番号が見つかった場合は、どれをリンク対象にするかユーザーへ確認する
  3. 1件も見つからない場合は、ユーザーにIssue番号を確認する
  4. 対象番号がIssueであること(PRでないこと)を gh api repos/{owner}/{repo}/issues/<番号> --jq '.pull_request == null' で確認する

3. 既存のリンク状態を確認する

GraphQLでPRの closingIssuesReferences を取得し、対象Issueが既にリンク済みかを判定する。

query($owner:String!,$repo:String!,$num:Int!){
  repository(owner:$owner,name:$repo){
    pullRequest(number:$num){
      closingIssuesReferences(first:50){ nodes{ number title state } }
    }
  }
}
  • 対象Issueが既に closingIssuesReferences に含まれる場合は、リンク済みと報告して終了する(冪等。本文を書き換えない)
  • 含まれない場合は次へ進む

4. PR本文の変更案を組み立てる

対象Issueに対する closing keyword 行を、PR本文へ追加または既存参照から変換する。

  1. closing keyword は原則 Closes #N を使う。ただしIssueをクローズすべきでない場合(親Issueなど複数PRで解決する場合)は、ユーザーに意図を確認し、closing keyword ではなく通常参照(Related to #N)に留める判断を提示する
  2. PR本文に既に対象Issueへの非closing参照(例: - Issue: #N)がある場合は、その行を - Closes #N に置換する
  3. 参照行がない場合は、### 関連するIssue・タスク セクションへ - Closes #N を追記する
  4. 当該セクションが存在しない場合は、既存本文を一切削除せず、本文末尾などの適切な位置に関連Issueの記述を追加する
  5. PR本文の他のセクションは変更しない

5. 差分を提示して承認を得る

次をユーザーへ提示する。

  • 対象PRとIssueの番号・タイトル・URL
  • PR本文の変更箇所(追加行または置換前後の行)だけを抜粋した差分
  • リンクによりPRマージ時にIssueが自動クローズされること(closing keyword を使う場合)

Read the full file on GitHub · 115 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 115 lines · 84 tokens per session scan A 001e53944552

Subscribe to this mod's changes

link-this-pr-to-issue is a skill published in the GitHub repository aiya000/dotfiles (21 stars, last pushed 2d ago), licensed MIT. It adds 84 tokens to every session and 1,774 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-14.

Related

Other skills, from other repositories

autopilot

Carry a well-scoped GitHub issue through the full dev loop autonomously, stopping at a per-run tier boundary (PR-ready, or merge+deploy for small reversible changes).

joshukraine/dotfiles · 40 tokens

autopilot-triage

Vet open issues for autonomous resolution and queue the qualifying ones with the autopilot-queued label — the start-of-day "fill the queue" half of the triage → run split.

joshukraine/dotfiles · 44 tokens

create-pr

Create a pull request with auto-generated description, issue linking, ROADMAP updates, and PR-metadata validation.

joshukraine/dotfiles · 25 tokens

write-ticket-description

Voice guide for writing issue/ticket/task/epic descriptions. Use this skill for ALL issue creation and for every rewrite of an existing issue's body — GitHub issues, Jira tasks, Monday tasks, Linear tasks, and epics. Contains section structure, voice rules, and anti-patterns. Never write ticket descriptions without…

ooloth/dotfiles · 74 tokens

implement-unattended

Take a ticket whose approach and design are already approved through implementation, review and evidence to a draft PR, with nobody watching. Escalates decisions on the ticket and stops rather than choosing.

ooloth/dotfiles · 43 tokens

plan-unattended

Plan a ticket with nobody watching. Three independent discuss runs are reconciled into one approach and three design runs into one design, both are posted on the ticket, and implement-unattended is started in a new tmux window. Escalates on the ticket rather than taking a one-way decision.

ooloth/dotfiles · 65 tokens