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.
curl -O https://raw.githubusercontent.com/fitlab-ai/agent-infra/main/.agents/skills/create-pr/SKILL.mdgit clone --depth 1 https://github.com/fitlab-ai/agent-infraWrote 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.
[](https://agentmods.dev/skills/fitlab-ai/agent-infra/create-pr)<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>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.
| Model | Per session | Once 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 |
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.
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.
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_created、pr_reused 或 no_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.json 的 prFlow 字段(三态:字段缺省 = 默认推荐 PR、允许跳过;"required" = 强制 PR;"disabled" = 强制无 PR)。
按读取结果分支:
- 缺省 /
"required"→ 继续到下方第 1 步 "disabled"→ 输出以下消息后立即停止,不要执行任何后续编号步骤、不要触发任何 PR 创建命令、不要修改task.md的pr_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_number、type 等)。
如果未提供,可从当前 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 的全部提交。
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.
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.
- 2d ago Changed cbeabf2916ab
- 3d ago Changed · -2 lines 7a840c95fa20
- 7d ago First seen · 156 lines · 28 tokens per session scan A c26734dade92
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.
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.
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…
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.
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.
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.
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.