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.
npx agentmods add skills/opendcai/dataflow-loopai/trainernpx skills add OpenDCAI/Dataflow-LoopAI --skill trainergit clone --depth 1 https://github.com/OpenDCAI/Dataflow-LoopAIWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00064 | $0.04800 |
| Opus 5 | $0.00032 | $0.02400 |
| Sonnet 5 | $0.00013 | $0.00960 |
| Haiku 4.5 | $0.00006 | $0.00480 |
Grade A, and why
trainer 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 2d ago.
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.
How it starts
The opening of the file, as written. The whole thing — 514 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Trainer Skill
Purpose
Trainer Skill is the Codex-facing entry point and the canonical Python implementation for LoopAI model training.
Use this skill for:
- Running
sft + llamafactoryorgrpo + verl; do not mix backend/stage pairs - Validating SFT JSON/JSONL or GRPO Parquet data and reward configuration
- Generating and approving backend-specific training YAML
- Running or reconnecting to the persistent Trainer worker
- Reading local metrics, selecting checkpoints, and exporting Verl FSDP actors
- Returning structured Trainer errors without relying on SwanLab or Trainer MCP
Do not use this skill for Judger, Analyzer, data crawling, or broad project refactors.
Python Implementation
loopai/skills/Trainer/
├── __init__.py # prepare() / run_prepared() / run() / result helpers
├── trainer_agent.py # LangGraph subgraph used by Starter and the skill runner
├── nodes/ # data validation, config generation, training execution
├── rewards/ # stable LoopAI routing to Verl reward implementations
├── utils/ # persistent worker, Verl/SFT launchers, events, parsers
├── templates/ # bundled training templates
├── results.py # parses metrics and selects the best checkpoint
├── runner.py # skill entry that runs the Trainer subgraph
├── runtime_config.py # resolves kwargs/env/state/starter.yaml
└── worker_entry.py # independent process that owns training and finalization
The root skill description lives at:
skills/Trainer/SKILL.md
Mandatory YAML Approval
For every user-initiated training round, use this two-stage workflow:
- Call
prepare()to validate the data and generate the final training YAML. This stage must not start training. - Read
result["trainer"]["trainer_result"]["data"]and show the user:config_path- the complete
config_yamlin a YAML code block - the selected
train_frameworkandtrain_stage - for SFT: dataset/model paths, learning rate, epochs, batch size, LoRA fields, devices, output directory, and
save_total_limit - for GRPO: train/validation Parquet paths, model, reward mode/preset or custom function, rollout backend, GPUs, batch/token limits, save/test frequency, checkpoint directory, selection metric, and checkpoint retention
- Stop and wait for explicit user approval. Do not treat a previous round's approval as approval for a new round.
- If the user requests edits, update the generated YAML, call
inspect_prepared_config(), show the complete updated YAML, and wait for approval again. - Only after approval, call
run_prepared()with the displayedconfig_path, its displayedconfig_sha256, and thetrainer_version_idreturned byprepare(). - Keep
run_prepared()in the foreground until training reachescompleted,failed, orcancelled.
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.
- 2d ago First seen · 514 lines · 64 tokens per session scan A 2d4abca6bc4d
trainer is a skill published in the GitHub repository OpenDCAI/Dataflow-LoopAI (22 stars, last pushed 2d ago), licensed Apache-2.0. It adds 64 tokens to every session and 4,800 once invoked, about $0.0003 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.
Other skills, from other repositories
loopx-project
Use when connecting a repository or project goal document to LoopX, maintaining project-local goal state, refreshing stale dashboard status, syncing local projects into the shared global registry, or diagnosing LoopX CLI/PATH/status/history issues across multiple repos. For registering durable project materials such…
loopx-auto-research
Use when a LoopX worker is operating an auto-research lane, demo pane, frontier item, evidence packet, promotion/retirement decision, or visible tmux/Codex auto-research rehearsal. Identity must come from the LoopX role profile and quota/frontier packet; this skill only provides role-specific execution checklists…
loopx-change-quality
Qualify the exact final diff for a LoopX-managed goal. Use when goal policy enables changequalityqualification, before a non-trivial delivery or merge, and when producing or repairing an exact-scope quality receipt. The workflow is language-neutral, permits at most one policy-authorized safe-fix pass, and never grants…
loopx-material
Operate an explicitly activated LoopX Material Lifecycle for a connected project. Use for material-store inventory, lossless migration, candidate/archive transitions, exact-read-backed ranking, ranked-entry rebuilds, bounded Explore intake, owner-gated apply, rollback, and audit. Do not use for ordinary one-off…
loopx-pr-program
Use when LoopX must manage a multi-PR or multi-MR delivery program across one or more repositories: inventory current change requests, reconcile new/merged/closed or retargeted work, preserve requirement and dependency priorities, maintain a roadmap document, or monitor material lifecycle/check/review changes over…
loopx-self-repair
Diagnose and repair LoopX control-plane drift or agent behavior drift. Use when a LoopX task makes unexpectedly small progress, follows a stale or contradictory recommendedaction, ignores a higher-priority blocked item while doing fallback work, reports vague owner/user gates, loses todo projection, misaligns…