🤖 AI Assistants & Agents: Before working with this repository, please read AGENTS.md for comprehensive context, architecture, and navigation. The following AI instruction files are all symlinks to AGENTS.md for simplified automation — each AI platform automatically reads its own named file and receives the same unified context:
CLAUDE.md·CURSOR.md·GEMINI.md·QWEN.md·N8N.md·SUPABASE.md→ AGENTS.md
A comprehensive collection of templates and examples for creating GitHub Copilot custom agents.
- What's Included
- Quick Start
- Available Templates
- Features
- Getting Started
- Usage Examples
- Development Environments
- Repository Structure
- Agent Frameworks
- Use Cases
- Resources
- Best Practices
- Troubleshooting
- Contributing
- License
This repository provides ready-to-use templates for creating specialized GitHub Copilot agents:
- Comprehensive Template: A blank template with all recommended sections
- Example Agents: Pre-built agents for common use cases
- Documentation: Detailed guides on creating and customizing agents
- Best Practices: Tips and patterns for effective agent design
Run the bootstrap script to set up your development environment:
bash bootstrap.shFor automated or CI/CD setup, use the command-line flags to bypass interactive prompts:
# General automated setup (auto-detects method)
bash bootstrap.sh --env common --yes
# Specific method and environment
bash bootstrap.sh --method nix --env security --yes
# Install all available APT environments
bash bootstrap.sh --method apt --env all --yes--method <nix|apt>: Specify the setup method (Nix is recommended for reproducible environments).--env <name>: Specify the environment type (e.g.,common,test,security,all).-y,--yes: Assume yes to all prompts and run non-interactively.--help: Show all available options and environments.
The script will:
- Detect your system (Nix or APT)
- Install required dependencies
- Set up your chosen environment (test, docker, documentation, etc.)
- Verify the setup
- Explore the templates in the
.github/agents/directory - Copy a template that fits your needs from
.github/agents/ - Customize the agent for your specific requirements
- Verify the template using the validation script:
python3 src/scripts/validate_agents.py - Use in your repository or organization
See .github/agents/README.md for detailed instructions.
Comprehensive blank template with all recommended sections for creating custom agents from scratch.
Specialized agent for writing comprehensive tests without modifying production code. Status: Ready to use immediately!
Expert agent for creating clear, comprehensive documentation, READMEs, and guides. Status: Ready to use immediately!
Code review specialist focused on quality, security, and best practices. Status: Ready to use immediately!
Ready-to-use agent for safe code refactoring and improving maintainability. Status: Ready to use immediately!
Ready-to-use agent for building README.md and AGENTS.md from template files with variable substitution. Status: Ready to use immediately!
See AGENTS.md - Using the Documentation-Builder Agent for usage examples.
Specialized agent for identifying security vulnerabilities and recommending remediations. Status: Ready to use immediately!
Specializes in:
- OWASP Top 10 vulnerabilities
- Hardcoded secrets and credentials detection
- Input validation and sanitization
- Dependency security audits
- Secure coding patterns and best practices
Expert agent for Docker, Dockerfiles, docker-compose, and Kubernetes YAML configurations. Status: Ready to use immediately!
Specializes in:
- Optimized Dockerfiles with multi-stage builds
- docker-compose configurations
- Kubernetes manifests (Deployments, Services, ConfigMaps, Secrets)
- CI/CD pipeline YAML
- Container security and best practices
Production-ready Dockerfile template and comprehensive .dockerignore file following Docker best practices.
Includes:
- Multi-stage build (builder + production stages)
- Non-root user for security
- Health check configuration
- Layer optimization with clear customization comments
- Comprehensive
.dockerignorefor clean builds
Usage:
# Copy and customize for your project
cp Dockerfile.template Dockerfile
# Ensure you also create or copy an appropriate .dockerignore to avoid sending large/unsafe build contexts
# Edit the Dockerfile and .dockerignore to match your applicationExpert agent for Ansible automation, playbooks, roles, and infrastructure configuration management. Status: Ready to use immediately!
Specializes in:
- Ansible playbooks and role development
- Inventory management (static and dynamic)
- Jinja2 templates for configuration
- Ansible Vault for secrets management
- Molecule testing for roles
- CI/CD integration with Ansible
Well-structured templates following GitHub's best practices
Real-world examples demonstrating different agent types
Comprehensive documentation with step-by-step guides
Customizable for any language, framework, or workflow
Production-ready agents you can use immediately
New to custom agents? See the sections below to get up and running quickly!
# Create the agents directory
mkdir -p .github/agents
# Copy a template
cp TEMPLATE.agent.md your-agent-name.agent.md
# Edit and customize
# Then commit to your repositoryCreate a .github-private repository in your organization and add agent files to the .github/agents/ directory. All organization repositories can then use these agents.
@test-specialist write unit tests for the UserService class
The agent will create comprehensive tests without modifying production code.
@documentation-expert create API documentation for the /api/users endpoint
The agent will generate clear, comprehensive API documentation.
@code-reviewer review this pull request for security issues
The agent will analyze code for quality, security vulnerabilities, and best practices.
@refactoring-assistant this function is too complex, help me break it down
The agent will safely refactor code while maintaining functionality.
@docker-specialist create an optimized Dockerfile for this Node.js application
The agent will create multi-stage Dockerfiles following best practices.
@security-auditor audit this code for OWASP Top 10 vulnerabilities
The agent will perform a comprehensive security audit and recommend remediations.
Each agent has a corresponding Nix environment with all necessary tools pre-configured:
# Test Specialist environment
nix develop ./nix/test
# Docker Specialist environment
nix develop ./nix/docker
# Documentation environment
nix develop ./nix/documentation
# Code Review environment
nix develop ./nix/code-review
# Refactoring environment
nix develop ./nix/refactoring
# Wrangler environment (Cloudflare Workers)
nix develop ./nix/wrangler
# Terraform environment (Infrastructure as Code)
nix develop ./nix/terraform
# Ansible environment (Configuration Management)
nix develop ./nix/ansible
# Security environment (Auditing and Scanning)
nix develop ./nix/securitySee AGENTS.md - Nix Development Environments for complete setup instructions and environment details.
For Debian/Ubuntu systems, corresponding APT package lists are available:
# Install common development tools
sudo apt install -y $(cat apt/common/packages.txt | grep -v '^#' | tr '\n' ' ')
# Install test environment packages
sudo apt install -y $(cat apt/test/packages.txt | grep -v '^#' | tr '\n' ' ')
# Install docker environment packages
sudo apt install -y $(cat apt/docker/packages.txt | grep -v '^#' | tr '\n' ' ')See AGENTS.md - APT Package Lists for all available environments and detailed usage instructions.
Comprehensive documentation for the agent framework:
docs/api/- API reference documentationdocs/guides/- Step-by-step guides and tutorialsdocs/reference/- Technical specifications and architecture
See AGENTS.md - Documentation Directory and docs/AGENT_PROMPTS.md for working with documentation.
Data files, configurations, and schemas:
data/schemas/- JSON schemas and API specificationsdata/configs/- Configuration templates and examplesdata/examples/- Sample data for testing and demos
See AGENTS.md - Data Directory and data/AGENT_PROMPTS.md for working with data files.
Source code and automation scripts:
src/agents/- Custom agent implementationssrc/utils/- Utility functions and librariessrc/scripts/- Automation and deployment scripts
See AGENTS.md - Source Code Directory and src/AGENT_PROMPTS.md for development guidelines.
terraform/- CloudFlare deployment modules and templatesnix/- Reproducible development environmentsapt/- Debian/Ubuntu package lists
Custom agents are perfect for:
- Specialized tasks: Testing, documentation, refactoring
- Team standards: Enforcing coding conventions and style
- Domain expertise: Agents with deep knowledge of your stack
- Workflow automation: CI/CD, deployment, maintenance tasks
This repository includes comprehensive documentation for multiple agent frameworks:
GitHub Copilot agents are defined in .github/agents/ directory using markdown files with YAML front matter. See the templates and examples in this repository for GitHub Copilot agent development.
Cursor provides a different approach with powerful features like:
- Rules System: Static context in
.cursor/rules/ - Skills: Dynamic capabilities with
SKILL.mdfiles - Subagents: Parallel execution with specialized agents
- Agent Modes: Agent, Ask, and Plan modes
- MCP Integration: Connect to external tools and data sources
See AGENTS.md for complete Cursor agent documentation.
n8n is a visual workflow automation platform with comprehensive AI agent capabilities:
- AI Agent Node: Autonomous decision-making with tools
- LangChain Integration: Cluster nodes architecture with chains and agents
- Multi-Agent Patterns: Four workflow patterns (Chained, Single Agent, Multi-Agent Gatekeeper, Multi-Agent Teams)
- MCP Integration: Connect to external tools via Model Context Protocol
- RAG Support: Build retrieval-augmented generation systems
- 5000+ Templates: Pre-built workflow templates for various use cases
See AGENTS.md for complete n8n agent documentation.
- Start Simple: Begin with basic instructions and refine based on results
- Test Incrementally: Use your agent for small tasks first, then gradually increase complexity
- Provide Context: Give your agent relevant code snippets or file names in your requests
- Use Examples: The more examples you include in your agent file, the better it performs
- Set Clear Boundaries: Explicitly tell your agent what NOT to do to avoid unwanted changes
- Specialization: One agent should do one thing well - avoid "do everything" agents
- Concrete Examples: Provide specific code examples, not just general descriptions
- Clear Commands: List exact commands to run (build, test, lint)
- Explicit Boundaries: State what the agent should NOT do
- Real-World Testing: Test agents in actual scenarios before sharing with your team
- Keep Updated: Update agent instructions as your project evolves
- Version Control: Always commit agents to version control
- Team Collaboration: Share successful agents with your team
- Iterate: Refine agents based on feedback and usage patterns
Symptoms: Agent doesn't respond when invoked with @agent-name
Solutions:
- Verify the file is named
*.agent.md - Check it's in
.github/agents/directory - Ensure YAML front matter is uncommented and valid
- Confirm the file is committed and pushed to the default branch
- Wait a few minutes for GitHub to process the new agent
- Check that you have a GitHub Copilot Pro+ subscription
Symptoms: Agent ignores your instructions or behaves unexpectedly
Solutions:
- Be more specific in your agent instructions
- Add concrete code examples to the agent file
- Explicitly state boundaries (what NOT to do)
- Test with simple requests first
- Remove conflicting or unclear instructions
- Provide more context in your prompts
Symptoms: Agent doesn't appear in autocomplete
Solutions:
- Type
@in Copilot Chat to see all available agents - Check the agent name matches the YAML
namefield exactly - Verify you have access to custom agents (requires GitHub Copilot Pro, Business, or Enterprise)
- Ensure the agent file is on the repository's default branch
Symptoms: Generated files contain {{VARIABLE}} instead of values
Solutions:
- Check variable name spelling in templates
- Ensure values were provided to the agent
- Verify template file syntax is correct
- Make sure you're using the correct variable format:
{{VARIABLE_NAME}}
For more troubleshooting help, see AGENTS.md comprehensive troubleshooting section.
Thank you for your interest in contributing to this project! We welcome contributions of all kinds.
We welcome the following types of contributions:
- New Agent Templates: Share agent templates you've created that could benefit others
- Template Improvements: Enhance existing templates with better examples or documentation
- Documentation: Improve guides, add troubleshooting tips, or clarify instructions
- Bug Fixes: Fix errors or issues in existing templates
- Best Practices: Share insights and patterns that make agents more effective
- Check if a similar agent template already exists
- Ensure your agent follows GitHub's custom agent guidelines
- Test your agent thoroughly in a real project
- Make sure it provides value beyond existing templates
Your agent template should include:
- Clear YAML front matter with
nameanddescription - Well-defined role and responsibilities
- Specific commands relevant to the agent's purpose
- Code examples demonstrating the agent's style
- Boundaries clearly stating what the agent should NOT do
- Best practices specific to the agent's domain
- Real-world examples showing the agent in action
-
Fork this repository
-
Create a new branch for your agent:
git checkout -b add-agent-name
-
Create your agent file in
.github/agents/:# Example: .github/agents/security-auditor.agent.md -
Follow the template structure:
- Use the same sections as existing agents
- Provide concrete examples, not just descriptions
- Include both commented and uncommented versions if helpful
-
Update documentation:
- Add your agent to
.github/agents/README.md - Add your agent to the main
README.md - Include a brief description and use case
- Add your agent to
-
Test your agent:
- Use it in a real project
- Verify it follows the instructions correctly
- Ensure it respects boundaries
-
Submit a pull request:
- Provide a clear description of your agent
- Explain the use case and benefits
- Include examples of the agent in action (optional but helpful)
- File names: Use kebab-case (e.g.,
api-security-expert.agent.md) - Agent names: Use kebab-case in YAML (e.g.,
api-security-expert) - this matches the file name - Descriptions: Be specific and action-oriented
- Use consistent formatting across the template
- Include syntax highlighting in code blocks
- Provide working, tested code examples
- Follow the language/framework conventions you're documenting
- Write in clear, concise language
- Use active voice
- Include examples for every major concept
- Structure content with clear headings
- Use bullet points for lists
- Use emoji sparingly and consistently
All agent templates should:
- Be properly formatted Markdown
- Include complete YAML front matter
- Have tested, working code examples
- Specify clear boundaries and restrictions
- Follow GitHub's agent guidelines
- Be useful for real-world scenarios
- Not duplicate existing templates
Before submitting, verify your template includes:
- YAML front matter with
nameanddescription - Clear agent role and expertise section
- Relevant commands for the agent's domain
- Code style guidelines with examples
- Testing requirements (if applicable)
- Project context section
- Boundaries and restrictions
- Git workflow guidelines
- Best practices
- Real-world examples
- Additional resources
- Add missing sections or examples
- Improve clarity of instructions
- Update outdated information
- Fix errors or typos
- Add troubleshooting tips
- Include additional use cases
- Open an issue describing the improvement
- Wait for feedback (or proceed if it's a clear fix)
- Make your changes
- Submit a pull request referencing the issue
- Troubleshooting guides
- Common pitfalls and solutions
- Advanced techniques
- Integration examples
- Video tutorials (link to external resources)
- Keep it practical and actionable
- Include code examples
- Link to official GitHub documentation
- Use screenshots when helpful
- Test all instructions before submitting
- Be respectful and inclusive
- Welcome newcomers
- Focus on constructive feedback
- Assume good intentions
- Help others learn
- Harassment or discrimination
- Trolling or insulting comments
- Publishing others' private information
- Other unprofessional conduct
If you have questions about contributing:
- Check the README for project overview
- Look at existing agents for examples
- Open an issue with your question
- Tag it with
questionlabel
- Usefulness: Does this agent solve a real problem?
- Quality: Is it well-documented with clear examples?
- Originality: Does it add value beyond existing templates?
- Completeness: Does it include all recommended sections?
- Testing: Has it been tested in a real scenario?
- Initial review: Within 3-5 days
- Feedback: We'll provide constructive feedback
- Approval: Once all requirements are met
- Merge: After approval and any final adjustments
Contributors will be:
- Listed in commit history
- Credited in release notes
- Acknowledged in the community
- Issues: For bugs or feature requests
- Discussions: For questions and community chat
- Pull Requests: For contributing code or documentation
Thank you for helping make this project better for everyone!
Unlicense (Public Domain) - See LICENSE for details.