| name | agent-architect |
| description | A meta-skill for designing, scaffolding, and implementing new Claude Code Agents/Skills. |
Agent Architect
Goal
To construct robust, production-grade AI agents by strictly following the Plan-and-Solve (SPARC) methodology.
Workflow
1. Specification (The "Plan")
- Ask: Clarify inputs, outputs, and constraints.
- Draft: Create
[agent-name]/SPEC.md using templates/SPEC_TEMPLATE.md.
- Review: Wait for user approval.
2. Architecture (The "Skeleton")
- Scaffold: Create directories (
scripts, references, tests).
- Generate: Create
[agent-name]/SKILL.md using templates/SKILL_TEMPLATE.md.
- Code Quality Setup: For Python projects, set up code quality tools:
- Create
pyproject.toml using templates/pyproject.toml.template
- Create
.pre-commit-config.yaml using templates/.pre-commit-config.yaml
- Create
tests/conftest.py using templates/conftest.py
3. Implementation (The "Solve")
- Scripting: Write complex logic in
[agent-name]/scripts/ (Python/Bash).
- Refinement: Update
SKILL.md to use these scripts.
- Code Quality: For Python implementations:
- Type Hints: Ensure all public functions have complete type annotations (PEP 484, 585, 604)
- Docstrings: Add Google-style docstrings to all public APIs (PEP 257)
- Error Handling: Implement custom exception hierarchy and use context managers
4. Verification
- Format: For Python code, run
black and isort on all source files
- Type Check: Run
mypy --strict and fix type errors
- Lint: Check YAML frontmatter and run
ruff check for Python
- Test: Run
pytest with 80%+ coverage target
- Security: Run
safety check on Python dependencies
- Dry Run: Perform a final validation of the agent
Code Quality Standards
For Python projects, follow comprehensive coding standards:
- Reference: See Python coding standards for detailed guidelines
- Formatting: Black (100 char line length), isort
- Type Checking: Mypy strict mode with complete type hints
- Testing: Pytest with 80%+ coverage, fixtures, parametrized tests
- Security: No secrets in code, parameterized queries, security scanning
Design Patterns
Apply appropriate design patterns to maintain clean architecture:
- Creational: Factory Pattern (for connector creation), Builder Pattern (for configuration)
- Structural: Adapter Pattern (database adapters), Decorator Pattern (tracing, metrics)
- Behavioral: Strategy Pattern (query execution), Iterator Pattern (streaming), Observer Pattern (events)
Tools & Scripts
scripts/lint_check.sh: Run all code quality checks (black, isort, mypy, ruff, safety)
scripts/run_tests.sh: Run pytest with coverage reporting and various options
Templates
templates/SPEC_TEMPLATE.md: Specification template
templates/SKILL_TEMPLATE.md: Skill documentation template
templates/pyproject.toml.template: Python project configuration
templates/.pre-commit-config.yaml: Pre-commit hooks configuration
templates/test_template.py: Pytest test examples
templates/conftest.py: Pytest configuration and shared fixtures