agent-infra: Skill for Claude Code

.agents/skills/refine-title/SKILL.md

refine-title is a skill for Claude Code, Codex from fitlab-ai/agent-infra. It costs 38 tokens per session (869 once invoked), scanned A, original, MIT.

A skill for rewriting issue and pull-request titles in Conventional Commits format, a standard such as `feat(area): add export` that labels the kind of change.

In plain words
What is it for?
Use it to inspect an issue or pull request, infer its change type and scope, suggest a new title, and apply it after confirmation.
Why use it?
It gives inconsistent or vague titles a consistent structure that makes changes easier to scan and classify.

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/refine-title/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 refine-title

README.md
[![agentmods](https://agentmods.dev/badge/skills/fitlab-ai/agent-infra/refine-title/github.svg)](https://agentmods.dev/skills/fitlab-ai/agent-infra/refine-title)
Your own site
<a href="https://agentmods.dev/skills/fitlab-ai/agent-infra/refine-title"><img src="https://agentmods.dev/badge/skills/fitlab-ai/agent-infra/refine-title/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 refine-title

Your own site · 80×15
<a href="https://agentmods.dev/skills/fitlab-ai/agent-infra/refine-title"><img src="https://agentmods.dev/badge/skills/fitlab-ai/agent-infra/refine-title.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 869 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00038 $0.00869
Opus 5 $0.00019 $0.00434
Sonnet 5 $0.00008 $0.00174
Haiku 4.5 $0.00004 $0.00087

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

Security

Grade A, and why

refine-title 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 10d 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.

.agents/skills/refine-title/SKILL.md · 86 lines

What it actually says

重构标题

基于深度内容分析,将指定 Issue 或 PR 的标题重构为 Conventional Commits 格式。

执行流程

1. 识别目标并获取信息

执行前先读取 .agents/rules/issue-pr-commands.md,并按其中的前置步骤完成认证和代码托管平台检测。

尝试判断 ID 是 Issue 还是 PR:

  • 先按规则文件中的“读取 Issue”命令获取 Issue 信息
  • 如果未找到或目标实际为 PR,再按规则文件中的“读取 PR”命令获取 PR 信息

2. 分析内容

基于获取的数据:

确定 Type

  • 阅读 body 以寻找变更类型指示
  • 检查标签(例如 type: bug -> fixtype: feature -> feat
  • 如果是 PR,分析文件(仅文档变更 -> docs,仅测试 -> test

确定 Scope

  • 阅读 body 以寻找模块提及
  • 检查标签中的模块指示
  • 如果是 PR,分析文件路径以推断受影响的模块

生成 Subject

  • 忽略原始标题(避免偏见)- 从 body 中提取核心意图
  • 保持简洁(不超过 50 字符),使用内容原始语言(中文内容用中文,英文内容用英文),末尾无句号

3. 展示建议

Issue/PR #{id} 分析结果:

当前标题:{原始标题}
--------------------------------------------------
分析:
- 意图:{从 body 提取的一行摘要}
- 类型:{type}(依据:{依据})
- 范围:{scope}(依据:{依据})
--------------------------------------------------
建议标题:{type}({scope}): {subject}

询问用户:"是否应用此标题?(y/n)"

4. 应用修改

如果用户确认:

  • 对于 Issue:按 .agents/rules/issue-pr-commands.md 中的 “Issue 更新” 命令设置标题
  • 对于 PR:按 .agents/rules/issue-pr-commands.md 中的 “PR 更新” 命令设置标题

标题修改前调用 agent-infra-internal platform-context resolve 取得 upstream 与 capabilities,再按 .agents/rules/issue-pr-commands.md 的 Issue metadata intent 契约执行;无权限时跳过修改操作并告知用户。

5. 告知用户

渲染下一步前先读取 .agents/rules/next-step-output.md;如需展示下一步客户端命令,按当前任务阶段调用统一 helper。

如果修改了 Issue 标题,提示无需额外同步命令;后续按任务当前阶段继续执行对应工作流技能。

如果修改了 PR 标题,提示 create-pr 已内联发布 reviewer 摘要,无需额外同步命令;后续按任务当前阶段继续执行对应工作流技能。

如果因权限不足跳过了标题修改,额外提示用户建议标题仍可手动应用到代码托管平台页面。

优势

本技能的优势:

  1. 修复误导性标题:即使原始标题是"Help me",也能读取 body 并生成合适的标题,如 fix(core): 修复启动错误fix(core): resolve startup error
  2. 精确 scope:通过分析 PR 文件变更,可以自动推断正确的 scope,无需手动指定

注意事项

  • subject 应从 body 内容提取,而不是从原始标题重新格式化
  • 如果 body 为空或信息不足,向用户询问澄清
  • 遵循项目对 scope 命名的约定
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. 10d ago First seen · 86 lines · 38 tokens per session scan A 41bd11edfba3

Subscribe to this mod's changes

refine-title is a skill published in the GitHub repository fitlab-ai/agent-infra (83 stars, last pushed today), licensed MIT. It adds 38 tokens to every session and 869 once invoked, about $0.0002 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.