Claude Code agent generation system that creates custom agents and sub-agents with enhanced YAML frontmatter, tool access patterns, and MCP integration support following proven production patterns

MITAuto-check passedAgent Workflows

Install Agent Factory

skills CLI
$ npx skills add alirezarezvani/claude-code-skill-factory --skill agent-factory -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install alirezarezvani/claude-code-skill-factory agent-factory --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/alirezarezvani/claude-code-skill-factory.git skills-src && mkdir -p .claude/skills && cp -r skills-src/generated-skills/agent-factory .claude/skills/agent-factory && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
agent-factory
GitHub stars
880
Token cost
~2k tokens
SKILL.md length
686 words
Files
6
Skills in repo
12
Repo updated
First seen
Licence
MIT

At a glance

Claude Code agent generation system that creates custom agents and sub-agents with enhanced YAML frontmatter, tool access patterns, and MCP integration support following proven production patterns

  • Works in 6 steps: Generate Custom Agents - Create… → Enhanced YAML Frontmatter - Rich… → Tool Access Guidance - Recommends… → …
  • Tasks that involve MCP servers
  • SKILL.md covers What This Skill Does, Agent Types Supported, Enhanced YAML Frontmatter and How to Use, plus 8 more sections
  • Runs Python scripts from its folder; calls npm

What it does

Agent Factory is an agent skill from alirezarezvani/claude-code-skill-factory. Claude Code agent generation system that creates custom agents and sub-agents with enhanced YAML frontmatter, tool access patterns, and MCP integration support following proven production patterns

Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files (for example `HOW_TO_USE.md`, `agent_generator.py` and `expected_output.json`).

It sits in Agent Workflows, covering MCP servers and Subagents. It works with Bash. The repository describes itself as: Claude Code Skill Factory — A powerful open-source toolkit for building and deploying production-ready Claude Skills, Code Agents, custom Slash Commands, and LLM Prompts at… The licence is MIT.

When your agent uses it

  • Tasks that involve MCP servers
  • Tasks that involve Subagents

Example prompts

  • “/agent-factory”

Requirements

  • Python 3

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Generate Custom Agents - Create specialized agents for any domain (frontend, backend, testing, product, etc.)
  2. Enhanced YAML Frontmatter - Rich metadata including color coding, field categorization, expertise levels
  3. Tool Access Guidance - Recommends optimal tool configurations based on agent type
  4. MCP Integration - Suggests relevant MCP server tools for enhanced capabilities
  5. Execution Pattern Assignment - Ensures proper parallel/sequential execution for safety
  6. Validation - Checks agent configuration against best practices

What it can do on your machine

