trainer-train-prompt

Orchestrates the trainer optimization loop for prompt-like markdown and prompty files.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Optimizing prompt files by hand is error-prone: placeholders get renamed, evaluator fields leak into prompt text, and scoring modes are guessed inconsistently. This Skill provides a structured orchestration contract that runs the full trainer loop (research, dataset synthesis, optimization, election, validation, write-back) against prompt-like targets with enforced gates and resumable workspace state. ## Core Features & Use Cases - End-to-end prompt training loop: Initializes a .trainer-workspace/ next to the target, enforces an engineering review checkpoint, runs optimization passes, handles manual follow-up branches, and writes back only validated winning candidates. - Prompt-specific guardrails: Infers judge mode (llm_judge vs deterministic) from dataset row shape via a routing table, preserves template placeholders exactly, and keeps evaluator-only fields (expected, reference, criteria, scoring) out of the prompt-visible text. - Blocker-first resumability: Stops with a named blocker and a resumable workflow-status.json checkpoint when reviews, datasets, or tracked artifacts are missing or inconsistent. - Use Case: Given prompts/summarize.prompt.md with no training assets, the loop derives the workspace, requires the review checkpoint, synthesizes train/validation datasets, optimizes the prompt, and writes back the winner only after validation passes and placeholders are confirmed unchanged. ## Quick Start Run the trainer loop for prompts/summarize.prompt.md, initializing the workspace and enforcing the engineering review checkpoint before any optimization pass.

Frequently Asked Questions about trainer-train-prompt

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

FAQPage Schema
How do I run the trainer loop on a prompt file?

Point the loop at a prompt-like target such as a .prompt.md, .prompty, or .instructions.md file. It derives a workspace under .trainer-workspace/, requires the engineer-prompt review checkpoint, then runs dataset synthesis, optimization, election, and gated write-back.

How does the trainer loop choose between llm_judge and exact_match scoring?

It applies a routing table to dataset row shape: an explicit scoring field is authoritative, reference plus criteria fields imply llm_judge, and prompt targets default to llm_judge when no scoring fields exist. Conflicting modes between train and validation splits trigger a blocker.

What checks happen before writing an optimized prompt back?

Write-back requires five conditions: the repository validation command exits 0, the placeholder set is unchanged, evaluator fields are absent from the prompt text, a decision.md summary exists, and the candidate score meets or exceeds any prior baseline.

What happens when the optimizer returns a manual follow-up instead of a candidate?

Manual follow-up is a supported branch, not a failure. The loop saves manual-followup-report.json, answers the model-facing prompt, persists optimized-prompt.md, confirms placeholder preservation, and continues with steering and validation.

When should I not use the prompt trainer loop?

Do not use it for code files, skill files, or agent contract files; those target types route to other specialist loops via the parent trainer skill's target-routing reference. It is scoped to natural-language instruction and prompt artifacts only.