agent-infra: Skill for Claude Code

.agents/skills/create-pr/SKILL.md

create-pr is a skill for Claude Code, Codex from fitlab-ai/agent-infra. It costs 28 tokens per session (2,769 once invoked), scanned A, original, MIT.

A workflow for creating a pull request on a code-hosting platform. A pull request is a request for others to review and merge a set of committed code changes into a target branch.

In plain words
What is it for?
Use it after committing and pushing changes when they need review, task metadata, reviewer information, or connection to an existing task.
Why use it?
It checks that the correct branch and commit are available remotely before opening or linking the review request. This reduces the risk of reviewing the wrong code.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

This is fitlab-ai/agent-infra's own configuration. It tells Claude Code and Codex how to work on agent-infra itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything agent-infra configures →

Reuse

Borrowing it

Nothing to install: this file belongs to fitlab-ai/agent-infra. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/fitlab-ai/agent-infra/main/.agents/skills/create-pr/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/fitlab-ai/agent-infra

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 create-pr

README.md
[![agentmods](https://agentmods.dev/badge/skills/fitlab-ai/agent-infra/create-pr.svg)](https://agentmods.dev/skills/fitlab-ai/agent-infra/create-pr)
Your own site
<a href="https://agentmods.dev/skills/fitlab-ai/agent-infra/create-pr"><img src="https://agentmods.dev/badge/skills/fitlab-ai/agent-infra/create-pr.svg" alt="Measured on agentmods" height="20"></a>
Per session 28 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,769 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.00028 $0.02769
Opus 5 $0.00014 $0.01385
Sonnet 5 $0.00006 $0.00554
Haiku 4.5 $0.00003 $0.00277

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

Security

Grade A, and why

create-pr 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.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/change-report.mjs), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

.agents/skills/create-pr/SKILL.md · 154 lines

How it starts

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

创建 Pull Request

--agent 取值见 .agents/rules/task-management.md「合作者 token 规范」。

创建 Pull Request,并在与任务关联时立即补齐核心元数据和 reviewer 摘要。

platform-pr create 返回唯一的 result / warnings 字段;成功结果为 pr_createdpr_reusedno_op,同步降级时为对应的 _with_warnings 结果(包括 no_op_with_warnings)。创建前必须证明任务分支已推送,远端 branch SHA 与本地预期 HEAD 一致;缺失、漂移、PR head SHA 不一致或 bind 前竞态都属于 hard failure,不得用 warning 继续绑定。

行为边界 / 关键规则

版本戳规则:创建或更新 task.md frontmatter 时,先读取 .agents/rules/version-stamp.md,并写入或刷新 agent_infra_version

任务上下文解析

入口可省略 task ref;显式 task scope 仅接受 --task <ref>-t <ref>,不再解释位置 task ref。保留其余业务操作数后调用 agent-infra-internal task-context resolve {task-scope}{task-scope} 为空或 task flag 之一。只读取结构化结果的 taskId,后续把 {task-id} 绑定为完整 TASK-YYYYMMDD-HHMMSS。解析失败时透传非零退出码,不自行扫描任务。

步骤开始:started 标记

真实执行 platform-pr create 时由 typed core 在远端写入前幂等登记 Create PR [started];dry-run 不登记。调用方不得重复手写该条目。

执行流程

前置门控:项目级 PR 流程检查

门控读取(项目级 PR 流程策略):在执行编号步骤前,读取 .agents/.airc.jsonprFlow 字段(三态:字段缺省 = 默认推荐 PR、允许跳过;"required" = 强制 PR;"disabled" = 强制无 PR)。

按读取结果分支:

  • 缺省 / "required" → 继续到下方第 1 步
  • "disabled" → 输出以下消息后立即停止,不要执行任何后续编号步骤、不要触发任何 PR 创建命令、不要修改 task.mdpr_delivery_fact、不要发布 PR 摘要评论:

使用 agent-infra-internal agent-client next-steps --skill complete-task --task-ref {task-ref} 生成本场景的 {next-step-commands}

当前项目未启用 PR 流程(`.agents/.airc.json` 中 `prFlow: "disabled"`)。
无需创建 Pull Request,请直接运行:
{next-step-commands}

1. 解析命令参数

先解析 task scope:可选的 --task <ref>-t <ref> 绑定 {task-id};位置 task ref 不再解释。剩余的可选位置参数绑定为 {target-branch}

如果提供了 {task-id},读取 .agents/workspace/active/{task-id}/task.md 获取任务信息(例如 issue_numbertype 等)。 如果未提供,可从当前 session 上下文获取;仍无法确定 {task-id} 时,后续步骤中的任务关联逻辑跳过。

2. 确定目标分支

如果用户显式提供参数就直接使用;否则根据 Git 历史和分支拓扑自动推断。

详细分支判断规则见 reference/branch-strategy.md。自动推断 base 分支前,先读取 reference/branch-strategy.md

3. 准备 PR 正文

通过 .agents/rules/issue-pr-commands.md 读取 PR 模板,参考最近合并的 PR 风格,并收集 <target-branch>HEAD 的全部提交。

Read the full file on GitHub · 154 lines

Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 Changed cbeabf2916ab
  2. 3d ago Changed · -2 lines 7a840c95fa20
  3. 7d ago First seen · 156 lines · 28 tokens per session scan A c26734dade92

Subscribe to this mod's changes

create-pr is a skill published in the GitHub repository fitlab-ai/agent-infra (83 stars, last pushed yesterday), licensed MIT. It adds 28 tokens to every session and 2,769 once invoked, about $0.0001 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-08-30.

Related

Other skills, from other repositories

agentplane-task-closure-recovery

Use when Agentplane task completion, direct finish, branchpr integration, hosted-close, close-tail PRs, PR metadata, dirty task artifacts, or remote branch divergence need diagnosis or recovery.

basilisk-labs/agentplane · 46 tokens

argot-setup

Set argot up for a repository end to end — audit its history, decide what should shape its voice, fit, verify the fit actually catches things, tune the rules its own history says are noisy, and wire the places it runs (pre-write hook, pre-commit, MCP, CI). One sitting, one decision at a time, each proposed with the…

get-tmonier/argot · 129 tokens

detect-task

Internal skill for commands. Detect the active task (any tracker adapter) from the task-state file / git branch name. Do not trigger on user conversation - only when commands need task detection.

restarter/lets-workflow · 41 tokens

take-task

A workflow for claiming a tracker task and preparing the development branch for it. It verifies the task, marks it as in progress, checks for uncommitted changes, and handles branch setup according to the task state.

restarter/lets-workflow · 76 tokens

loop-bb-pr

A command that prepares a repeating check for a Bitbucket pull request. A pull request is a request to review and merge code changes into a project.

restarter/lets-workflow · 118 tokens

commit

A guided process for committing code changes to Git. It checks the working tree, follows a conventional commit format, links a task when available, reviews the changes, and asks for approval.

restarter/lets-workflow · 90 tokens