Read from SKILL.md and the folder at commit ba18b31. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships script files (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • npm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npm, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Agent Factory loads about 2k tokens when it runs. Until then it costs about 53 tokens; SKILL.md has 686 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~53
When it runs · the whole SKILL.md, loaded when a task matches
~2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from alirezarezvani/claude-code-skill-factory at commit ba18b31, republished under its MIT licence (© alirezarezvani). 686 words, ~2,037 tokens.

Download SKILL.mdSave it as .claude/skills/agent-factory/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.
name
agent-factory
description
Claude Code agent generation system that creates custom agents and sub-agents with enhanced YAML frontmatter, tool access patterns, and MCP integration support following proven production patterns

Agent Factory

A comprehensive system for generating production-ready Claude Code agents and sub-agents. This skill provides templates, standards, and generation tools to create custom agents that seamlessly integrate with Claude Code's agent system.

What This Skill Does

This skill helps you create custom Claude Code agents for any domain or workflow. It generates properly formatted agent files that Claude Code can automatically discover and invoke when relevant.

Capabilities
  1. Generate Custom Agents - Create specialized agents for any domain (frontend, backend, testing, product, etc.)
  2. Enhanced YAML Frontmatter - Rich metadata including color coding, field categorization, expertise levels
  3. Tool Access Guidance - Recommends optimal tool configurations based on agent type
  4. MCP Integration - Suggests relevant MCP server tools for enhanced capabilities
  5. Execution Pattern Assignment - Ensures proper parallel/sequential execution for safety
  6. Validation - Checks agent configuration against best practices

Agent Types Supported

Strategic Agents (Lightweight, Parallel-Safe)
  • Purpose: Planning, research, analysis
  • Tools: Read, Write, Grep only
  • Execution: 4-5 agents can run in parallel
  • Color: Blue
  • Examples: product-planner, market-researcher, architect
Implementation Agents (Full Tools, Coordinated)
  • Purpose: Code writing, feature building
  • Tools: Read, Write, Edit, Bash, Grep, Glob
  • Execution: 2-3 agents coordinated
  • Color: Green
  • Examples: frontend-developer, backend-developer, api-builder
Quality Agents (Heavy Bash, Sequential Only)
  • Purpose: Testing, validation, review
  • Tools: Read, Write, Edit, Bash, Grep, Glob
  • Execution: 1 agent at a time (NEVER parallel)
  • Color: Red
  • Examples: test-runner, code-reviewer, security-auditor
Coordination Agents (Lightweight, Orchestration)
  • Purpose: Manages other agents, validates integration
  • Tools: Read, Write, Grep
  • Execution: Orchestrates others
  • Color: Purple
  • Examples: fullstack-coordinator, workflow-manager

Enhanced YAML Frontmatter

Every generated agent includes rich metadata:

yaml
---
name: agent-name-kebab-case
description: When to invoke this agent
tools: Read, Write, Edit  # Comma-separated
model: sonnet  # sonnet|opus|haiku|inherit
color: green  # Visual categorization
field: frontend  # Domain area
expertise: expert  # beginner|intermediate|expert
mcp_tools: mcp__playwright  # MCP integrations
---
Field Categories

Development: frontend, backend, fullstack, mobile, devops Quality: testing, security, performance Strategic: product, architecture, research, design Domain: data, ai, content, finance, infrastructure

Color Coding
  • Blue: Strategic/planning agents
  • Green: Implementation/development agents
  • Red: Quality/testing agents
  • Purple: Coordination/orchestration agents
  • Orange: Domain-specific specialists
Expertise Levels
  • Beginner: Simple, focused tasks
  • Intermediate: Moderate complexity workflows
  • Expert: Advanced, complex operations

How to Use

Quick Start
  1. Open the prompt template: documentation/templates/AGENTS_FACTORY_PROMPT.md
  2. Scroll to bottom - Find template variables
  3. Fill in your details:
    AGENT_NAME: my-custom-agent
    DESCRIPTION: What this agent does and when to invoke it
    DOMAIN_FIELD: frontend
    TOOLS_NEEDED: Read, Write, Edit, Bash
  4. Copy entire prompt - Include filled variables
  5. Paste into Claude - Claude.ai, Claude Code, or API
  6. Receive agent file - Complete .md file ready to use
  7. Install agent - Copy to .claude/agents/ or ~/.claude/agents/
Example Invocation
@agent-factory

Create a custom agent:
Name: api-integration-specialist
Type: Implementation
Domain: backend
Description: API integration expert for third-party services
Capabilities: OAuth, REST clients, error handling
Tools: Read, Write, Edit, Bash
MCP: mcp__github

Output: Complete .claude/agents/api-integration-specialist.md file

Generated Agent Structure

Each generated agent is a single Markdown file:

markdown
---
name: custom-agent
description: Triggers auto-invocation
tools: Read, Write, Edit
model: sonnet
color: green
field: backend
expertise: expert
mcp_tools: mcp__github
---

You are a [role] specializing in [domain].

When invoked:
1. [Step 1]
2. [Step 2]
3. [Step 3]

[Detailed instructions]
[Checklists]
[Best practices]
[Output format]

Integration Workflows

Workflow 1: Feature Development
1. product-planner → Creates requirements
2. frontend-developer + backend-developer → Build (parallel)
3. test-runner → Validates (sequential)
4. code-reviewer → Reviews (sequential)
Workflow 2: Bug Fix
1. debugger → Analyzes issue
2. [appropriate-dev-agent] → Fixes
3. test-runner → Validates fix
Workflow 3: Code Review
1. code-reviewer → Quality review (can run solo)
2. security-auditor → Security scan (can run solo)
Show full SKILL.md (289 more words)Show less

MCP Tool Integration

Common MCP servers to integrate:

  • mcp__github: PR reviews, issues, repo operations
  • mcp__playwright: E2E testing, screenshots, browser automation
  • mcp__context7: Documentation search, knowledge queries
  • mcp__filesystem: Advanced file operations
  • Custom MCP servers: Any user-configured MCP tools

Agents automatically reference MCP tools in their capabilities when configured.

Safety & Performance

Process Monitoring

Agents consume system resources. Monitor with:

bash
ps aux | grep -E "mcp|npm|claude" | wc -l

Safe ranges:

  • 15-20: Strategic agents (parallel)
  • 20-30: Implementation agents (coordinated)
  • 12-18: Quality agents (sequential)

Warnings:

  • 30: Reduce parallelization

  • 60: Critical - restart system

Execution Rules

✅ Safe: 4-5 strategic agents in parallel ✅ Safe: 2-3 implementation agents coordinated ❌ Unsafe: Quality agents in parallel (crashes system)

Best Practices

  1. Keep agents focused - One clear responsibility per agent
  2. Use descriptive descriptions - Enables auto-invocation
  3. Follow tool access patterns - Match tools to agent type
  4. Specify execution pattern - Prevents performance issues
  5. Leverage MCP tools - Enhance agent capabilities
  6. Test agents incrementally - Start simple, add complexity
  7. Version control agents - Check project agents into git

Limitations

  • Agents are templates - customize for your specific needs
  • Tool suggestions are guidelines, not requirements
  • MCP tools require servers to be configured
  • Performance depends on system resources
  • Generated agents need testing in your environment

Installation

Generated Agent Files:

Place in one of these locations:

Project agents (shared with team):

bash
.claude/agents/custom-agent.md

Personal agents (available everywhere):

bash
~/.claude/agents/custom-agent.md

When to Use This Skill

Create custom agents for:

  • Domain-specific workflows (data science, ML, finance)
  • Team-specific conventions (your code style, testing approach)
  • Specialized tools or frameworks (Shopify, AWS, Kubernetes)
  • Custom MCP server integrations
  • Rapid prototyping of agent ideas

Use the AGENTS_FACTORY_PROMPT.md template when:

  • You need multiple related agents
  • You want consistent agent patterns
  • You're building an agentic framework
  • You want to test agent concepts quickly

Version: 1.0.0 Last Updated: October 22, 2025 Compatibility: Claude Code (agents system) Template Location: documentation/templates/AGENTS_FACTORY_PROMPT.md

© alirezarezvani, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 5 other files in generated-skills/agent-factory of alirezarezvani/claude-code-skill-factory.

  • SKILL.md
  • HOW_TO_USE.md
  • agent_generator.py
  • expected_output.json
  • generated-agents/software-architect.md
  • sample_input.json

Open the folder on GitHubat commit ba18b31

Compare with similar skills

Agent Factory next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Agent Factory compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Agent Factory this skillalirezarezvani/claude-code-skill-factory880—~2kAutomated safety check: PassMIT
Crush Configurationcharmbracelet/crush29k—~3.7kAutomated safety check: PassCustom licence
Skill Stocktakeaffaan-m/ECC276k5 repos~1.9kAutomated safety check: PassMIT
Claude Automation Recommenderanthropics/claude-plugins-official38k3 repos~2.7kAutomated safety check: NotesApache-2.0
CC Workflow Studio AI Editorbreaking-brake/cc-wf-studio5.4k—~561Automated safety check: PassCustom licence
Agent Deckasheshgoplani/agent-deck1k—~1.7kAutomated safety check: PassMIT

Similar skills

  • Crush Configuration

    charmbracelet/crush

    Explains how to configure the Crush coding agent with crushrc or crush.json, covering providers, models, LSPs, MCP servers, hooks, permissions and config precedence.

    29k GitHub stars~3.7k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Skill Stocktake

    affaan-m/ECC

    Audits your installed Claude skills and commands for quality, with a quick mode for recently changed skills and a full mode that evaluates all of them through subagents.

    276k GitHub starsUsed in 5 repos~1.9k tokens
    Agent WorkflowsAuto-check passed
  • Claude Automation Recommender

    anthropics/claude-plugins-official

    Official

    Scans a codebase and suggests which Claude Code hooks, subagents, skills, plugins and MCP servers fit its stack, without changing any files.

    38k GitHub starsUsed in 3 repos~2.7k tokens
    Agent WorkflowsAuto-check: notes
  • CC Workflow Studio AI Editor

    breaking-brake/cc-wf-studio

    Creates and edits visual agent workflows in CC Workflow Studio through conversation, with the agent reading and writing the canvas over MCP.

    5.4k GitHub stars~561 tokensUpdated 2 days ago
    Agent WorkflowsAuto-check passed
  • Agent Deck

    asheshgoplani/agent-deck

    agent-deck, the terminal session manager for AI coding agents.

    1k GitHub stars~1.7k tokensUpdated 3 days ago
    Agent WorkflowsAuto-check passed
  • Record Demo

    apify/mcpc

    Official

    Record or regenerate the mcpc demo GIFs (the README hero docs/images/mcpc-demo.gif and the focused tapes in docs/vhs/) with VHS.

    990 GitHub stars~3.3k tokensUpdated today
    Agent WorkflowsAuto-check: notes

More from alirezarezvani/claude-code-skill-factory

All 12 skills in this repo
  • App Store Optimization

    alirezarezvani/claude-code-skill-factory

    Complete App Store Optimization (ASO) toolkit for researching, optimizing, and tracking mobile app performance on Apple App Store and Google Play Store

    880 GitHub starsUsed in 8 repos~4.1k tokens
    Auto-check passed
  • Claude Md Enhancer

    alirezarezvani/claude-code-skill-factory

    Analyzes, generates, and enhances CLAUDE.md files for any project type using best practices, modular architecture support, and tech stack customization.

    880 GitHub stars~4.1k tokensUpdated 11 mo ago
    Auto-check passed
  • Content Trend Researcher

    alirezarezvani/claude-code-skill-factory

    Advanced content and topic research skill that analyzes trends across Google Analytics, Google Trends, Substack, Medium, Reddit, LinkedIn, X, blogs, podcasts, and YouTube to generate data-driven…

    880 GitHub starsUsed in 1 repo~2.1k tokens
    Auto-check passed
  • TDD Guide

    alirezarezvani/claude-code-skill-factory

    Comprehensive Test Driven Development guide for engineering subagents with multi-framework support, coverage analysis, and intelligent test generation

    880 GitHub starsUsed in 1 repo~2.7k tokens
    Auto-check passed
  • Codex CLI Bridge

    alirezarezvani/claude-code-skill-factory

    Bridge between Claude Code and OpenAI Codex CLI - generates AGENTS.md from CLAUDE.md, provides Codex CLI execution helpers, and enables seamless interoperability between both tools

    880 GitHub stars~2.2k tokensUpdated 11 mo ago
    Auto-check passed
  • Hook Factory

    alirezarezvani/claude-code-skill-factory

    Generate production-ready Claude Code hooks with interactive Q&A, automated installation, and enhanced validation.

    880 GitHub stars~3.1k tokensUpdated 11 mo ago
    Auto-check passed

Works with

Categories

Questions about Agent Factory

What does Agent Factory do?

Claude Code agent generation system that creates custom agents and sub-agents with enhanced YAML frontmatter, tool access patterns, and MCP integration support following proven production patterns. Agent Factory is an agent skill from alirezarezvani/claude-code-skill-factory.

When should I use Agent Factory?

Agent Factory fits situations like: tasks that involve MCP servers; tasks that involve Subagents.

How do I install Agent Factory in Claude Code?

Run `npx skills add alirezarezvani/claude-code-skill-factory --skill agent-factory -a claude-code`. Or copy the skill folder (generated-skills/agent-factory in alirezarezvani/claude-code-skill-factory) into .claude/skills/agent-factory in your project. Claude Code loads it when a task matches its description.

How do I install Agent Factory in Codex?

Run `npx skills add alirezarezvani/claude-code-skill-factory --skill agent-factory -a codex`. Or copy the skill folder (generated-skills/agent-factory in alirezarezvani/claude-code-skill-factory) into .agents/skills/agent-factory in your project. Codex loads it when a task matches its description.

Can I use Agent Factory in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add alirezarezvani/claude-code-skill-factory --skill agent-factory -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/agent-factory, .gemini/skills/agent-factory, .github/skills/agent-factory and .opencode/skills/agent-factory in your project.

What does Agent Factory need to run?

Going by SKILL.md and its folder, Agent Factory needs Python for the scripts in its folder and the command-line tools its instructions call (npm). Our summary lists: Python 3.

Does Agent Factory access the network?

SKILL.md contains no URLs. Its commands use npm, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Agent Factory safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Agent Factory use?

Agent Factory is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Agent Factory use?

About 2k tokens (SKILL.md is roughly 8.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Agent Factory?

Skills that share tags, products or a category with Agent Factory: Crush Configuration (charmbracelet/crush, 29k stars), Skill Stocktake (affaan-m/ECC, 276k stars), Claude Automation Recommender (anthropics/claude-plugins-official, 38k stars) and CC Workflow Studio AI Editor (breaking-brake/cc-wf-studio, 5.4k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Agent Factory?

alirezarezvani (a GitHub user) maintains it in alirezarezvani/claude-code-skill-factory, which has 880 GitHub stars. The repository holds 12 skills in this directory. The repository was last updated on November 12, 2025.

Source: alirezarezvani/claude-code-skill-factory on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.