subagent-builder

Build and configure custom subagents for Claude Code.

1|Updated Jan 15, 2026
One-click install
npx skills add https://github.com/mokbhai/claude --skill subagent-builder-mokbhai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: subagent-builder
Source: https://github.com/mokbhai/claude/tree/main/skills/subagent-builder
Command: npx skills add https://github.com/mokbhai/claude --skill subagent-builder-mokbhai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a robust, repeatable workflow for creating and configuring subagents in Claude Code. It enables isolation of context, targeted prompts, and lifecycle hooks to support task-specific automation without polluting the main conversation.

Core Features & Use Cases

  • Quick creation via the /agents workflow to generate a new subagent with project- or user-level scope
  • Manual setup by writing a Markdown file with YAML frontmatter and a system prompt
  • Structured subagent creation workflow: define purpose, choose scope, configure capabilities, write system prompt, select model, set permissions, and hooks
  • Access to domain patterns and templates (e.g., readonly analysts, fixers, domain specialists) to accelerate agent design
  • Optional resource directories (scripts/, references/, assets/) to extend capabilities when needed

Quick Start

  1. Run /agents in Claude Code
  2. Select Create new agent and choose scope: Project-level or User-level
  3. Describe the subagent and adjust tools, model, and prompts
  4. Save and start using the subagent immediately

Frequently Asked Questions about subagent-builder

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create custom subagents for Claude Code?

Create custom subagents for Claude Code by writing a Markdown file with YAML frontmatter and a system prompt, or use the /agents workflow for a structured setup. Define the agent's purpose, scope, tools, and model to isolate context for task-specific automation.

What is the purpose of using subagents in Claude Code?

The purpose of subagents in Claude Code is to isolate context and support task-specific automation without polluting the main conversation. They use targeted prompts and lifecycle hooks to handle specialized actions like readonly analysis or domain-specific fixes.

How do I configure lifecycle hooks and permissions for Claude Code subagents?

Configure lifecycle hooks and permissions for Claude Code subagents by defining the optional fields in YAML frontmatter. Set permissionMode and hooks alongside tools and model selections to control agent capabilities and execution boundaries.

Can I add custom scripts and references to a Claude Code subagent?

Yes, you can add custom scripts and references to a Claude Code subagent by utilizing optional directories. Create scripts/, references/, and assets/ directories to extend capabilities and provide domain-specific resources for the agent's workflow.

What is the difference between project-level and user-level subagents in Claude Code?

Project-level subagents are scoped to a specific project context, while user-level subagents apply across your entire environment. Choose the scope during creation to determine whether the isolated agent operates locally or globally.

Do I need specific dependencies to build subagents for Claude Code?

No specific dependencies are required to build subagents for Claude Code. You construct agents using a Markdown file with YAML frontmatter to define the name, description, model, tools, and hooks without external libraries.