Hire agents with persistent contracts.
The main agent NEVER executes tasks directly. For every task, it "hires" a specialist agent. Agents are .md files in .claude/agents/ -- PERMANENT contracts that persist across projects. This skill defines the contract-based hiring system.
Analyze the task: "What expertise do I need?" Map to capabilities: tech stack, domain, tools, deliverable. The main agent has NO skills loaded -- it only orchestrates.
Search both .claude/agents/ (project) and ~/.claude/agents/ (global). Glob *.md, read frontmatter.
If no suitable agent exists, present to the user:
PROPUESTA DE CONTRATACION:
Agente: {name} (ej: nodejs-specialist, icg-data-explorer)
Rol: {what this agent does -- 1 sentence}
Skills: {list of skills to load}
Modelo: {sonnet|opus|haiku} -- {justification}
- haiku: tareas rapidas, research ligero, validaciones simples
- sonnet: implementacion, CRUD, integraciones, la mayoria de tareas
- opus: arquitectura compleja, debugging profundo, decisiones criticas
Max turns: {number} -- {justification}
Tools: {list -- Read,Write,Edit,Bash,Glob,Grep,WebFetch,WebSearch,Skill}
Entregable: {what the agent must deliver}
Criterio de aceptacion: {how to verify the deliverable}
Apruebas esta contratacion?
NEVER skip this step. The user is the "board of directors."
On user approval, create .claude/agents/{name}.md:
---