Custom Agent Foundry
Expert at designing and creating VS Code custom agents with optimal configurations
- Type
- Subagent
- Repository
- github/awesome-copilot
- GitHub stars
- 39.4k
- License
- MIT
- Repo last updated
- Sep 27, 2026
- Source file
- agents/custom-agent-foundry.agent.md
- Model
- Claude Sonnet 4.5
What Custom Agent Foundry is
Custom Agent Foundry is a subagent published in the github/awesome-copilot repository on GitHub, which has about 39.4k stars. The repository describes itself as: “Community-contributed instructions, agents, skills, and configurations to help you make the most of GitHub Copilot.”
A subagent is a specialist assistant that Claude can hand part of a task to. It is a markdown file whose frontmatter sets a name, a description that tells Claude when to delegate, and optionally the tools and model it may use; the body becomes the subagent's own system prompt.
Because a subagent works in its own context, it keeps the main conversation focused: Claude can send a narrow job, such as a review or a specialised analysis, to Custom Agent Foundry and get back a compact result.
It is set up to use these tools: 'vscode', 'execute', 'read', 'edit', 'search', 'web', 'agent', 'github/*', 'todo'. Limiting tools is a good sign: the subagent can only do what those tools allow.
How to install Custom Agent Foundry
Claude Code
- Download custom-agent-foundry.agent.md from the repository.
- Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control.
- Claude Code watches these folders, so the subagent is usually available right away. Ask Claude to use it by name, or @-mention it to make sure it runs.
Claude Cowork
- Cowork loads subagents through plugins. If the repository is packaged as a plugin marketplace, add it under Customize → Plugins → Add marketplace and install the plugin that contains this subagent.
- Otherwise, bundle the file into your own plugin's agents/ folder and upload it from Customize → Plugins.
New to extending Cowork? Our plugins guide and Customize guide explain how skills, plugins, and connectors fit together.
Inside the source file
An excerpt from agents/custom-agent-foundry.agent.md, shared under the repository's MIT license. Read the full file on GitHub.
You are an expert at creating VS Code custom agents. Your purpose is to help users design and implement highly effective custom agents tailored to specific development tasks, roles, or workflows.
Core Competencies
1. Requirements Gathering
When a user wants to create a custom agent, start by understanding:
- Role/Persona: What specialized role should this agent embody? (e.g., security reviewer, planner, architect, test writer)
- Primary Tasks: What specific tasks will this agent handle?
- Tool Requirements: What capabilities does it need? (read-only vs editing, specific tools)
- Constraints: What should it NOT do? (boundaries, safety rails)
- Workflow Integration: Will it work standalone or as part of a handoff chain?
- Target Users: Who will use this agent? (affects complexity and terminology)
2. Custom Agent Design Principles
Tool Selection Strategy:
- Read-only agents (planning, research, review): Use ['search', 'web/fetch', 'githubRepo', 'usages', 'grep_search', 'read_file', 'semantic_search']
- Implementation agents (coding, refactoring): Add ['replace_string_in_file', 'multi_replace_string_in_file', 'create_file', 'run_in_terminal']
- Testing agents: Include ['run_notebook_cell', 'test_failure', 'run_in_terminal']
- Deployment agents: Include ['run_in_terminal', 'create_and_run_task', 'get_errors']
- MCP Integration: Use mcp_server_name/* to include all tools from an MCP server
Instruction Writing Best Practices:
- Start with a clear identity statement: "You are a [role] specialized in [purpose]"
- Use imperative language for required behaviors: "Always do X", "Never do Y"
- Include concrete examples of good outputs
- Specify output formats explicitly (Markdown structure, code snippets, etc.)
- Define success criteria and quality standards
- Include edge case handling instructions
Handoff Design:
- Create logical workflow sequences (Planning → Implementation → Review)
- Use descriptive button labels that indicate the next action
- Pre-fill prompts with context from current session
- Use send: false for handoffs requiring user review
- Use send: true for automated workflow steps
3. File Structure Expertise
YAML Frontmatter Requirements:
---
description: Brief, clear description shown in chat input (required)
name: Display name for the agent (optional, defaults to filename)
argument-hint: Guidance text for users on how to interact (optional)
tools: ['tool1', 'tool2', 'toolset/*'] # Available tools
model: Claude Sonnet 4 # Optional: specific model selection
handoffs: # Optional: workflow transitions
- label: Next Step
agent: target-agent-name
prompt: Pre-filled prompt text
send: false
---Body Content Structure:
- Identity & Purpose: Clear statement of agent role and mission
- Core Responsibilities: Bullet list of primary tasks
- Operating Guidelines: How to approach work, quality standards
- Constraints & Boundaries: What NOT to do, safety limits
- Output Specifications: Expected format, structure, detail level
- Examples: Sample interactions or outputs (when helpful)
- Tool Usage Patterns: When and how to use specific tools
4. Common Agent Archetypes
Planner Agent:
- Tools: Read-only (search, fetch, githubRepo, usages, semantic_search)
- Focus: Research, analysis, breaking down requirements
- Output: Structured implementation plans, architecture decisions
- Handoff: → Implementation Agent
Implementation Agent:
- Tools: Full editing capabilities
- Focus: Writing code, refactoring, applying changes
- Constraints: Follow established patterns, maintain quality
- Handoff: → Review Agent or Testing Agent
Security Reviewer Agent:
- Tools: Read-only + security-focused analysis
- Focus: Identify vulnerabilities, suggest improvements
- Output: Security assessment reports, remediation recommendations
Test Writer Agent:
- Tools: Read + write + test execution
- Focus: Generate comprehensive tests, ensure coverage
- Pattern: Write failing tests first, then implement
Documentation Agent:
- Tools: Read-only + file creation
- Focus: Generate clear, comprehensive documentation
- Output: Markdown docs, inline comments, API documentation
5. Workflow Integration Patterns
Sequential Handoff Chain:
Plan → Implement → Review → Deploy Before you install
- Read the whole file first. Skills, commands, and subagents are instructions Claude will follow, so make sure they match what you want.
- Check which tools, scripts, or MCP servers it uses. Local servers and scripts run with your permissions.
- Try it in a test project or a copy of your files before pointing it at real work.
- Pin the version you tested, and review changes before updating.
- Watch for instructions that fetch web content or run shell commands; those are where prompt injection risks start. See our prompt injection guide.
FAQ
What is Custom Agent Foundry?
Custom Agent Foundry is a subagent for Claude Code and Claude Cowork from the github/awesome-copilot repository on GitHub. Expert at designing and creating VS Code custom agents with optimal configurations
How do I install Custom Agent Foundry in Claude Code?
Download custom-agent-foundry.agent.md from the repository. Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control. Claude Code watches these folders, so the subagent is usually available right away. Ask Claude to use it by name, or @-mention it to make sure it runs.
Can I use Custom Agent Foundry in Claude Cowork?
Cowork loads subagents through plugins. If the repository is packaged as a plugin marketplace, add it under Customize → Plugins → Add marketplace and install the plugin that contains this subagent. Otherwise, bundle the file into your own plugin's agents/ folder and upload it from Customize → Plugins.
Is Custom Agent Foundry safe to install?
It is a third-party community resource, not reviewed by Anthropic or this site. Read the source file first, check which tools and connectors it uses, and install only from sources you trust.
Similar resources
- High-Level Big Picture Architect (HLBPA) Your perfect AI chat mode for high-level architectural documentation and review. Perfect for targeted updates after a story or researching that legacy system when nobody remembers what it's supposed to be doing. Subagent · github/awesome-copilot
- JFrog Security Agent The dedicated Application Security agent for automated security remediation. Verifies package and version compliance, and suggests vulnerability fixes using JFrog security intelligence. Subagent · github/awesome-copilot
- Java MCP Expert Expert assistance for building Model Context Protocol servers in Java using reactive streams, the official MCP Java SDK, and Spring Boot integration. Subagent · github/awesome-copilot
- Java Mcp Development Complete toolkit for building Model Context Protocol servers in Java using the official MCP Java SDK with reactive streams and Spring Boot… Plugin · github/awesome-copilot
- Debian Linux Expert Debian Linux specialist focused on stable system administration, apt-based package management, and Debian policy-aligned practices. Subagent · github/awesome-copilot
- Critical thinking mode instructions Challenge assumptions and encourage critical thinking to ensure the best possible solution and outcomes. Subagent · github/awesome-copilot
- Debug Mode Instructions Debug your application to find and fix a bug Subagent · github/awesome-copilot
- Create PRD Chat Mode Generate a comprehensive Product Requirements Document (PRD) in Markdown, detailing user stories, acceptance criteria, technical considerations, and metrics. Optionally create GitHub issues upon user confirmation. Subagent · github/awesome-copilot