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/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.
<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="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.02873 |
| Opus 5.5 | $0.00011 | $0.01149 |
| Sonnet 5.5 | $0.00006 | $0.00575 |
| Haiku 4.5 | $0.00003 | $0.00287 |
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 3d 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},读取 <task-workspace>/active/{task-id}/task.md 获取任务信息(例如 platform_issue_identity、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.
- 3d ago Changed 5b6957df9c7f
- 6d ago Changed 8af21ef46cb1
- 9d ago Changed 7d2a3445c68d
- 24d ago Changed e1f66b17b973
- 1mo ago Changed 5d2eb733bff2
- 1mo ago Changed 583d2d83c9b4
- 1mo ago Changed cbeabf2916ab
- 1mo ago Changed · -2 lines 7a840c95fa20
- 1mo 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 (86 stars, last pushed yesterday), licensed MIT. It adds 28 tokens to every session and 2,873 once invoked, about $0.0001 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-08-30.
Other skills, from other repositories
autofix-pr
Watch a pull request and fix it from a worktree of its own - CI failures, review feedback from trusted authors and merge conflicts are fixed, pushed to the PR branch and answered on the PR under the user's git and gh identity. Usage - /autofix-pr [ | ] [--once] [--every ] [--no-reply] [--yes] [instructions]…
gh-find-prs
Survey open Codewhale PRs and triage each for mergeability and disposition against the real landing branch.
hunk-release
Prepares, publishes, verifies, and curates Hunk releases. Use for release metadata, benchmarks, tags, publishing, release videos, backports, or recovery.
git
Git and code hosting platform management — GitHub, GitLab, Codeberg, Forgejo. Zero barrier — install x-cmd and manage repos from the terminal. Use for "git", "github", "gitlab", "repo", "pull request", "code hosting".
vhs-e2e-gif
Record a test run, a TUI session, or any terminal command as a GIF with VHS and attach it to a GitHub PR as a release-hosted asset, never a repo commit. Use when asked to record an e2e run, demo a fix on a PR, attach a GIF or screen recording to a pull request, show a test passing visually, or produce a terminal…
agent-debug-ci
Investigate failed scheduled or nightly GitHub Actions runs on the default branch, determine whether the failure is reproducible and repository-owned, implement the smallest evidence-backed fix, validate it, and open a pull request. Use when a failed nightly CI event starts an agent, or when the standard CI or…