Agent Architecture
Agent Buildingagent-architectureAgent Architecture is an Agent Skill for agent building published in the majiayu000/claude-skill-registry repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Prompt-native architecture patterns, agent orchestration, iteration loops, and state management for autonomous work.
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Inspect the Agent Skill at https://github.com/majiayu000/claude-skill-registry/blob/HEAD/skills/development/agent-architecture/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/agent-architecture, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
Provide architectural guidance for prompt-native agent systems. This skill covers orchestration patterns, iteration loops, state management, and agent handoffs.
<essential_principles>
The Crew Philosophy
Agents work, you orchestrate. Spawn agents for heavy lifting, keep main thread light for decisions.
State survives compaction. All branch state lives in .claude/branches/{branch}/state.json.
Handoffs are mandatory. Every task completion creates a handoff. Knowledge persists.
Iteration until done. Use loops for tasks with verifiable completion criteria.
</essential_principles>
Task Routing
| Task | Resource |
|---|---|
| Agent orchestration | references/orchestration.md |
| Iteration loops | references/iteration-loop.md |
| State persistence | references/state-management.md |
| Architecture patterns | references/architecture/ |
Workflows
| Workflow | Purpose |
|---|---|
loop.md | Iteration loop for autonomous completion |
cancel-loop.md | Graceful loop termination |
handoff.md | Create context preservation documents |
compound.md | Extract learnings into permanent knowledge |
triage.md | Categorize and prioritize findings |
Domain Knowledge
Core Patterns
orchestration.md- Agent spawning patternsiteration-loop.md- Loop mechanics, completion promisesstate-management.md- Unified state format
Architecture (references/architecture/)
architecture-patterns.md- Prompt-native designorchestrator-patterns.md- Agent orchestrationsystem-prompt-design.md- System promptsmcp-tool-design.md- MCP tool patternsself-modification.md- Self-modifying systemsrefactoring-to-prompt-native.md- Migration patternsinfrastructure.md- Infrastructure patternsarchitecture-checklist.md- Review checklist