prep-pr-close-keyword-auto-closes-issue

prep-pr-close-keyword-auto-closes-issue is a skill for Claude Code from wan-huiyan/agent-traffic-control. It costs 493 tokens per session (5,593 once invoked), scanned A, original, MIT.

A workflow for preventing GitHub from closing an issue when a preparation or documentation pull request contains words such as “closes #N” or “fixes #N”. GitHub treats those phrases as automatic close instructions when the pull request is merged.

In plain words
What is it for?
Checking pull request titles and bodies for automatic-close phrases, diagnosing prematurely closed issues, and rewriting preparation pull requests so they do not close work that has not been done.
Why use it?
It prevents planning documents, prompts, and architecture notes from falsely indicating that implementation work is complete. This keeps the issue list and project history accurate.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter. Also seen: mentions Claude Code.

Part of the agent-traffic-control plugin — 105 skills shipped together

Good fit Checking pull request titles and bodies for automatic-close phrases, diagnosing prematurely closed issues, and rewriting preparation pull requests so they do not close work that has not been done.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/wan-huiyan/agent-traffic-control/prep-pr-close-keyword-auto-closes-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 wan-huiyan/agent-traffic-control --skill prep-pr-close-keyword-auto-closes-issue
Clone the repo
git clone --depth 1 https://github.com/wan-huiyan/agent-traffic-control

Made for: Claude Code.

Or install agent-traffic-control, the plugin that ships this one along with the rest of its 105 skills.

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 prep-pr-close-keyword-auto-closes-issue

README.md
[![agentmods](https://agentmods.dev/badge/skills/wan-huiyan/agent-traffic-control/prep-pr-close-keyword-auto-closes-issue/github.svg)](https://agentmods.dev/skills/wan-huiyan/agent-traffic-control/prep-pr-close-keyword-auto-closes-issue)
Your own site
<a href="https://agentmods.dev/skills/wan-huiyan/agent-traffic-control/prep-pr-close-keyword-auto-closes-issue"><img src="https://agentmods.dev/badge/skills/wan-huiyan/agent-traffic-control/prep-pr-close-keyword-auto-closes-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 prep-pr-close-keyword-auto-closes-issue

Your own site · 80×15
<a href="https://agentmods.dev/skills/wan-huiyan/agent-traffic-control/prep-pr-close-keyword-auto-closes-issue"><img src="https://agentmods.dev/badge/skills/wan-huiyan/agent-traffic-control/prep-pr-close-keyword-auto-closes-issue.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 493 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,593 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.00493 $0.05593
Opus 5 $0.00246 $0.02797
Sonnet 5 $0.00099 $0.01119
Haiku 4.5 $0.00049 $0.00559

Measured 6d ago against content hash 7e62d0464be3, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

prep-pr-close-keyword-auto-closes-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 6d 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.

plugins/agent-traffic-control/skills/prep-pr-close-keyword-auto-closes-issue/SKILL.md · 428 lines

How it starts

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

Prep PR close-keyword auto-closes issue prematurely

Problem

You wrote a docs-only PR shipping a paste-ready prompt / implementation plan / ADR proposal / scaffolding for future work on issue #N. The PR title looked like:

docs(s171): next-session prompt — backfill historical sf_converted (closes #672)

or the PR body opened with:

Paste-ready S171 prompt for the historical sf_converted backfill that pre-empts Q3 2026 calibration retrain. Closes-ready for issue #672 (P1).

The PR squash-merged cleanly. Hours or days later, someone (you or the next session) starts executing the prompt. They run gh issue view 672 and find:

{"closed":true,"closedAt":"2026-05-11T11:27:12Z","stateReason":"COMPLETED"}

But the work hasn't run yet. The issue closed because GitHub's keyword parser treated closes #672 in the prompt PR's title/body as a close-keyword and fired at merge time — even though the merged diff was a docs-only handoff file, not the implementation.

This silently misrepresents repo state. Stakeholders asking "what's left?" get a falsely-clean issue list. Future audits ("we shipped #672 — where's the postmortem?") chase ghosts.

Context / Trigger Conditions

Use this skill when ANY of these hold:

  1. Discovery (after the fact): gh issue view <N> --json state,closedAt,stateReason shows CLOSED, but you have direct evidence (a worktree branch, a prompt doc, a session handoff) that the implementation hasn't run.

  2. Pre-flight check at execution time: A fresh session is asked to execute the work for issue #N, and the issue already shows CLOSED. The prompt itself is what closed it.

  3. Pattern-matching the closing PR: gh api repos/<O>/<R>/issues/<N>/timeline --jq '.[] | select(.event=="closed") | .commit_id' resolves to a commit whose PR (gh pr view <M> --json files,title) touches only docs/handoffs/, docs/plans/, docs/decisions/, docs/specs/, or docs/proposals/ paths.

  4. Authoring a non-implementation PR: You're ABOUT to open a PR shipping a prompt, plan, ADR, handoff, or scaffolding doc, and the title or body currently contains a close-keyword (closes, fixes, resolves + tense variants: closed, closing, fixed, fixing, resolved, resolving) followed by an issue reference. STOP — this is the trap.

Read the full file on GitHub · 428 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. 6d ago First seen · 428 lines · 493 tokens per session scan A 7e62d0464be3

Subscribe to this mod's changes

prep-pr-close-keyword-auto-closes-issue is a skill published in the GitHub repository wan-huiyan/agent-traffic-control (3 stars, last pushed 6d ago), licensed MIT. It adds 493 tokens to every session and 5,593 once invoked, about $0.0025 per session on Opus 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-09-05.

Related

Other skills, from other repositories

missive

Invoke only when spawning a quest from a GitHub issue reference. Fetches GitHub issue context for quest spawning. Parses issue references, retrieves structured data via gh, and produces branch suggestions and PR keywords. Used standalone or as input to quest orchestration.

justinjdev/fellowship · 54 tokens

start-task

Bootstrap a task into a synced feature branch — one shot, zero confirmations. Detects the source from the args: GitHub issue ('#100', 'issue 100', 'gh issue 100', or bare '100'), Jira key ('PROJ-42'), or a local spec file path; ad-hoc conversation otherwise. Fetches the task, derives {type}/{number}/{slug}, syncs the…

foyzulkarim/skills · 125 tokens

catchup

Summarize and review what changed while you were away. Use after a weekend, vacation, or flight to check missed PRs, git commits, Linear tickets, and meetings — one prioritized brief, not a firehose.

oliver-kriska/claude-elixir-phoenix · 48 tokens

cloudflare-workers-ci-cd

Complete CI/CD guide for Cloudflare Workers using GitHub Actions and GitLab CI. Use for automated testing, deployment pipelines, preview environments, secrets management, or encountering deployment failures, workflow errors, environment configuration issues.

secondsky/claude-skills · 50 tokens

jira

Jira integration — view issues, generate branches, create tickets, transition status. Use when: user mentions Jira ticket key (XX-123), says /jira, wants to create branch from ticket, create a new ticket, or update Jira status. Not for: GitHub issues (use issue-analyze).

sd0xdev/sd0x-harness · 64 tokens

pm-planning

Decomposition methodology for pm agent — turns an approved ARCH document into a Beads task list with explicit dependencies, time-boxes, and acceptance criteria. The pipeline can only orchestrate work it can see; this skill defines what "seeable work" looks like.

avelikiy/great_cto · 57 tokens