trainer-train

Orchestrates iterative optimization loops for prompt files, skill contracts, and agent contracts.

Updated Mar 25, 2026
One-click install
npx skills add https://github.com/Tyler-R-Kendrick/copilot-auto-training --skill trainer-train-tyler-r-kendrick
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: trainer-train
Source: https://github.com/Tyler-R-Kendrick/copilot-auto-training/tree/main/skills/trainer-train
Command: npx skills add https://github.com/Tyler-R-Kendrick/copilot-auto-training --skill trainer-train-tyler-r-kendrick

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve? Optimizing prompt-like files, SKILL.md contracts, and agent instruction files requires coordinating research, dataset synthesis, optimization, judging, and safe write-back across multiple iterations. Without a defined loop contract, agents improvise artifact paths, skip prerequisite checks, or write back unvalidated candidates. ## Core Features & Use Cases - Workspace orchestration: Initializes and resumes a local .trainer-workspace/ per target with checkpointed workflow-status.json state and required-artifact pointers. - Stage coordination: Sequences caller-supplied research, synthesis, optimization, and election stages, including a missing-data path and manual follow-up recovery branch. - Judge-mode inference: Selects exact-match, structured, or open-ended LLM-judge scoring from representative dataset rows before optimization. - Safe write-back gating: Applies a winning candidate to the source file only after validation passes and a decision summary is written. - Use Case: You want to improve a SKILL.md file over multiple trainer iterations. This skill initializes the workspace, enforces the engineering review checkpoint, manages steering and candidate bundles, and decides when the optimized candidate is safe to write back. ## Quick Start Run the trainer loop for my selected target file using the available stage capabilities, initialize its local workspace, and report blockers before any optimization begins.

Frequently Asked Questions about trainer-train

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

FAQPage Schema
How do I run a trainer loop to optimize a SKILL.md or prompt file?

Select one target file, provide the workspace root, validation command, and stage capability map, then invoke the trainer loop. It derives a local `.trainer-workspace/<prompt-name>/`, verifies the engineering review checkpoint, and runs at least one optimization pass before any write-back.

What happens when training datasets or eval manifests are missing?

The loop stops optimization and runs a missing-data path: it gathers grounded source material, synthesizes train, validation, and authored eval assets as separate files, and prefers reusing existing assets over regenerating them. Optimization resumes only after the assets exist.

How is the judge scoring mode chosen for prompt optimization?

The scoring mode is inferred from representative dataset rows: exact-match for genuine single-answer tasks, structured or normalization-aware for schema-checked outputs, and open-ended LLM judge for reference-plus-criteria rows. An explicit `scoring` field in a row is treated as authoritative.

What should happen when optimization returns manual follow-up mode?

Manual follow-up is a supported branch, not a failure. The loop saves the report as `manual-followup-report.json`, answers the returned model prompt, persists the candidate as `optimized-prompt.md`, and continues with steering, validation, and decision-making.

When is an optimized candidate written back to the source file?

Write-back happens only after validation passes and a decision summary is written at the workspace root. If prerequisites are missing, the loop reports a blocker or no-op instead of speculatively rewriting the target.

When should the generic trainer loop delegate to a specialist skill?

Delegation occurs when the target matches a specialist category: prompt files route to trainer-train-prompt, Python files to trainer-train-code, SKILL.md files to trainer-train-skill, and agent contracts to trainer-train-agent. The generic loop is used only when no specialist applies or is unavailable.