Three Pillars of Architecture Modernization
1. Skills Instead of Long Prompts
A skill is packaged, composable information that Claude pulls into context only when needed for a specific task.
Problem: All business processes (policies, procedures) baked into system prompt, polluting the context window.
Solution: Move specific instructions (e.g., forecasting logic) to Skills. Keep system prompt for only the most general, always-needed information.
Result: System prompt shrunk from ~400 to ~50 lines.
Rule: System prompt = information needed always. Skills = information needed sometimes.
2. Primitive Tools Instead of Custom Ones
Philosophy: Give agents the same primitives a human has at a computer.
Recommended sequence:
- Start with Claude Code primitives: code execution (bash), file system, web search, task list
- Remove unnecessary: If agent doesn't need web search, disable it
- Add custom tools only when required
Example from the case: Instead of creating separate tools for analyzing each CSV, the agent got bash access. Now it writes Python scripts for data analysis, which:
- Drastically reduced token usage (from >200K to minimum)
- Lowered cost
- Increased flexibility
MCP note: Connect only when there's a shared toolkit for many agents/clients. Often code execution (for API calls) is more flexible.
3. Conscious Use of Subagents
When you truly need them:
- Parallelization: When you need to throw many Claude instances at one hard task (deep research, code analysis)
- Fresh perspective: When you need to separate creation from review (one agent writes, another reviews)
Subagent problems: Complex orchestrator communication, logging and observability issues.
CMA solution: Use native Callable Agents for managed subagents with centralized observability.
In Stock Pilot, only one forecasting subagent was kept to isolate that process from main context.