Generates Custom Agent files (.github/agents/*.agent.md) with persona-based configurations, specialized tool sets, and role-specific cognitive architectures. Use when the user requests a specialized role or perspective (Security Auditor, Documentation Writer, Release Engineer, etc.). Creates agents with defined identity, constrained tools, and thinking processes aligned to their role. Not for general capabilities—use generate-agent-skills for those.
63
73%
Does it follow best practices?
Impact
—
No eval scenarios have been run
Advisory
Suggest reviewing before use
Optimize this skill with Tessl
npx tessl skill review --optimize ./.github/skills/generate-agent/SKILL.mdThis skill generates Custom Agent files that act as persistent specialized roles with:
Key distinction:
Example agents:
Confirm the user wants a Custom Agent (not a skill or instruction).
Decision tree:
generate-agent-skills insteadgenerate-path-instructions insteadgenerate-repo-instructions insteadProceed only if creating a role-based agent.
Goal: Define the agent's identity, expertise, and perspective.
Load the role analysis checklist:
cat references/role_analysis_checklist.mdWork through the checklist to define:
Critical questions:
Example outputs:
Security Auditor:
Documentation Writer:
Goal: Determine which tools the agent needs (read/write/search).
Load the tool selection guide:
cat references/tool_selection_guide.mdDefault stance: Read-only
Decision framework:
| Agent Type | Typical Tools | Rationale |
|---|---|---|
| Auditor/Reviewer | Read + Grep + View | Analyzes, doesn't modify |
| Writer/Editor | Read + Write + Edit | Creates/updates content |
| Analyst | Read + Grep + Search | Discovers patterns |
| Maintainer | Read + Write + Bash | Manages files/configs |
Constraint checking:
createeditbashOutput: List of tools with justification
Example:
Security Auditor: view, grep, bash (read-only analysis + command scanning)
Documentation Writer: view, grep, create, edit
Goal: Define how this agent thinks (role-specific reasoning process).
Load cognitive architecture patterns:
cat references/cognitive_architecture_patterns.mdDesign the <thinking_process> based on role:
Components:
Example thinking processes:
Security Auditor:
<thinking_process>
1. **Threat Model First:** What could go wrong? What's the attack surface?
2. **Assume Breach Mindset:** If an attacker had access, what could they do?
3. **Check Common Vulnerabilities:** SQL injection, XSS, auth bypass, secrets exposure
4. **Trace Data Flow:** Where does user input flow? Is it sanitized?
5. **Prioritize by Impact:** Critical > High > Medium > Low severity
6. **Report with Evidence:** Include code snippets, line numbers, exploitation scenarios
</thinking_process>Documentation Writer:
<thinking_process>
1. **Audience First:** Who will read this? What's their knowledge level?
2. **Information Architecture:** How does this fit in existing docs structure?
3. **Clarity over Cleverness:** Simple, direct language. Avoid jargon.
4. **Show, Don't Tell:** Include examples, code snippets, screenshots
5. **Style Consistency:** Follow established voice, tone, formatting
6. **Completeness Check:** Did I answer what/why/how? Include edge cases?
</thinking_process>Goal: Generate the agent file using the template.
Load agent template:
cat assets/agent_template.mdPopulate these sections:
YAML Frontmatter:
name: kebab-case role name (e.g., security-auditor)description: One-sentence summary of role and purposetools: Array of tool names (validated in Step 3)Agent Identity:
Thinking Process:
<thinking_process> from Step 4Instructions:
Examples (Optional but Recommended):
File naming convention:
.github/agents/{{role-name}}.agent.mdsecurity-auditor.agent.md, doc-writer.agent.md, release-engineer.agent.mdCritical: XML Delimiters
<thinking_process>, <examples>, <constraints> tagsValidate the generated agent file:
# 1. Validate YAML frontmatter and structure
python3 .github/skills/generate-agent-skills/scripts/validate_skill.py --path .github/agents/
# 2. Check XML delimiter syntax
grep -E "<thinking_process>|</thinking_process>" .github/agents/{{agent-name}}.agent.md
# 3. Verify tool list matches allowed tools
# Allowed: view, edit, create, grep, glob, bash, task, etc.Final checklist:
Output to user:
✅ Created: .github/agents/{{agent-name}}.agent.md
🎭 Role: {{Job Title}}
🛠️ Tools: {{tool1, tool2, tool3}}
💡 Unique Value: {{one-sentence value prop}}
📖 To use: Reference this agent in your request or switch to it in VS CodeHelp the user understand how to use their new agent:
Activation methods:
Best practices:
Guides LLM through defining agent identity, expertise, and perspective.
Decision framework for choosing agent tools with security constraints.
Examples of role-specific thinking processes for common agent types.
Complete agent file template with XML delimiters and structure.
c5644f6
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.