add-expert-skill-to-geak

Scaffold, validate, and submit expert GPU kernel optimization recipes to GEAK.

178|52|Updated Jul 30, 2025
One-click install
npx skills add https://github.com/AMD-AGI/GEAK --skill add-expert-skill-to-geak-amd-agi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-expert-skill-to-geak
Source: https://github.com/AMD-AGI/GEAK/tree/main/perf_knowledge/expert_skills/_contribute
Command: npx skills add https://github.com/AMD-AGI/GEAK --skill add-expert-skill-to-geak-amd-agi

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pyyaml, pytest.

What problem does it solve? Capturing a human expert's reusable GPU optimization recipe so GEAK's e2e_workflow and kernel_workflow can reproduce it automatically requires a strict contract: correct operator alignment, required documentation sections, and a two-sided on-box validation gate. This Skill walks a contributor through scaffolding, filling, validating, and submitting such an expert skill without missing any gate. ## Core Features & Use Cases - Scaffolding: Generates a new skill skeleton via scaffold.py with operator, scope (kernel or e2e), gens, dtypes, and regimes, rejecting operators not present in capability_index.yaml. - Two-sided validation: Runs static schema checks, emits the exact on-box measurement command for the matching workflow, and records measured efficacy (isolated speedup or e2e delta) plus do-no-harm control results before stamping a skill as validated. - PR submission: Branches, commits the skill and regenerated index.yaml, pushes, and opens a pull request, refusing unless the skill status is validated. - Use Case: An engineer who measured a 67% e2e gain from a FlyDSL fp8 blockscale down-proj playbook on gfx942 uses this Skill to turn that playbook into a validated, selector-matchable expert skill that future GEAK runs can auto-apply. ## Quick Start Ask the agent to scaffold a new expert skill for a given operator and scope, fill in the recipe sections, then validate it on-box and open a PR.

Frequently Asked Questions about add-expert-skill-to-geak

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add an expert skill to GEAK?

Run scaffold.py with an id, operator, scope, title, author, gens, dtypes, and regimes to create a draft skill under skills/<id>/skill.md. Fill in the required sections, validate it with validate_skill.py, then submit it with make_pr.sh.

How is an expert skill validated before it lands?

Validation is a two-sided gate: an efficacy check where the measured isolated speedup or e2e delta meets the skill's expects thresholds with parity, and a do-no-harm check confirming a non-matching control scenario stays within the noise band. Only then does --record stamp status validated.

What is the difference between kernel scope and e2e scope skills?

Kernel-scope skills are validated by kernel_workflow as an isolated A/B against the oracle and require expects.isolated_speedup_min. E2e-scope skills are validated by e2e_workflow via Director same-session A/B and require expects.e2e_delta_min_pct.

Why does scaffold.py reject my operator name?

The operator must exist in capability_index.yaml because the selector matches skills on operator names. The scaffolder rejects unknown operators so the skill can actually be discovered; the wildcard '*' is allowed for state-based skills.

Are expert skills applied automatically by GEAK workflows?

No. Workflows ignore expert_skills unless a run passes use_expert_skills=true, and even then only skills with validation status validated are auto-applied as advisory priors. The workflow always decides the winner by on-box measurement.

What happens if a validated skill regresses after an upgrade?

A skill that regresses after an aiter or Triton upgrade or box drift should be re-validated. Staleness demotes it to a plain reference until it is refreshed through the validation gate again.