custom-agent-usage
Skill22 starsChanged 23 days agoMITView on GitHub
Discover, validate, and invoke .agent.md custom agents. Use when finding agent files in the local Claude or VS Code Insiders directories, checking frontmatter, verifying disable-model-invocation, or determining agentName for runSubagent calls.
In this repository259 other files it gives its agents.
- AGENTS.mdAGENTS.md
- composition-patterns/AGENTS.mdAGENTS.md
- react-best-practices/AGENTS.mdAGENTS.md
- react-native-skills/AGENTS.mdAGENTS.md
- react-view-transitions/AGENTS.mdAGENTS.md
- vercel-optimize/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- accelerated-computing-cudfSkill
- accessibilitySkill
- agentic-evalSkill
- agent-skillguardSkill
- agent-task-mappingSkill
- ai-writing-detectorSkill
- avoid-ai-writing-routerSkill
- avoid-ai-writingSkill
- azure-integrationsSkill
- best-practicesSkill
- brainstormingSkill
- breaking-changes-managementSkill
- canvas-designSkill
- cloud-design-patternsSkill
- codebase-designSkill
- codebase-to-courseSkill
- code-examples-syncSkill
- code-qualitySkill
- codex-app-threadsSkill
- codex-computer-useSkill
- codexerSkill
- codex-in-app-browserSkill
- codex-router-mediaSkill
- codex-routerSkill
- collision-zone-thinkingSkill
- competition-submission-checkerSkill
- composition-patternsSkill
- condition-based-waitingSkill
- context-mapSkill
- core-web-vitalsSkill
- course-content-mapSkill
- csharp-xunitSkill
- deepstream-devSkill
- deepstream-import-vision-modelSkill
- defense-in-depthSkill
- deploy-to-vercelSkill
- development-workflowSkill
- devops-toolingSkill
- dispatching-parallel-agentsSkill
- docSkill
- documentation-authoringSkill
- documentation-automationSkill
- documentation-patternsSkill
- documentation-qualitySkill
- documentation-verificationSkill
- document-metadata-reviewSkill
- docxSkill
- domain-modelingSkill
- dotnet-best-practicesSkill
- ds-notebook-strict-codeSkill
- ds-teaching-assistantSkill
- excalidraw-diagram-generatorSkill
- excel-sheetSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
12 rules. About 0 are common, 5 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 15
Use symptom -> action triggers: when one matches, apply this skill and verify with the protocol below.
- Very specific: line 35
Search for *.agent.md files in the configured Claude and VS Code Insiders directories.
- Distinctive: line 36
Read frontmatter of each agent file to understand capabilities.
- Very specific: line 52
CRITICAL: Only agents with disable-model-invocation: false in frontmatter can be invoked as subagents.
- Very specific: line 68
Search the real agent directories and keep only *.agent.md files:
- Very specific: line 84
Verify disable-model-invocation: false is set.
- Very specific: line 88
Use the name field from frontmatter exactly as is.
- Very specific: line 89
If frontmatter has name field value, use that value in quotes.
- Very specific: line 90
If name is not specified, use the filename without the .agent.md extension.
- Distinctive: line 122
Do not claim an MCP operation was used when the active host does not expose it.
- Distinctive: line 123
Treat local files, tests, rendered outputs, logs, or screenshots as the fallback evidence path.
- Distinctive: line 135
Before claiming "skill applied successfully":
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
Custom Agent Usage
- Leverage native parallel subagent dispatch and 200k+ context windows where available.
Activation Conditions
Use symptom -> action triggers: when one matches, apply this skill and verify with the protocol below.
Activate this skill when:
- Discovering available custom agents from the local Claude or VS Code Insiders agent directories
- Understanding
.agent.mdfile structure and frontmatter - Checking if an agent can be invoked as a subagent
- Learning which
agentNameto use for delegation - Understanding agent tools and capabilities
Custom Agent Discovery
Custom agents for this environment are discovered from these directories:
- Claude agents:
C:\Users\LOQ\.claude\agents - VS Code Insiders prompts:
C:\Users\LOQ\AppData\Roaming\Code - Insiders\User\prompts
Notes:
- Filter to
*.agent.mdwhen discovering subagents. - The VS Code Insiders prompts directory can also contain
.prompt.mdand.instructions.mdfiles that are not subagents.
To discover agents:
- Search for
*.agent.mdfiles in the configured Claude and VS Code Insiders directories. - Read frontmatter of each agent file to understand capabilities.
- Ignore
.prompt.mdand.instructions.mdfiles when the goal is subagent delegation.
Agent Frontmatter
Key frontmatter fields in .agent.md:
| Field | Purpose | Required? |
name | Display name used in agentName parameter | Recommended |
description | What the agent specializes in | Recommended |
tools | Tools available to the agent | Optional |
disable-model-invocation | If false, agent can be invoked as subagent | Required |
Invocability Check
CRITICAL: Only agents with disable-model-invocation: false in frontmatter can be invoked as subagents.
Check frontmatter:
---
name: "Code Explainer"
description: For analyzing and documenting existing code
disable-model-invocation: false # Must be false for subagent delegation
tools: [Read, Search]
---Using Custom Agents
Step 1: Discover Available Agents
Search the real agent directories and keep only *.agent.md files:
Get-ChildItem `
'C:\Users\LOQ\.claude\agents', `
'C:\Users\LOQ\AppData\Roaming\Code - Insiders\User\prompts' `
-Filter *.agent.md `
-FileOr use the helper script:
node .\scripts\agent-finder.jsStep 2: Check Invocability
Verify disable-model-invocation: false is set.
Step 3: Get Agent Name
Use the name field from frontmatter exactly as is.
- If frontmatter has
namefield value, use that value in quotes. - If name is not specified, use the filename without the
.agent.mdextension.
Step 4: Delegate Task
runSubagent({
agentName: "Playwright Tester Mode", // Must match 'name' from frontmatter exactly
description: "Test checkout flow",
prompt: "Perform exploratory testing on the checkout flow: product selection -> cart -> payment confirmation. Generate comprehensive Playwright tests covering success scenarios, validation errors, edge cases (empty cart, payment failures), and accessibility."
})<!-- MCP:START --><!-- PORTABILITY:START -->Cross-Client Portability
This skill is written to stay usable across GitHub Copilot, Claude Code, and Codex.
- GitHub Copilot: keep the folder in a Copilot-visible skill path or wrap the workflow in project instructions when folder discovery is unavailable.
- Claude Code: keep the folder in a local skills directory or a compatible plugin source.
- Codex: install or sync the folder into
$CODEX_HOME/skills/custom-agent-usageand restart Codex after major changes.
<!-- PORTABILITY:END -->MCP Availability And Fallback
Preferred MCP Server: None required
- Fallback prompt: "Use the Custom Agent Usage skill without MCP. Rely on its local instructions, bundled resources, standard shell or editor tools, and direct verification. Show the evidence used before concluding."
- Do not claim an MCP operation was used when the active host does not expose it.
- Treat local files, tests, rendered outputs, logs, or screenshots as the fallback evidence path.
<!-- MCP:END -->Anti-Patterns
- Delegating or evaluating without a scoped success condition: The output becomes hard to review and easy to overbuild.
- Skipping the evidence step: A workflow that cannot be re-checked quickly is not ready for handoff.
- Bundling unrelated subtasks together: It creates noisy prompts, weaker ownership, and avoidable integration risk.
Verification Protocol
Before claiming "skill applied successfully":
- Pass/fail: The Custom Agent Usage workflow names the agent boundary, delegated scope, and expected return artifact.
- Pass/fail: Context passed to helpers is minimal, task-local, and free of hidden expected answers.
- Pass/fail: Results are integrated only after evidence, diffs, or citations are checked by the controller.
- Pressure-test scenario: Run the workflow on two similar tasks that must not share assumptions or leaked context.
- Success metric: Zero context leakage; every delegated output is independently reviewable.
Workflow Example
// Step 1: Main agent analyzes task and identifies need for testing
// "I need comprehensive testing for the checkout flow"
// Step 2: Discover custom testing agent
// Found: C:\Users\LOQ\.claude\agents\playwright-tester.agent.md
// disable-model-invocation: false and name: "Playwright Tester Mode"
// Step 3: Delegate to custom agent
runSubagent({
agentName: "Playwright Tester Mode",
description: "Test checkout flow",
prompt: "Perform exploratory testing on the checkout flow: product selection -> cart -> payment confirmation. Generate comprehensive Playwright tests covering success scenarios, validation errors, edge cases (empty cart, payment failures), and accessibility."
})
// Step 4: Review test output and integrate into test suiteExamples & Scripts
- Agent Discovery Workflow - Examples of finding and using custom agents
- Agent Finder Script - Node.js script to discover and inspect custom agents
Related Skills
- agent-task-mapping: Use it when the workflow also needs task-to-agent routing decisions.
- subagent-delegation: Use it when the workflow also needs safe, scoped delegation to helper agents.
- subagent-driven-development: Use it when the workflow also needs plan-driven implementation with reviewer loops.
- agentic-eval: Use it when the workflow also needs rubric-driven evaluation loops.
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.

