This page provides practical examples of custom agents you can use as starting points for your own workflows.
This custom agent is optimized for AWS infrastructure management. It pre-approves safe operations while restricting destructive commands.
{ "name": "aws-specialist-agent", "description": "Specialized agent for AWS infrastructure and development tasks", "prompt": "You are an expert AWS infrastructure specialist with deep knowledge of cloud architecture and best practices", "tools": ["read", "write", "shell", "@git"], "permissions": { "rules": [ { "capability": "shell", "match": ["aws *", "terraform *", "git *"], "effect": "allow" }, { "capability": "fs_write", "match": ["infrastructure/**", "scripts/**", "*.yaml", "*.yml"], "effect": "allow" }, { "capability": "shell", "match": ["rm -rf *", "sudo *"], "effect": "deny" } ] }, "resources": [ "file://README.md", "file://infrastructure/**/*.yaml", "file://docs/aws-setup.md" ], "hooks": [ { "name": "check-aws-identity", "trigger": "SessionStart", "action": { "type": "command", "command": "aws sts get-caller-identity" } } ], "model": "claude-sonnet-4" }
Use cases:
This custom agent is designed for general software development tasks, including code review, testing, and Git operations.
{ "name": "development-workflow-agent", "description": "General development workflow agent with Git integration", "prompt": "You are a software development assistant with expertise in Git workflows and code management", "mcpServers": { "github": { "type": "http", "url": "https://api.githubcopilot.com/mcp/", "headers": { "Authorization": "Bearer ${GITHUB_PAT}" }, "disabledTools": ["create_issue", "update_issue", "create_pull_request", "merge_pull_request", "push_files", "delete_file"] } }, "tools": ["read", "write", "shell", "@github/issue_read", "@github/search_issues"], "allowedTools": ["read", "@github/issue_read", "@github/search_issues"], "toolAliases": { "@github/issue_read": "issue", "@github/search_issues": "issues" }, "permissions": { "rules": [ { "capability": "fs_write", "match": ["src/**", "tests/**", "docs/**", "*.md", "*.json"], "effect": "allow" }, { "capability": "shell", "match": ["git *", "npm *"], "effect": "allow" }, { "capability": "mcp", "match": ["@github/issue_read", "@github/search_issues"], "effect": "allow" } ] }, "resources": [ "file://README.md", "file://CONTRIBUTING.md", "file://docs/**/*.md" ], "hooks": [ { "name": "git-status", "trigger": "SessionStart", "action": { "type": "command", "command": "git status --porcelain" } }, { "name": "current-branch", "trigger": "SessionStart", "action": { "type": "command", "command": "git branch --show-current" } } ] }
Use cases:
This custom agent focuses specifically on code review tasks, with tools and context optimized for analyzing code quality, security, and best practices.
{ "name": "code-review-agent", "description": "Specialized agent for code review and quality analysis", "prompt": "You are a code review specialist focused on quality, security, and best practices", "tools": ["read", "shell"], "allowedTools": ["read"], "permissions": { "rules": [ { "capability": "shell", "match": ["grep *", "find *", "git diff *", "git log *", "eslint *", "pylint *"], "effect": "allow" }, { "capability": "shell", "match": ["rm *", "sudo *"], "effect": "deny" } ] }, "resources": [ "file://CONTRIBUTING.md", "file://docs/coding-standards.md", "file://.eslintrc.json", "file://pyproject.toml" ], "hooks": [ { "name": "changed-files", "trigger": "SessionStart", "action": { "type": "command", "command": "git diff --name-only HEAD~1" } } ] }
Use cases:
This example shows how to create a custom agent tailored to a specific project, including project-specific MCP servers, documentation, and build processes.
{ "name": "mobile-app-agent", "description": "Agent for the mobile app backend project", "prompt": "You are a backend development specialist for mobile applications with expertise in Docker and database management", "mcpServers": { "docker": { "command": "docker-mcp-server", "args": ["--socket", "/var/run/docker.sock"] }, "database": { "command": "postgres-mcp-server", "args": ["--connection", "postgresql://localhost:5432/myapp"], "env": { "PGPASSWORD": "${DATABASE_PASSWORD}" } } }, "tools": ["read", "write", "shell", "@docker", "@database"], "allowedTools": ["read", "@docker/docker_ps", "@docker/docker_logs", "@database/query_read_only"], "toolAliases": { "@docker/docker_ps": "containers", "@docker/docker_logs": "logs", "@database/query_read_only": "query" }, "permissions": { "rules": [ { "capability": "fs_write", "match": ["src/**", "tests/**", "migrations/**", "docker-compose.yml", "Dockerfile"], "effect": "allow" }, { "capability": "shell", "match": ["npm test", "npm run build", "docker-compose *"], "effect": "allow" }, { "capability": "shell", "match": ["rm -rf *", "sudo *"], "effect": "deny" } ] }, "resources": [ "file://README.md", "file://docs/api-documentation.md", "file://docs/database-schema.md", "file://docker-compose.yml" ], "hooks": [ { "name": "compose-status", "trigger": "SessionStart", "action": { "type": "command", "command": "docker-compose ps" } }, { "name": "git-status", "trigger": "SessionStart", "action": { "type": "command", "command": "git status --porcelain" } } ] }
Use cases:
This example shows an agent configured to use a remote MCP server:
{ "name": "domain-finder", "description": "Agent with access to domain search capabilities", "prompt": "You help users find and research domain names using the find-a-domain service.", "mcpServers": { "find-a-domain": { "type": "http", "url": "https://api.findadomain.dev/mcp" } }, "tools": ["@find-a-domain"], "allowedTools": ["@find-a-domain"] }
This agent provides access to domain search tools through a remote MCP server. If the server requires OAuth authentication, use the /mcp command to authenticate when prompted.
For servers requiring OAuth with specific scopes:
{ "name": "github-agent", "description": "Agent with GitHub API access", "mcpServers": { "github": { "type": "http", "url": "https://api.github.com/mcp", "oauthScopes": ["repo", "user", "read:org"] } }, "tools": ["@github"], "allowedTools": ["@github"] }
If you encounter OAuth scope errors, you can use an empty array to bypass scope requirements:
{ "name": "github-agent", "description": "Agent with GitHub API access", "mcpServers": { "github": { "type": "http", "url": "https://api.github.com/mcp", "oauthScopes": [] } }, "tools": ["@github"], "allowedTools": ["@github"] }
/upgrade-agent to migrate v2 configs
Agent examples