Agent skill

Gen Plan

by alibaba in alibaba/atrex-kernel-agent

Generate a structured implementation plan from an evidence draft.

MITAuto-check passedAgent Workflows

Install Gen Plan

skills CLI
$ npx skills add alibaba/atrex-kernel-agent --skill gen-plan -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install alibaba/atrex-kernel-agent gen-plan --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/alibaba/atrex-kernel-agent.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/gen-plan .claude/skills/gen-plan && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
gen-plan
GitHub stars
161
Token cost
~3.4k tokens
SKILL.md length
1,757 words
Files
9 (incl. scripts)
Skills in repo
7
Repo updated
First seen
Licence
MIT

At a glance

Generate a structured implementation plan from an evidence draft.

  • Works in 6 steps: Validate input and output → Check relevance → Analyze the draft → …
  • Tasks that involve Planning
  • SKILL.md covers Arguments, Episode mode, Hard boundaries and Workflow, plus 2 more sections
  • Runs Shell and Python scripts from its folder; calls bash

What it does

Gen Plan is an agent skill from alibaba/atrex-kernel-agent. Generate a structured implementation plan from an evidence draft. Validate paths, obtain configured independent Codex and Qoder reviews, synthesize available advice against repository evidence, preserve the draft, and produce testable acceptance criteria and validation steps.

Its SKILL.md is about 3.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 10 other files, including scripts (for example `scripts/ask-codex.sh`, `scripts/ask-qoder.sh` and `scripts/ask-reviewers.sh`).

It sits in Agent Workflows, covering Planning and User stories. The repository describes itself as: An end-to-end agent project for GPU kernel implementation, analysis, profiling, and iterative optimization. It helps an agent turn PyTorch logic or an existing kernel into a… The licence is MIT.

When your agent uses it

  • Tasks that involve Planning
  • Tasks that involve User stories

Example prompts

  • “/gen-plan”

Requirements

  • Python 3
  • A Bash shell

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Validate input and output
  2. Check relevance
  3. Analyze the draft
  4. Obtain configured independent reviews
  5. Synthesize available reviews and generate the plan
  6. Review and write

What it can do on your machine

Read from SKILL.md and the folder at commit 3d27c1e. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 5 files in scripts/ (Shell and Python), which the agent can run.

    Shell commands in SKILL.md call:

    • bash

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Gen Plan loads about 3.4k tokens when it runs. Until then it costs about 71 tokens; SKILL.md has 1,757 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~71
When it runs · the whole SKILL.md, loaded when a task matches
~3.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from alibaba/atrex-kernel-agent at commit 3d27c1e, republished under its MIT licence (© alibaba). 1,757 words, ~3,422 tokens.

