custom-agent-usage

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.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "custom-agent-usage" with this command: npx skills add practicalswan/agent-skills/practicalswan-agent-skills-custom-agent-usage

Custom Agent Usage

Skill Paths

  • Workspace skills: .github/skills/
  • Global skills: C:/Users/LOQ/.agents/skills/

Activation Conditions

Activate this skill when:

  • Discovering available custom agents from the local Claude or VS Code Insiders agent directories
  • Understanding .agent.md file structure and frontmatter
  • Checking if an agent can be invoked as a subagent
  • Learning which agentName to 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.md when discovering subagents.
  • The VS Code Insiders prompts directory can also contain .prompt.md and .instructions.md files that are not subagents.

To discover agents:

  1. Search for *.agent.md files in the configured Claude and VS Code Insiders directories.
  2. Read frontmatter of each agent file to understand capabilities.
  3. Ignore .prompt.md and .instructions.md files when the goal is subagent delegation.

Agent Frontmatter

Key frontmatter fields in .agent.md:

FieldPurposeRequired?
nameDisplay name used in agentName parameterRecommended
descriptionWhat the agent specializes inRecommended
toolsTools available to the agentOptional
disable-model-invocationIf false, agent can be invoked as subagentRequired

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 `
  -File

Or use the helper script:

node .\scripts\agent-finder.js

Step 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 name field value, use that value in quotes.
  • If name is not specified, use the filename without the .agent.md extension.

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."
})

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 suite

Examples & Scripts

Related Skills

SkillRelationship
agent-task-mappingMap tasks to agents after discovering available agents
subagent-delegationDelegation patterns after validating agent invocability

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

sql-development

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

vite-development

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

code-examples-sync

No summary provided by upstream source.

Repository SourceNeeds Review