trainer-train-agent

Orchestrates the trainer optimization loop for agent contract files.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Optimizing agent contract files (*.agent.md) requires coordinating research, dataset synthesis, optimization, validation, and safe write-back, and mistakes in tool routing, persona scope, or handoff behavior are hard to catch without a structured loop. ## Core Features & Use Cases - Three-concern optimization: Separates tool routing, persona/scope, and handoff behavior so each failure mode is addressed independently. - MCP routing audit: Compares agent routing instructions against each MCP skill's description field before optimization and records mismatches as steering context. - Write-back gating: Blocks write-back unless routing audits pass, handoffs are bounded to named agents, validation succeeds, and a decision summary exists. - Use Case: An agent keeps using web search instead of its dedicated research MCP skill. The loop initializes a workspace, audits the routing mismatch, optimizes the contract with llm_judge scoring, and writes back only after validation passes. ## Quick Start Run the trainer loop on .github/agents/researcher.agent.md to audit its MCP skill routing and optimize the contract.

Frequently Asked Questions about trainer-train-agent

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

FAQPage Schema
How do I optimize an agent contract file with the trainer loop?

Select the *.agent.md target, provide the repository root, validation command, and stage capabilities. The loop initializes a workspace under .trainer-workspace/, audits MCP routing, runs optimization with llm_judge scoring, and writes back only after validation passes.

What is an MCP skill routing audit in agent optimization?

The audit compares the agent's routing instructions for each MCP skill against that skill's description field. Mismatches, such as using web search instead of a dedicated research skill, are recorded as steering context for the optimizer.

When should I use llm_judge versus deterministic scoring for agent targets?

Agent contract targets default to llm_judge because behavior quality is open-ended. Use deterministic mode only for rule-checkable properties like required YAML fields or a non-empty tool list, and treat explicit row-level scoring declarations as authoritative.

What happens if the agent's tool list cannot be determined?

The loop treats unknown tool or MCP configuration as a blocker. It stops optimization, reports the gap, and leaves workflow-status.json in a resumable checkpoint state until the configuration is provided.

Can this skill optimize plain prompt files or Python code?

No. This skill is specialized for agent contract targets that define tool routing, personas, or handoffs. Pure prompt files, code targets, and skill definitions should be routed to the appropriate specialist via the parent trainer skill's target-routing reference.