flaggems-pr-submit-flagos

flaggems-pr-submit-flagos is a skill for Claude Code from flagos-ai/skills. It costs 100 tokens per session (2,829 once invoked), scanned A, original, Apache-2.0.

A workflow for preparing and submitting FlagGems operator code changes as pull requests, which are proposed code updates for review. It checks naming, files, tests, formatting, and other project rules before submission.

In plain words
What is it for?
Use it to review operator code, run validation and pre-commit checks, prepare a branch, generate a pull-request description, push the changes, create the pull request, and record its link.
Why use it?
It reduces the chance that an operator change is rejected because required files, checks, naming, or project conventions are missing. It also keeps the submission steps consistent.

Skill for Claude Code

Written for Claude Code: PreToolUse hook event.

Part of the flagos-skills plugin — 13 skills shipped together

Good fit Use it to review operator code, run validation and pre-commit checks, prepare a branch, generate a pull-request description, push the changes, create the pull request, and record its link.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/flagos-ai/skills/flaggems-pr-submit-flagos
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 flagos-ai/skills --skill flaggems-pr-submit-flagos
Clone the repo
git clone --depth 1 https://github.com/flagos-ai/skills

Made for: Claude Code.

Or install flagos-skills, the plugin that ships this one along with the rest of its 13 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 flaggems-pr-submit-flagos

README.md
[![agentmods](https://agentmods.dev/badge/skills/flagos-ai/skills/flaggems-pr-submit-flagos/github.svg)](https://agentmods.dev/skills/flagos-ai/skills/flaggems-pr-submit-flagos)
Your own site
<a href="https://agentmods.dev/skills/flagos-ai/skills/flaggems-pr-submit-flagos"><img src="https://agentmods.dev/badge/skills/flagos-ai/skills/flaggems-pr-submit-flagos/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 flaggems-pr-submit-flagos

Your own site · 80×15
<a href="https://agentmods.dev/skills/flagos-ai/skills/flaggems-pr-submit-flagos"><img src="https://agentmods.dev/badge/skills/flagos-ai/skills/flaggems-pr-submit-flagos.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 100 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,829 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.00100 $0.02829
Opus 5 $0.00050 $0.01414
Sonnet 5 $0.00020 $0.00566
Haiku 4.5 $0.00010 $0.00283

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

Security

Grade A, and why

flaggems-pr-submit-flagos 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.

The scan reads SKILL.md. This mod also ships 7 executable files (scripts/check_operator.py, scripts/check_overload_consistency.py, scripts/extract_from_worktree.py, …), 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.

skills/flaggems-pr-submit-flagos/SKILL.md · 185 lines

How it starts

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

FlagGems 算子 PR 提交 Skill

提交流程:规范名查询 → 建分支 → 提取 worktree 代码(6文件) → 脚本验证 → pre-commit → push → 创建 PR → 回填链接。

Rules(违反会导致 PR 被拒)

25+ 项检查已由 check_operator.py 自动执行(详见下方检查表),以下仅列出模型需主动注意的规则。

流程规则

  1. 先跑脚本再 commitcheck_operator.py --strict 必须 0 errors
  2. 使用规范命名 — 提交前用 operator_registry.py lookup 查询
  3. 回填 PR 链接 — PR 创建后必须 operator_registry.py backfill
  4. PR 描述由脚本生成gen_pr_description.py 输出 JSON,映射到模板(英文)

代码规则

  1. 代码必须与 worktree 原版一致 — 不允许重写测试逻辑,仅允许 import 调整和格式化
  2. 不删 worktree 现有注释
  3. 下划线命名 — 前导 _ 的算子,mark/yaml id/文件名去掉下划线,其余保留(详见 references/naming.md
  4. dtype 默认用常量 — test 用 utils.FLOAT_DTYPES,benchmark 用 consts.FLOAT_DTYPES;CUDA 不支持时可硬编码但必须加注释
  5. 非 pointwise benchmark — 简单场景用 GenericBenchmark(input_fn=...);需要自定义 shape 时继承并覆盖 set_shapes
  6. hardcode size 需加注释 — kernel BLOCK、test shapes、benchmark shapes 都需注释说明原因
  7. 不支持的 dtype 在 wrapper 加 assert
  8. overloaded ops yaml 拆成独立条目 — 参考 eq / eq_scalar 模式
  9. 禁止 .is_cuda — 设备判断使用 flag_gems.device,不用 .is_cudadevice.type == "cuda"(多后端)
  10. Autotune 配置放 config 文件 — 不在 kernel 中内联硬编码 autotune configs
  11. Logger 格式logger.debug("GEMS <OP_NAME_UPPER>"),不用其他格式
  12. Fused 算子放 fused/ 目录src/flag_gems/fused/,不放 src/flag_gems/ops/

提交规则

  1. 不修改上游已有测试 — 只新增,不改已有函数
  2. 先提交通用版,再提交特化版
  3. 概率算子用统计验证 — mean ≈ p,不能只查 0/1
  4. nan 比较用 gems_assert_close(equal_nan=True)

Read the full file on GitHub · 185 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. 10d ago First seen · 185 lines · 100 tokens per session scan A 4aeccf448c9c

Subscribe to this mod's changes

flaggems-pr-submit-flagos is a skill published in the GitHub repository flagos-ai/skills (19 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 100 tokens to every session and 2,829 once invoked, about $0.0005 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.