apex-agent-authoring
Skill220 starsChanged 2 months agoMITView on GitHub
**WORKFLOW SKILL** — Creates, restructures, and audits GitHub Copilot `.agent.md` and `.prompt.md` files with correct frontmatter, handoffs, model policy, context budgets, and validation. WHEN: "create agent", "author custom agent", "edit agent definition", "agent architecture", "reduce agent tokens", "agent prompt audit". DO NOT USE FOR: routine edits covered by auto-loaded instructions.
In this repository40 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
- apex-azure-adrSkill
- apex-azure-artifactsSkill
- apex-azure-bicep-patternsSkill
- apex-azure-cloud-migrateSkill
- apex-azure-complianceSkill
- apex-azure-computeSkill
- apex-azure-cost-optimizationSkill
- apex-azure-defaultsSkill
- apex-azure-deploySkill
- apex-azure-diagnosticsSkill
- apex-azure-governance-discoverySkill
- apex-azure-kubernetesSkill
- apex-azure-kustoSkill
- apex-azure-prepareSkill
- apex-azure-quotasSkill
- apex-azure-rbacSkill
- apex-azure-reliabilitySkill
- apex-azure-resourcesSkill
- apex-azure-storageSkill
- apex-azure-upgradeSkill
- apex-azure-validateSkill
- apex-context-managementSkill
- apex-debug-log-exportSkill
- apex-entra-app-registrationSkill
- apex-github-operationsSkill
- apex-golden-principlesSkill
- apex-iac-commonSkill
- apex-mermaidSkill
- apex-microsoft-docsSkill
- apex-python-diagramsSkill
- apex-rfi-rfpSkill
- apex-terraform-patternsSkill
- apex-terraform-search-importSkill
- apex-terraform-testSkill
- apex-unslopSkill
- apex-vendor-promptingSkill
- apex-workflow-engineSkill
- apex-workflow-startSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
18 rules. About 0 are common, 14 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈14
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 16
Create and restructure Copilot agents without loading extended authoring guidance into every ordinary agent turn.
- Very specific: line 22
Create a new .agent.md or .prompt.md.
- Distinctive: line 29
Do not load this skill for a routine edit where the thin instruction already states the applicable rule.
- Distinctive: line 34
Read the target file and its nearest analogous agent once.
- Very specific: line 37
Check tools/registry/agent-registry.json before changing legacy pins or role mappings.
- Distinctive: line 39
Keep active production agent definitions free of model and effort pins.
- Distinctive: line 66
Keep each concern in one place:
- Distinctive: line 79
Do not copy canonical tables or templates into an agent body.
- Distinctive: line 85
Keep tool lists minimal and native task routing intentional.
- Distinctive: line 88
Prefer one compact structured example.
- Distinctive: line 89
Remove prose already supplied by an auto-loaded instruction.
- Very specific: line 93
Use the apex-context-management skill for runtime compression or debug-log audits.
- Distinctive: line 97
Update frontmatter and the smallest body section first.
- Distinctive: line 98
Run the focused agent validator.
- Distinctive: line 100
Update model registry or workflow graph mirrors when their canonical source changes.
- Distinctive: line 102
Update documentation when an agent or skill is added, renamed, or removed.
- Distinctive: line 106
Run focused fixture tests first.
- Distinctive: line 112
After concurrent agent edits settle, integration checks are:
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Agent Authoring
Create and restructure Copilot agents without loading extended authoring guidance
into every ordinary agent turn. The thin enforcement layer remains in
agent-authoring.instructions.md.
When To Use This Skill
- Create a new
.agent.mdor.prompt.md. - Restructure an oversized or duplicated agent definition.
- Design handoffs or subagent boundaries.
- Select or upgrade an agent model.
- Audit fixed context cost, tool scope, or prompting structure.
- Investigate an agent validation failure requiring more than a local fix.
Do not load this skill for a routine edit where the thin instruction already states the applicable rule.
Prerequisites
- Read the target file and its nearest analogous agent once.
- Check
.github/skills/apex-workflow-engine/templates/workflow-graph.jsonbefore changing domain prerequisites or artifact ownership; it does not supply UI routing or permissions. - Check
tools/registry/agent-registry.jsonbefore changing legacy pins or role mappings. - Preserve user changes and existing runtime contracts.
- Keep active production agent definitions free of model and effort pins; the operator and runtime control model selection. Readiness does not attest models, effort or picker selection. Test any intentionally pinned legacy fixture with the existing validators.
- Distinguish Local prompt adapters from shared Host-compatible skills; static validation does not prove native model eligibility.
Workflow
1. Classify The Change
Choose the smallest applicable path:
| Change | Load |
| Frontmatter field or handoff correction | Agent file structure |
| New agent or major body restructure | Authoring workflow |
| Model assignment or effort policy | Model policy |
| Tool-heavy runtime or fallback behavior | Runtime guardrails |
| Decision capture behavior | Decision logging |
| Vendor-specific prompt audit | Ask the user to invoke /apex-vendor-prompting; do not load it automatically |
Load only the references needed for the selected path. The vendor audit skill is manual-only. Its thin instructions and required validators still apply during authoring; do not read the skill body as a workaround for its invocation flag.
2. Establish Ownership
Keep each concern in one place:
- Agent body: role, goal, workflow-specific constraints, output, stop rules.
- Active main bodies use concise Markdown with essential role, goal, scope, interaction,
outputs and stops, independently of model selection. Direct mains declare native
ask_user; delegated mains return input requests to the interactive parent. Leaves use bounded input/activity/output/failure contracts without questions/delegation. Preserve substantive domain content when removing duplicate XML or workflow ceremony. - Instruction: enforceable rules that apply automatically by file type.
- Skill: on-demand domain workflow and decision guidance.
- Reference: detailed examples, rationale, matrices, and troubleshooting.
- Registry or graph: machine-readable inventory and topology.
Do not copy canonical tables or templates into an agent body.
3. Budget Context
- Apply the limits and hand-off framework in
context-optimization.instructions.md. - Keep tool lists minimal and native task routing intentional. Active agents omit UI handoffs; the owner observed no handoff controls with the probe agent selected in Copilot.
- Move long templates to references or templates.
- Prefer one compact structured example.
- Remove prose already supplied by an auto-loaded instruction.
- Estimate fixed cost using body bytes, matched instruction bytes, tool schemas, and mandatory skill reads.
Use the apex-context-management skill for runtime compression or debug-log audits.
4. Implement Incrementally
- Update frontmatter and the smallest body section first.
- Run the focused agent validator.
- Move optional detail into references only after behavior remains valid.
- Update model registry or workflow graph mirrors when their canonical source changes.
- Update documentation when an agent or skill is added, renamed, or removed.
5. Validate
Run focused fixture tests first; they do not stage files into the active agent tree:
node --test tools/tests/lib/parse-frontmatter.test.mjs tools/tests/validate-agents/classify-model.test.mjs tools/tests/vendor-prompting/run.test.mjsAfter concurrent agent edits settle, integration checks are:
npm run validate:agents
npm run lint:vendor-prompting
npm run validate:model-consistency
npm run validate:skills
npm run lint:mdFor model changes also run npm run validate:deprecated-models.
Output Expectations
Return:
- Files changed and ownership rationale
- Fixed-context reduction when slimming an agent
- Preserved runtime contracts and anchors
- Validation commands and results
- Any documentation or generated inventory updated
Troubleshooting
| Symptom | Action |
| Agent is not discovered | Validate frontmatter, filename, description form, and model syntax |
| Handoff fails validation | Verify target name, allowed fields, and input/output enrichment |
| Skill is reported orphaned | Reference .github/skills/apex-agent-authoring/SKILL.md canonically |
| Model consistency fails | Treat agent frontmatter as canonical, then update registry mirrors |
| Context remains large | Remove duplicated instruction prose and move phase-specific detail to references |
Reference Index
- Agent fleet assessment: definition scorecards and a gated remediation plan.
- Agent scorecard rubric: preserved assessment dimensions and scoring.
- Agent adversarial checklist: read-only authoring review lenses.
- .github assessment: static authoring-asset inventory and review.
- Assessment design history: reference-only, not executable.
Assessments never edit authoring assets in the review pass. Optional supplied log profiles
inform scorecards; log capture, context audit, and runtime compression remain owned by
apex-context-management.
- Agent file structure
- Authoring workflow
- Model policy
- Runtime guardrails
- Decision logging
- Skill authoring: locations, layout, loading and
contextpolicy detail.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