Download SKILL.mdSave it as .claude/skills/gen-plan/SKILL.md (or your agent's skills folder). This skill also uses 8 other files; get the full folder from GitHub.
name
gen-plan
description
Generate a structured implementation plan from an evidence draft. Validate paths, obtain configured independent Codex and Qoder reviews, synthesize available advice against repository evidence, preserve the draft, and produce testable acceptance criteria and validation steps.

Generate Plan

This repository-native skill is adapted from the gen-plan flow in PolyArch Humanize. It turns an episode draft into a complete implementation plan without modifying source code or starting the implementation.

Arguments

  • --input <path>: required draft document.
  • --output <path>: required new plan document.
  • --direct: generate a one-shot plan without asking questions.
  • --discussion: ask for decisions that materially change the plan. This is the default when no mode is supplied.

--direct and --discussion are mutually exclusive.

Episode mode

Python supplies ATREX_EPISODE_MODE (default: full). Fast/full plans must contain exactly one coherent optimization category. Goal plans may cover multiple evidence-backed directions, including interacting algorithm, layout, and kernel changes; validate the combined result. The campaign selects the mode and reviewer configuration. Both reviewers default off for V1, fast episodes, and full episodes. Enable the desired reviewer with the stage-specific --v1-ask-*, --fast-episode-ask-*, or --full-episode-ask-* flag. When invoking the shell helpers outside a campaign, explicitly set ATREX_PLAN_REVIEW_CODEX_ENABLED=1 or ATREX_PLAN_REVIEW_QODER_ENABLED=1 to enable that reviewer; otherwise it stays disabled.

Hard boundaries

  • During this workflow, persist only the requested plan file. Consultation helpers may use automatically removed process scratch for isolation.
  • Do not edit source, run implementation tasks, create commits, or start another workflow.
  • Enabled ask_codex and ask_qoder consultations are read-only. They are non-persistent by default; an explicitly configured long Codex or Qoder reviewer session remains read-only and campaign-private. Give every enabled reviewer the same candidate proposal and bounded evidence packet, isolate both from the project, and disable Qoder tools.
  • Preserve every requirement, constraint, measurement, search result, and rejected direction from the draft. The structured plan must be a superset of the draft.
  • Keep the original draft verbatim at the bottom of the plan between the template markers.

Workflow

Execute these phases sequentially.

1. Validate input and output

From the campaign workspace, run:

bash
bash skills/gen-plan/scripts/validate-gen-plan-io.sh \
  --input <input> --output <output> <mode>

Stop on a nonzero exit. The script reports the resolved input, output, template, and mode. It never creates the output file.

2. Check relevance

Read the draft and quickly inspect the workspace README, goal, current kernel, prior memory, and any paths named by the draft. Reject only a draft that is clearly unrelated to this repository. Be lenient with informal drafts and mixed languages.

3. Analyze the draft

Build an evidence-to-action chain:

  1. Identify the measured bottleneck or failure.
  2. Connect the evidence to a concrete inference.
  3. Select exactly one coherent optimization category for fast/full, or an evidence-backed roadmap for goal.
  4. Identify the smallest concrete file changes that test that inference.
  5. Define correctness, performance, rollback, and stop conditions.

Before consulting either reviewer, populate skills/gen-plan/templates/candidate-proposal-template.md in automatically removed process scratch. This frozen candidate proposal is not the final plan. It must state the selected evidence-to-action chain, the episode mode and permitted optimization categories, target paths and symbols, the expected mechanism, scope constraints, rejected directions, validation and falsification conditions, and unresolved assumptions. Do not persist the candidate proposal in the campaign workspace.

Check the draft for unclear scope, contradictions, missing dependencies, infeasible changes, and quantitative targets. Treat numeric performance targets as trends unless the draft explicitly marks them as hard acceptance thresholds.

In direct mode, make conservative assumptions and record unresolved material choices under Pending Decisions; do not pause for questions. In discussion mode, ask only questions whose answers materially change scope, correctness, or acceptance.

4. Obtain configured independent reviews

The campaign independently configures Codex and Qoder for fast and full episodes. It probes a reviewer only when that reviewer is first enabled for the current episode mode, then caches the availability decision in private runtime state. A reviewer disabled by configuration or by its availability probe must not be retried; retain the helper's disabled status and recorded reason. Campaign restarts reuse cached availability decisions.

After completing the initial analysis, freeze one evidence packet and use the bundled review helper before finalizing the plan direction. Give every enabled reviewer the candidate proposal, original draft, and the same small set of directly relevant text files, normally README.md, kernel.py, the latest canonical memory entry, and source or profile summaries cited by the draft. The candidate is the primary review target; the draft and context are evidence for testing its claims. Never include credentials, raw secrets, unrelated files, or large binary profile artifacts.

bash
bash skills/gen-plan/scripts/ask-reviewers.sh \
  --input <input> \
  --proposal <temporary-candidate-proposal> \
  --context README.md \
  --context kernel.py

--proposal is required and must name the non-empty frozen candidate proposal in process scratch. Add other --context arguments only when they materially affect the plan. The helper starts the enabled external reviewers concurrently so neither can see or anchor on the other's response. When proposal, draft, and context would exceed Qoder's five-attachment limit, the helper folds all context files into one labeled temporary bundle and gives that identical bundle to every enabled reviewer. Do not manually remove evidence or issue a second full review call. For an eligible transient failure, the helper retries only the failed reviewer once; it does not rerun a successful reviewer and does not retry quota, authentication, timeout, disabled, or missing-CLI failures. Enabled external reviewer processes always use maximum reasoning effort; episode/session settings, reviewer effort environment variables, and legacy --reasoning-effort arguments cannot lower it. By default each external review is ephemeral. --long-reviewer-session codex or --long-reviewer-session qoder resumes one campaign-private, read-only reviewer thread across episodes while continuing to send the complete current candidate proposal, draft, and bounded context on every call. Long Claude reviewer sessions are not implemented and fail explicitly. Session state lives under .atrex_long_horizon/ and must never enter a candidate commit. Because qodercli only resolves resumable sessions within the current working directory's project, a persistent Qoder reviewer runs from a dedicated directory alongside its state file, which also keeps it isolated from the candidate project. Each review returns its backend-specific summary marker followed by the same five assessment sections:

  • CODEX_SUMMARY or QODER_SUMMARY
  • RISKS
  • MISSING_REQUIREMENTS
  • DIRECTION_RECOMMENDATIONS
  • VALIDATION_RECOMMENDATIONS
  • QUESTIONS_OR_ASSUMPTIONS

If the current episode backend is Codex or Qoder and its matching ATREX_PLAN_REVIEW_*_ENABLED value is not 0, first review the frozen candidate proposal and retain that backend's review in the current session using the same sections. Only then run the helper; it skips the matching nested process and obtains any other enabled backend's independent review. Mark the retained review status current_codex_session or current_qoder_session. Do not revise it after seeing the external review; resolve new information only during synthesis. If the matching reviewer is disabled, do not create an in-session substitute review; let the helper record disabled.

After the helper's selective retry, if an enabled reviewer is unavailable, times out, or fails, do not fabricate its advice or rerun the successful reviewer. In direct mode, continue with the available review and conservative analysis, recording each status and failure reason. If every enabled reviewer fails, continue using only the primary analysis and label the result as unreviewed. In discussion mode, ask whether to retry only the failed reviewer or continue with partial or no independent review. A reviewer explicitly marked disabled is not a failure and must not trigger a retry question. If every reviewer is disabled, continue with primary analysis and label the plan as intentionally unreviewed.

Show full SKILL.md (603 more words)Show less
5. Synthesize available reviews and generate the plan

Compare all available reviews only after the helper has completed. When both are enabled, treat agreement as a useful confidence signal, not proof, and resolve disagreement from the original draft and repository evidence rather than by majority vote. Evaluate every recommendation as follows:

  1. Adopt a suggestion only when it strengthens the selected evidence-to-action chain, closes a correctness gap, or makes validation more deterministic.
  2. Reject suggestions that contradict measured evidence, violate campaign constraints, or introduce another optimization category in fast/full mode.
  3. Defer suggestions that are plausible but need evidence outside the current plan.
  4. Resolve conflicting suggestions explicitly, stating the evidence that selected one or rejected both.
  5. Convert unresolved reviewer questions into conservative assumptions or pending decisions according to the selected direct/discussion mode.

Record how the frozen candidate changed after review. Every material correction must identify the reviewer and supporting evidence; if the candidate remains unchanged, state why the reviews did not justify a change.

Available reviewers are advisory, not authoritative. The final plan must remain a superset of the human draft and must still contain exactly one optimization category in fast/full mode.

Use skills/gen-plan/templates/gen-plan-template.md as the output schema. Replace every placeholder with concrete content. The plan must include:

  • the goal and the profile/research evidence that motivates it;
  • Codex and Qoder consultation status (including configured-disabled status), available material findings, agreements, disagreements, and the suggestions adopted, rejected, or deferred with reasons;
  • the episode mode, its permitted optimization categories, and evidence-to-inference-to-action chains;
  • acceptance criteria in AC-N form, each with positive and negative tests;
  • upper and lower scope boundaries plus allowed and prohibited choices;
  • exact target paths and a dependency-ordered implementation sequence;
  • full-workload correctness, multi-seed correctness, and comparable performance validation;
  • measurable success, rollback, and direction-exhaustion conditions;
  • any assumptions or pending decisions; and
  • the original draft, unchanged, at the bottom.

Use milestones, phases, and steps rather than time estimates. Refer to code by path and symbol, not by line range. Plan terminology such as AC-N, Milestone, and Phase belongs in the plan only and must not be prescribed as implementation naming.

6. Review and write

Before writing, verify that the plan:

  • does not omit or contradict the draft;
  • uses available reviews selectively and records the disposition of material suggestions and conflicts;
  • records the frozen candidate and the evidence-based changes made after review;
  • proposes only one attributable optimization category in fast/full mode, or an attributable roadmap in goal mode;
  • names concrete files and validation commands;
  • distinguishes correctness from performance evidence;
  • has deterministic, measurable acceptance and rollback conditions; and
  • contains no implementation changes made during planning.

Write the complete plan to the validated output path, then read it back and fix any remaining placeholder, inconsistency, or missing draft content. Report the output path, optimization category, both consultation statuses, adopted-suggestion count, acceptance-criteria count, and pending-decision count.

Validation exit codes

Exit codeMeaning
0Validation passed
1Input file not found
2Input file is empty
3Output directory does not exist
4Output path already exists
5Output directory is not writable
6Invalid arguments
7Plan template is missing

Reviewer consultation exit codes

Exit codeMeaning
0Consultation completed, or nested invocation intentionally skipped for the matching backend
1Draft, candidate proposal, or context input is invalid
2Helper arguments or environment configuration are invalid
3Reviewer response is missing one or more required review sections
124Reviewer consultation timed out
127Reviewer CLI could not be found or started

ask-reviewers.sh reports the exit status of each child consultation in its structured output and returns successfully once both attempts finish, allowing direct mode to retain a surviving review.

© alibaba, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 8 other files (scripts) in skills/gen-plan of alibaba/atrex-kernel-agent.

  • SKILL.md
  • LICENSE
  • scripts/ask-codex.sh
  • scripts/ask-qoder.sh
  • scripts/ask-reviewers.sh
  • scripts/cached-reviewer-disable-reason.py
  • scripts/validate-gen-plan-io.sh
  • templates/candidate-proposal-template.md
  • templates/gen-plan-template.md

Open the folder on GitHubat commit 3d27c1e

Compare with similar skills

Gen Plan next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Gen Plan compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Gen Plan this skillalibaba/atrex-kernel-agent161—~3.4kAutomated safety check: PassMIT
Code Task Generatormikeyobrien/ralph-orchestrator3.2k—~1.6kAutomated safety check: PassMIT
Autospec Tasksariel-frischer/autospec144—~2.5kAutomated safety check: PassMIT
Notion Spec To Implementationrongxinzy/RongxinAI1542 repos~2.2kAutomated safety check: PassAGPL-3.0
Factory Queuetikalk/adlc-team-skills141—~1.3kAutomated safety check: PassMIT
App Buildermicrosoft/power-platform-skills972—~13kAutomated safety check: NotesMIT

Similar skills

  • Code Task Generator

    mikeyobrien/ralph-orchestrator

    Generates structured .code-task.md files from descriptions or PDD implementation plans.

    3.2k GitHub stars~1.6k tokensUpdated 3 days ago
    Agent WorkflowsAuto-check passed
  • Autospec Tasks

    ariel-frischer/autospec

    Generate YAML task breakdown from implementation plan. An agent skill from ariel-frischer/autospec.

    144 GitHub stars~2.5k tokensUpdated 10 days ago
    Agent WorkflowsAuto-check passed
  • Turns product or tech specs into concrete Notion tasks that Claude code can implement.

    154 GitHub starsUsed in 2 repos~2.2k tokens
    Agent WorkflowsAuto-check passed
  • Factory Queue

    tikalk/adlc-team-skills

    A skill your agent uses when managing mission brief intake — triage, AI-assisted advisory scoring, gating label stamping, and milestones or epics generation (plan mode).

    141 GitHub stars~1.3k tokensUpdated 2 days ago
    Agent WorkflowsAuto-check passed
  • App Builder

    microsoft/power-platform-skills

    Official

    Builds and edits a model-driven Power Apps app from a natural-language intent — tables, columns, relationships, adaptive forms with sub-grids, views, Choice-column charts, business rules, business…

    972 GitHub stars~13k tokensUpdated yesterday
    Agent WorkflowsAuto-check: notes
  • Feature Planning

    HybridAIOne/hybridclaw

    Break features into implementation plans, acceptance criteria, and sequenced tasks.

    158 GitHub stars~720 tokensUpdated yesterday
    Agent WorkflowsAuto-check passed

More from alibaba/atrex-kernel-agent

  • Opt Trace Mining

    alibaba/atrex-kernel-agent

    Mine a per-kernel optimization trace — a git repository capturing successive versions of one kernel being optimized — into structured, gate-validated optimization-experience records for the GPU…

    161 GitHub stars~4.4k tokensUpdated 9 days ago
    Auto-check passed
  • Session Trace Mining

    alibaba/atrex-kernel-agent

    Mine AI coding-agent session transcripts into structured, gate-validated GPU-kernel optimization records for the wiki.

    161 GitHub stars~3.1k tokensUpdated 9 days ago
    Auto-check passed
  • Ppu Acu Joint Profile

    alibaba/atrex-kernel-agent

    Choose and run ACU-only, adaptive PPU in-kernel timeline, or optional bounded joint analysis for a PPU kernel.

    161 GitHub stars~5.2k tokensUpdated 9 days ago
    Auto-check passed
  • Autonomous GPU Kernel Timeline

    alibaba/atrex-kernel-agent

    Let AKA autonomously add, run, inspect, and revise intra-kernel timeline probes for standalone CUDA/inline PTX or CuTe DSL when ordinary benchmark, NSYS, or NCU evidence cannot answer a specific…

    161 GitHub stars~1.3k tokensUpdated 9 days ago
    Auto-check passed
  • GPU Kernel Baseline

    alibaba/atrex-kernel-agent

    Learn the target framework from enabled knowledge tools and implement a baseline GPU kernel.

    161 GitHub stars~2.1k tokensUpdated 9 days ago
    Auto-check passed
  • GPU Kernel Episode Loop

    alibaba/atrex-kernel-agent

    Run the evidence loop of one long-horizon GPU kernel optimization episode.

    161 GitHub stars~3.6k tokensUpdated 9 days ago
    Auto-check passed

Questions about Gen Plan

What does Gen Plan do?

Generate a structured implementation plan from an evidence draft. Gen Plan is an agent skill from alibaba/atrex-kernel-agent. Generate a structured implementation plan from an evidence draft.

When should I use Gen Plan?

Gen Plan fits situations like: tasks that involve Planning; tasks that involve User stories.

How do I install Gen Plan in Claude Code?

Run `npx skills add alibaba/atrex-kernel-agent --skill gen-plan -a claude-code`. Or copy the skill folder (skills/gen-plan in alibaba/atrex-kernel-agent) into .claude/skills/gen-plan in your project. Claude Code loads it when a task matches its description.

How do I install Gen Plan in Codex?

Run `npx skills add alibaba/atrex-kernel-agent --skill gen-plan -a codex`. Or copy the skill folder (skills/gen-plan in alibaba/atrex-kernel-agent) into .agents/skills/gen-plan in your project. Codex loads it when a task matches its description.

Can I use Gen Plan in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add alibaba/atrex-kernel-agent --skill gen-plan -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/gen-plan, .gemini/skills/gen-plan, .github/skills/gen-plan and .opencode/skills/gen-plan in your project.

What does Gen Plan need to run?

Going by SKILL.md and its folder, Gen Plan needs a shell and Python for the scripts in its folder and the command-line tools its instructions call (bash). Our summary lists: Python 3; A Bash shell.

Does Gen Plan access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Gen Plan safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Gen Plan use?

Gen Plan is published under the MIT licence (from the LICENSE file in the skill folder). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Gen Plan use?

About 3.4k tokens (SKILL.md is roughly 14k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Gen Plan?

Skills that share tags, products or a category with Gen Plan: Code Task Generator (mikeyobrien/ralph-orchestrator, 3.2k stars), Autospec Tasks (ariel-frischer/autospec, 144 stars), Notion Spec To Implementation (rongxinzy/RongxinAI, 154 stars) and Factory Queue (tikalk/adlc-team-skills, 141 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Gen Plan?

alibaba (a GitHub organization) maintains it in alibaba/atrex-kernel-agent, which has 161 GitHub stars. The repository holds 7 skills in this directory. The repository was last updated on September 29, 2026.

Source: alibaba/atrex-kernel-agent on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.