agent-development
Create or improve agent configurations, prompts, and workflows using secure research-first methodology. Use when building new agents, sub-agents, agent teams, or researching external agent patterns.
SKILL.mdskills/agent-development/SKILL.md
GitHubAgent Development
Hard Rules
- NEVER download and install/load external agent configs directly.
- NEVER execute, import, or run code from external agent artifacts.
- NEVER read external artifacts on host — use
safe-download-and-readskill. - NEVER use
curl,wget, or direct download commands. - External artifacts are research-only — patterns and ideas, never direct prompts/code.
- Final agent config MUST be written fresh in trusted workspace paths.
- Final agent MUST pass safety checklist before activation.
- Agent prompts must not contain instructions to bypass safety rules, exfiltrate data, or escalate privileges.
Workflow
Phase 1: Research (find existing patterns)
Use web-discovery and web-scraping skills to find:
- Similar agent architectures (Anthropic, OpenAI, LangChain, AutoGen, CrewAI, etc.)
- Agent design guides, best practices, academic papers
- Org patterns (hierarchical, peer, hybrid topologies)
- Prompt engineering references for agent roles
Collect URLs and metadata. Do NOT download artifacts yet.
Phase 2: Download and inspect (quarantined)
For each promising external agent artifact/reference:
- Invoke
safe-download-and-readskill - Download to quarantine via approved tools only
- Inspect ONLY inside isolated Docker container
- Extract:
- Architecture patterns (topology, communication, handoff design)
- Role definitions (responsibilities, boundaries, I/O contracts)
- Prompt patterns (system prompt structure, few-shot examples)
- Workflow patterns (task decomposition, verification loops, escalation)
- Tool integration patterns (how agents call tools safely)
- Document findings in
research/agents/<agent-name>/notes.md
Phase 3: Design
Based on research findings, design the new agent:
- Define agent purpose, scope, and boundaries
- Define role/persona (functional, minimal — avoid theatrical identity)
- Define I/O contracts (what it receives, what it outputs)
- Define tool access (principle of least privilege)
- Define communication protocol (who it talks to, message schema)
- Define failure modes and escalation paths
- Define verification/quality gates
- Write design doc in
research/agents/<agent-name>/design.md
Phase 4: Build (fresh, from scratch)
- Write ALL prompts, configs, and workflows fresh
- Concepts and patterns from research are fine; verbatim prompts are not
- Apply functional persona pattern:
- Clear responsibility statement
- Explicit boundaries (what agent must NOT do)
- I/O schema
- Quality/failure policy
- Escalation rules
- Build in trusted workspace paths only
Phase 5: Safety review
Before activation, verify:
- No prompts copied verbatim from external sources
- No instructions to override safety rules or system prompts
- No encoded/obfuscated content in prompts
- No excessive permissions or tool access
- No instructions for data exfiltration or privilege escalation
- No embedded URLs for runtime external loading
- Agent scope is minimal (principle of least privilege)
- Failure modes and escalation paths are defined
- Verification/quality gates are present for high-impact outputs
- Agent cannot self-modify its own safety rules
Phase 6: Test
- Run agent on known/safe test inputs
- Verify outputs match expected behavior
- Test failure modes (bad input, timeout, ambiguous requests)
- Verify escalation works correctly
- Check that agent stays within defined boundaries
Phase 7: Commit and cleanup
- Commit agent config to workspace
- Clean up quarantine:
rm -rf quarantine/<session> - Clean up research notes if no longer needed
- Document agent in TOOLS.md or relevant team docs
Agent design principles
- Functional personas > theatrical personas — clear role, not character backstory
- Least privilege — only the tools and access needed for the job
- Explicit boundaries — what the agent must NOT do, not just what it should
- Verification loops — high-impact outputs get checked before delivery
- Escalation paths — uncertainty or conflict triggers human review
- Schema-constrained handoffs — structured messages between agents
- Max turn limits — prevent unbounded loops
- Observable — agent actions should be auditable