/foundationskills:using-foundationskillsfrom foundationskills
Entry point for FoundationSkills: routes user intent to the correct skill, lists all registered skills with their inputs/outputs, and states workflow rules. Run before any other FoundationSkills skill.
Ships in foundationskills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Use this first. It is the entry point that routes a user's intent to the right
FoundationSkills skill and states the workflow and the non-negotiable rules every
later step must keep. It REPLACES the hand-written root SKILLS.md as the source
of truth: that file is a generated projection of this skill. Listing the registered
skills is measured (SkillRegistry + register_builtin_skills), routing is
measured (SkillRegistry.plan_chain), and nothing is invented: a want no
registered skill produces is refused (UF-IN-001), and an intent that matches no
skill is UNMEASURED (UF-IN-002) — absence of a route is never PASS.
have/want).| Field | Required | Meaning |
|---|---|---|
intent | no | free-text question; skills are ranked by lower-cased word overlap with their description (words of ≤ 3 letters ignored) |
have | no (with want) | artifact type strings you already have, e.g. ["raw_data_ref", "goal_spec"] |
want | no (with have) | artifact type you want, e.g. fs_launch_spec; refused by UF-IN-001 if no registered skill produces it |
At least one of intent / have+want is expected; an empty request still
returns the registered skill list.
One skill_route artifact (typed, schema-validated, with provenance) whose payload is: skills (one row per
registered skill: name, invocation, invokes, consumes, produces, description), candidates (the top 3
skill packages by SKILL.md name, {name, score}, when intent is given: a lexical shortlist scored by IDF-weighted
word overlap with each package's description and when_to_use phrasings; measured top-1 76/98 on the routing
questions, so the agent confirms it rather than trusting it) and chain (SkillRegistry.plan_chain(set(have), want) as skill
names, when have and want are both given).
Exit codes: 0 PASS (the route is measured), 95 UNMEASURED (UF-IN-002: the intent matches no registered skill),
96 REFUSED (UF-IN-001: the want names an artifact type no registered skill produces, or no chain reaches it).
There is no handoff rule, so RED 5 never fires here.
Every registered FoundationSkills skill, both model-invoked and user-invoked, for LLM and VLM work of any family and
stage. It reads the skill registry and each package's SKILL.md frontmatter, writes one skill_route artifact, and never
runs another skill, imports FoundationScale or launches anything.
goal_spec. For every load-bearing fact that is
missing, foundationskills.agent.intake.missing_facts(goal, skills) returns the
question to ask: base model, data location and size, target capability, hardware
and budget. Never invent a load-bearing value.fskills probe --deep. Plan only against what the installed
FoundationScale measurably runs.training.planner. Present the plan's decisions (each has a
because), the estimates, the feasibility verdict and the provenance_notes.
Recipes marked literature are not yet validated on FoundationScale, so say so.data.handoff == "data_engine"), run
data_engine for that format. Proceed only if the readiness verdict is PASS.
UNMEASURED lists the checks that did not run, so resolve them or tell the user.training.emit to get one fs_launch_spec per stage. A spec with
executable: false names the missing piece in missing. Report it; do not work
around it.fskills hash --spec ....
Launch only with --confirm <hash> given by the user. Never auto-fill the hash.
--measurement-only runs a spec whose only gap is the hand-off (for example, FS RL
saves no checkpoint), and only when the user asks for a measurement run.diagnose(), or
TrainingPlannerSkill.diagnose_symptom(name) for loss spikes, divergence, OOM,
reward hacking, reward saturation (UNMEASURED steps), MoE router imbalance and FS
refusals. The launcher keeps the full log in <output_dir>/fskills_launch.log and
recovers FS's own verdict even when torchrun reports exit 1.To find a chain from what you have to what you want, use
SkillRegistry.plan_chain(have, want). For example, {raw_data_ref, goal_spec} to
fs_launch_spec gives data_engine → training.planner → training.emit.
| Skill | Consumes | Produces | Guide |
|---|---|---|---|
data_engine | raw_data_ref | data_pipeline_spec, dataset, readiness_report | foundationskills/skills/data_engine/SKILL.md |
training.planner | goal_spec (+ readiness_report) | training_plan | foundationskills/skills/training/SKILL.md |
training.emit | training_plan, dataset | fs_launch_spec (+ sbatch) | foundationskills/skills/training/SKILL.md |
evaluation | checkpoint (or an FS run_manifest.json) | eval_report | foundationskills/skills/evaluation/SKILL.md |
auto_research | an approved campaign spec (request) | auto_research_report (+ hash-chained ledger) | foundationskills/skills/auto_research/SKILL.md |
Discipline skills (A3.1) gate the above: probe_first (vet a plan draft against
the measured probe), measured_or_unmeasured, confirm_before_launch and
refusal_surface.
The only statuses are PASS / RED / UNMEASURED / REFUSED (exit 0 / 5 / 95 / 96). A refusal names what is missing. A check that did not run is UNMEASURED, never PASS.
No training job is launched without the user's explicit confirmation of the plan hash.
Do not claim a capability the probe did not measure, and do not hide a gap the plan reports.
On the GB200 cluster, generated sbatch files already carry:
--time=10-00:00:00;--exclude=r01dgx02;Do not remove them.
There are two kinds of skill (A3.2):
invocation: "model"): data_engine,
training.planner/training.emit, evaluation, auto_research and the A3.1
discipline skills. The agent picks one from its description and runs it.invocation: "user"), run as slash commands such
as /fs-goal, /fs-data, /fs-plan, /fs-launch, /fs-eval, /fs-research,
/fs-status and /fs-handoff. They run ONLY when the user invokes them. A user
skill may compose model skills (declared by name in invokes) but NEVER another
user skill. The slash commands are being added in A3.2 — do not assume they all
exist yet; until one is registered, run the model skill it would compose and say so.This entry point itself is invocation: "user" and composes nothing: it routes and
states the rules.
See docs/ARCHITECTURE.md ("Adding a skill"). In short:
BaseSkill; set invocation ("model": the agent picks it from its description; "user": a
slash-command workflow skill) and, for a user skill, invokes (the model skills it composes; never a
user skill). metadata.invocation in SKILL.md must agree; tests/contract/test_invocation.py checks it;consumes/produces artifact types;SKILL.md with the standard sections, opening with routing frontmatter
(name in lowercase-hyphen form, license, a description that says what it is
NOT for, and at least 3 when_to_use phrasings);evals/evals.json: at least 3 cases that should trigger the skill, one routed
to a sibling skill and one no FoundationSkills skill should take;
then run fskills routing-eval run --base-url ... --model ... --write-benchmarks, which
measures routing on every package's cases (exit 0/5/95) and regenerates each BENCHMARK.md;
then run fskills behaviour-eval run --agent-... --judge-... --write-behaviour (agent and judge must be
different models), which checks each positive case's expected_behavior with and without the SKILL.md
and regenerates BEHAVIOUR.md. It is plan-level (no tool execution), and because the behaviours are
written from the SKILL.md, read the without-skill baseline and the uplift, not the with-skill ceiling;
then run fskills oracle-cases build (whenever a rule, its MUST_FIRE fixture or its severity changes; a
contract test enforces it), which writes code-grounded cases to evals/behaviour.json, and
fskills behaviour-eval run --cases oracle ... --write-behaviour, which checks that the SKILL.md lets an
agent predict what the code does (BEHAVIOUR_ORACLE.md); --resume REPORT re-asks only unmeasured calls;register_builtin_skills or through the foundationskills.skills entry point).tests/contract/test_conformance.py then checks it automatically.
fskills skills describefskills skills list| Rule | Phase | Severity | Description |
|---|---|---|---|
| UF-IN-001 | input | BLOCK | "want" names an artifact type no registered skill produces |
| UF-IN-002 | input | WARN | "intent" matches no registered skill |
skill_route
PASS 0 · RED 5 · UNMEASURED 95 · REFUSED 96
Outcome semantics (from core/contract.py, the same for every skill): an input-phase
BLOCK refuses before any work — status REFUSED, exit 96, nothing written. A
handoff-phase BLOCK does not refuse: the work ran, and the result is RED (exit 5),
never PASS. WARN and INFO findings never block; they travel with the result
(UF-IN-002 makes the run UNMEASURED, exit 95). Phase by prefix: UF-IN-* rules are
input phase.
| Rule | Severity | Fires when |
|---|---|---|
| UF-IN-001 | BLOCK | want names an artifact type no registered skill produces (or SkillRegistry.plan_chain(have, want) finds no route) → REFUSED 96 |
| UF-IN-002 | WARN | intent matches no registered skill (zero word overlap with every description) → UNMEASURED 95; absence of a route is never PASS |
want unreachable (no registered skill produces it, or no chain from have):
REFUSED (96) naming UF-IN-001 and the producible artifact types; nothing is written.intent matches no registered skill: UNMEASURED (95) with UF-IN-002 and the full
skills list in the payload — restate the intent against that list, or ask the user
which skill they mean. Never guess a route.diagnose() (or
TrainingPlannerSkill.diagnose_symptom(name)); do not improvise a workflow here.Reads only the skill registry (SkillRegistry, register_builtin_skills) and a
fskills skills listing; computes chains through SkillRegistry.plan_chain. This
skill never imports or launches FoundationScale, writes only its skill_route artifact, and touches no
cluster resource. On a host where the fskills CLI or the foundationskills
package is missing, report REFUSED with the install step
(pip install -e <FoundationScale repo>/FoundationSkills, or run where it is
installed) and never improvise a route.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub trannhiem/foundationscale --plugin foundationskills21 skills in this plugin
/fs-dataUser-invoked slash command: run ONLY when the user types /fs-data; never choose it on your own. Slash-command data preparation workflow (/fs-data) that composes the model skill data_engine to turn raw data refs into a dataset, data_pipeline_spec and readiness_report. Inputs: the data_engine request fields (sources, target_format, tokenizer, chat_template_family, out_dir, requirements, pipeline, reasoning_unsupported, benchmarks, ...) passed through unchanged, plus optional goal_spec (a path recorded in outputs, not interpreted). The workflow record says which step ran, what it produced and the verdict (PASS/RED/UNMEASURED). Do NOT use for explaining fskills results (use /fs-status), fixing data problems yourself, or training a model (use /fs-training): this composes data_engine and produces data artifacts only./fs-evalUser-invoked slash command: run ONLY when the user types /fs-eval; never choose it on your own. /fs-eval is the A3.2 user-invoked workflow skill: it takes the evaluation request (checkpoint, run_manifest, base, benchmarks, policy, eval_cache, out, baseline_cache, ...) and forwards it UNCHANGED to the ONE composed model skill `evaluation`, run through foundationskills.skills._workflow, then writes one workflow_record {workflow, steps, outputs, verdict} whose outputs name the eval_report BY PATH. Outcome mapping (PASS 0 / RED 5 / UNMEASURED 95 / REFUSED 96): inner REFUSED -> FE-IN-002 REFUSED; inner RED -> FE-HO-001 RED; inner UNMEASURED -> FE-HO-002 UNMEASURED (never PASS). Do NOT use for fixing a regression, running a bare lm-eval harness or judging launch-readiness: /fs-eval records the evaluation verdict, it never repairs a benchmark or tunes a policy./fs-goalUser-invoked slash command: run ONLY when the user types /fs-goal; never choose it on your own. Grilling composer (/fs-goal) for one FoundationSkills goal_spec: takes the intake answers so far ({objective, goal?, domain?, preserve_general?, base_model {name_or_path, size_b?, arch?}, sources [{uri, kind, ...}], hardware {gpu, gpus_per_node, nodes}, data_facts {has_verifiable_answers, has_pairs, has_instructions}, rl_algorithm?}), asks ONLY for the facts intake.missing_facts still names and then one confirm question, and writes one goal_spec artifact only when the frontier is empty AND confirmed is true. Do NOT use to plan, train, launch, fix or explain a run: this skill only collects and confirms intake facts (fskills-training plans). Side-effect free: composes and invokes nothing (invokes is empty) and writes only its own goal_spec./fs-handoffUser-invoked slash command: run ONLY when the user types /fs-handoff; never choose it on your own. Slash-command closer (/fs-handoff) for a FoundationSkills session: takes this session's artifact JSON paths, optional notes and next_steps and writes ONE handoff artifact that references every artifact BY PATH ({path, type, id, sha256}, payload never copied) with notes and next_steps redacted of secrets (sk-, ghp_, AKIA, Bearer, NAME=KEY/TOKEN/SECRET/PASSWORD values) and PII (email, phone, credit_card, ssn, national_id). Do NOT use for re-running a skill, fixing findings or deciding what to run next: it hands a session off, it does not act./fskills-auto-researchManages a hash-chained auto-research campaign (M0): validates the campaign spec, opens one human approval envelope (campaign_confirm hash), authorises launches with derived tokens, records immutable trial results, proposes ideas from the ideas catalog and closes with statistical acceptance against a calibrated noise floor (guardrails, keep/discard/crash TSV view) writing auto_research_report. Do NOT use for single training runs (fskills-training), nor for evaluation alone (fskills-evaluation). M1 submits emitted trials (`envelope`/`submit`/`cancel`) behind the envelope budget gate and the IMEX fabric probe./fskills-compressionModel compression and quantization of a HF checkpoint (v1 method: RTN weight-only quantize-dequantize, int4 or int8, group-wise). Use it to preflight a host for compression (vendored preflight.py; classifies FAIL, UNKN and PROBE_ERROR results), to plan a probe-first run that emits an fs_launch_spec running rtn_worker.py on one GPU (launched only with the plan hash the user types back), and to verify the measured perplexity ratio (harness A vs B instrument certification, no-op check) against a pre-registered budget into a compression_report. Also route here any GPTQ, AWQ, NVFP4, MXFP4, FP8, modelopt, llm-compressor or quantized-speedup request: this skill answers it with a deferral refusal (CP-IN-003). Do NOT use for serving a checkpoint, already-quantized ones included, or asking whether it fits the serving envelope (fskills-deployment), LoRA merges (fskills-merging), benchmark accuracy suites (fskills-evaluation) or fine-tuning (fskills-training).Other plugins' skills for the same job