# Flaggems PR submit flagos

> Flaggems PR submit flagos is an open-source agent skill for developer tools. Walks an agent through submitting FlagGems operator PRs with automated checks and tests. It is available on Claude Code.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code
- **Website:** https://github.com/flagos-ai/skills/tree/main/skills/flaggems-pr-submit-flagos
- **Repository:** https://github.com/flagos-ai/skills
- **GitHub stars:** 22
- **License:** Apache-2.0
- **Skill name:** flaggems-pr-submit-flagos
- **Collection:** https://github.com/flagos-ai/skills
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-02

## About

This skill guides an agent through the full process of getting a FlagGems operator into the upstream repository. It pulls the kernel, test, benchmark and registration files out of a git worktree, then runs a validation script that checks naming, registration order, dtype handling, device checks and anti-hack rules before any commit is made.

The workflow chains a Python orchestration script that runs pre-commit, local tests and benchmarks, generates a pull request description with speedup data, pushes the branch and opens the PR. A registry helper looks up canonical operator names and writes the PR link back into a spreadsheet. A shell gate can also run before git push as a pre-push hook.

It expects a local FlagGems checkout, a GitHub token, the GitHub CLI, pre-commit and pytest, and a CUDA-capable GPU for benchmarking. Optional environment variables point to the naming and submission spreadsheets and to domestic GPU test data.

## When your agent uses it

> This skill should be used when submitting FlagGems operator PRs, reviewing operator code before submission, preparing operator code for PR, or when the user mentions "提PR", "提交算子", "submit operator", "PR提交", "代码审核", "pre-commit". It automates code review, validates completeness and compliance, runs pre-commit and worktree tests, and directly submits PR to upstream with full description including speedup data.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Runs shell and Python scripts](https://github.com/flagos-ai/skills/tree/HEAD/skills/flaggems-pr-submit-flagos)
- [No network calls found in its scripts](https://github.com/flagos-ai/skills/tree/HEAD/skills/flaggems-pr-submit-flagos)
- [License: Apache-2.0](https://github.com/flagos-ai/skills/tree/HEAD/skills/flaggems-pr-submit-flagos)

## Features

- **Operator code extraction:** Copies the six files for an operator from its worktree into the correct locations in the repository.
- **Automated compliance checks:** Runs a checker covering naming, registration order, dtype hardcoding and device checks.
- **Overload consistency checks:** Verifies that YAML ids, benchmark marks and op names match across overloaded operators.
- **One-step submission pipeline:** Runs pre-commit, tests, benchmarks, commit, push and PR creation in sequence, stopping on failure.
- **Speedup PR descriptions:** Builds a pull request description that includes benchmark speedup data and domestic GPU results.
- **Registry lookup and backfill:** Finds canonical operator names and records the resulting PR link in a tracking spreadsheet.

## Good for

- Submit a new FlagGems operator as a pull request
- Review operator code for FlagGems compliance before submitting
- Check that an overloaded operator's YAML and benchmark entries agree
- Look up the canonical name for an operator before adding it

## Install

### Claude Code

This skill ships in the `flagos-skills` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add flagos-ai/skills
/plugin install flagos-skills@flagos-skills
```

Or copy only this skill to `~/.claude/skills/flaggems-pr-submit-flagos`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/flagos-ai/skills.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/flaggems-pr-submit-flagos &&
cp -R "$tmp/skills/flaggems-pr-submit-flagos" ~/.claude/skills/flaggems-pr-submit-flagos &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/flaggems-pr-submit-flagos` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/flaggems-pr-submit-flagos` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/flagos-ai/skills.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/flaggems-pr-submit-flagos &&
cp -R "$tmp/skills/flaggems-pr-submit-flagos" ~/.agents/skills/flaggems-pr-submit-flagos &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/flaggems-pr-submit-flagos` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/flaggems-pr-submit-flagos` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/flagos-ai/skills.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/flaggems-pr-submit-flagos &&
cp -R "$tmp/skills/flaggems-pr-submit-flagos" ~/.cursor/skills/flaggems-pr-submit-flagos &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/flaggems-pr-submit-flagos` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/flagos-ai/skills.git --path skills/flaggems-pr-submit-flagos
```

Or copy the folder to `~/.gemini/skills/flaggems-pr-submit-flagos` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/flaggems-pr-submit-flagos`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/flagos-ai/skills.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/flaggems-pr-submit-flagos &&
cp -R "$tmp/skills/flaggems-pr-submit-flagos" ~/.copilot/skills/flaggems-pr-submit-flagos &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/flaggems-pr-submit-flagos` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/flagos-ai/skills.git
```

Then copy `skills/skills/flaggems-pr-submit-flagos` into your agent's skills folder as `flaggems-pr-submit-flagos`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What does the skill need to run?

A local FlagGems repository path set in FLAGGEMS_REPO and a GitHub token in GH_TOKEN, plus the GitHub CLI, pre-commit and pytest. Benchmarks need a CUDA GPU.

### When does Flaggems PR submit flagos trigger?

When the user asks to submit an operator PR, review operator code before submission, or prepare code for a PR, or uses phrases such as submit operator or pre-commit.

### Does Flaggems PR submit flagos write code for the operator?

No. The skill states that test and benchmark code must be copied from the worktree unchanged apart from import and formatting adjustments.

### How do I install Flaggems PR submit flagos in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/flaggems-pr-submit-flagos to use it in all your projects, or to .claude/skills/flaggems-pr-submit-flagos in one project. Or install the flagos-skills plugin, which includes it: /plugin marketplace add flagos-ai/skills, then /plugin install flagos-skills@flagos-skills.

### Does Flaggems PR submit flagos run scripts?

Yes. It runs shell and Python scripts. No network calls were found in its scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Flaggems PR submit flagos?

Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.

### What are the best alternatives to Flaggems PR submit flagos?

The closest alternatives to Flaggems PR submit flagos are Flaggems PR review flagos, Kernelgen flagos, Iterate PR, Copilot PR autopilot and Flagship.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Flaggems PR review flagos](https://ai-powered.com/skills/flaggems-pr-review-flagos): Flaggems PR review flagos is an open-source agent skill for developer tools.
- [Kernelgen flagos](https://ai-powered.com/skills/kernelgen-flagos): Kernelgen flagos is an open-source agent skill for developer tools.
- [Iterate PR](https://ai-powered.com/skills/iterate-pr): Iterate PR is an open-source agent skill for developer tools.
- [Copilot PR autopilot](https://ai-powered.com/skills/copilot-pr-autopilot): Copilot PR autopilot is an open-source agent skill for developer tools.
- [Flagship](https://ai-powered.com/skills/flagship): Flagship is an open-source agent skill for developer tools.
- [Install stack flagos](https://ai-powered.com/skills/install-stack-flagos): Install stack flagos is an open-source agent skill for developer tools.
- [PR report](https://ai-powered.com/skills/pr-report): PR report is an open-source agent skill for developer tools.
- [GitHub workflow](https://ai-powered.com/skills/github-workflow): GitHub workflow is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/flaggems-pr-submit-flagos
