ardurai/god-skill-suite/god-ai-architect
Claude Code and agent skill by ardurai/god-skill-suite
- community
Checking that the SKILL.md file is still in the repository.
God-level AI systems architecture skill. Covers multi-model AI system design, agent architectures (ReAct, Plan-and-Execute, multi-agent frameworks), agent-to-agent (A2A) communication protocols and their security, tool use and function calling patterns, AI safety and alignment in system design, LLM routing and orchestration (LangChain, LlamaIndex, DSPy, CrewAI), memory systems (short-term, long-term, episodic, semantic), retrieval augmented generation at scale, AI observability (prompt/response logging, LLM tracing, cost tracking), AI security (prompt injection, jailbreak resistance, data exfiltration prevention), and the infrastructure to run AI systems reliably in production.
Install
npx vskill@latest install ardurai/god-skill-suite/god-ai-architectSKILL.md
The same SKILL.md was published earlier as ardurai/god-skill-suite/god-ai-architect.
God-Level AI Systems Architecture
Building an AI system that works in a demo is easy. Building one that works reliably at scale, resists adversarial inputs, stays within budget, and can be debugged when it fails — that is engineering.
Researcher-Warrior Mindset
You do not trust the demo. You do not trust the benchmark. You read the architecture, the failure modes, the security model, and the cost structure before you commit to any design. When given a new protocol, framework, or model, you decompose it — what does it assume? Where does it fail? What happens when the model halts, when the tool call fails, when the adversary injects malicious instructions? You design for the failure state, not the happy path.
Anti-hallucination rules for this domain:
- Never invent agent framework APIs. LangChain, LlamaIndex, and CrewAI have specific class names and method signatures that change between versions — always note the version context.
- Never describe A2A protocols (Google's A2A, Anthropic's MCP) as having capabilities they do not have. Cite the specification directly.
- Never claim a vector database supports a feature without verifying (e.g., not all vector databases support hybrid search — dense + sparse).
- Never describe vLLM's PagedAttention as doing something other than what it does: managing KV cache memory in non-contiguous pages.
- When discussing security, distinguish between mitigations that prevent attacks and mitigations that make attacks harder.
1. AI System Design Patterns — When to Use Each Architecture
Pattern 1: Pure LLM API Call
When: single-turn, well-scoped tasks; classification; summarization; extraction from provided text; code generation with human review. Architecture: user input → prompt construction → LLM API call → output. When this fails: multi-step reasoning requiring external data; tasks requiring real-time information; tasks where the model's training data is stale.
Pattern 2: Retrieval-Augmented Generation (RAG)
When: questions over a private knowledge base; document QA; up-to-date information lookup; reducing hallucinations by grounding to source documents. Architecture: query → embedding → vector search → context retrieval → prompt + context → LLM → response with citations. When this fails: queries that require reasoning across many documents (context window pressure); queries requiring structured computation over data (use SQL, not RAG); when retrieval quality is poor (garbage in, garbage out).
Pattern 3: Fine-Tuned Model
When: task has a consistent, well-defined format with thousands of examples; latency requirements are strict (smaller fine-tuned model beats larger general model); domain-specific vocabulary or notation that general models don't handle well. When this fails: task distribution shifts over time (fine-tuned model is frozen); limited training data (try few-shot prompting first); tasks requiring world knowledge or reasoning beyond the training data.
Pattern 4: Single Agent
When: tasks requiring multi-step reasoning, tool use, and state maintenance that don't benefit from parallelism; tasks with clear start/end and recoverable failures; tasks where the entire context fits in one model's context window.
Pattern 5: Multi-Agent System
When: tasks that can be parallelized across specialized agents; tasks that require cross-checking (one agent produces, another verifies); tasks too large for a single context window; tasks where different subtasks require different specialized models. When this fails: when coordination overhead exceeds the benefit of parallelism; when agents disagree without a resolution mechanism; when inter-agent communication is the bottleneck.
2. Agent Architectures
ReAct (Reason + Act)
Source: Yao et al. "ReAct: Synergizing Reasoning and Acting in Language Models" (2022, ICLR 2023).
The model interleaves reasoning (Thought:) and acting (Action:) in a loop until it reaches a final answer.
Strengths: simple to implement; works with any LLM that follows the format; transparent reasoning trace. Weaknesses: each reasoning step requires an LLM call; errors in early steps propagate; no backtracking.
Plan-and-Execute (Planner + Executor Separation)
When to use: tasks where the plan structure is knowable upfront; when you want to validate the plan before execution; when execution is expensive or irreversible.
Architecture:
- Planner: LLM generates a full plan (list of steps) before any execution
- Executor: separate LLM (or same LLM) executes each step, reporting results
- Replanner (optional): if a step fails or returns unexpected results, replanner revises the remaining plan
ReWOO (Reasoning WithOut Observation)
Source: Xu et al. "ReWOO: Decoupling Reasoning from Observations for Efficient Augmented Language Models" (2023).
The planner generates the full plan including tool call placeholders WITHOUT executing tools. Tool calls are then executed in parallel. Results are substituted back. The solver produces the final answer.
Advantage: tool calls can be parallelized. Reduces total latency when multiple independent tool calls are needed.
LATS (Language Agent Tree Search)
Source: Zhou et al. "Language Agent Tree Search Unifies Reasoning, Acting, and Planning in Language Models" (2023).
Uses Monte Carlo Tree Search over the action space of a language agent. At each node, the agent can branch into multiple possible actions, evaluates them (via LLM self-evaluation or an external reward signal), and selects the best path.
When to use: complex reasoning tasks where the correct path is not obvious and requires exploration; mathematical problem solving; code generation with correctness verification. Cost: MCTS is expensive — multiple LLM calls per search step. Only justified for high-value, high-accuracy tasks.
3. Multi-Agent Systems
Orchestrator-Worker Pattern
One orchestrator agent receives the task, decomposes it, dispatches subtasks to worker agents, collects results, and synthesizes the final answer.
Security consideration: the orchestrator must validate worker outputs before using them in subsequent steps. A compromised or hallucinating worker can poison the orchestrator's output.
Hierarchical Agents
Multi-level orchestration: top-level agent → mid-level specialized agents → task-level agents. Mirrors organizational hierarchies. Useful when tasks are complex enough that one level of decomposition is insufficient.
Peer-to-Peer Agents
Agents communicate directly without a central orchestrator. Each agent has a defined role and can request help from other agents. Complex to debug because there is no single point of control. Useful for competitive scenarios (debate between agents to improve output quality).
Shared Memory in Multi-Agent Systems
Options:
- Shared context window: all agents see the full conversation history. Expensive as context grows.
- Shared key-value store (Redis): agents read/write to named slots. Fast but requires careful namespace design.
- Shared vector store: agents store and retrieve semantically relevant memories. Good for long-running systems with large history.
- Blackboard architecture: agents post to a shared blackboard and are triggered when relevant items appear. Classic pattern from AI planning literature.
4. Agent-to-Agent (A2A) Communication Protocols
Google's A2A Protocol (Agent2Agent)
Released by Google (April 2025). An open protocol for agents to communicate with other agents across organizational boundaries.
Core concepts:
- Agent Card: a JSON descriptor at
/.well-known/agent.jsonadvertising the agent's capabilities, skills, and supported interaction modes - Task: the unit of work (create, update, cancel). Has a lifecycle:
submitted → working → completed/failed/canceled - Message: turns in the interaction within a task (user messages, agent messages)
- Artifact: structured outputs from the agent (files, data, structured results)
- Streaming: Server-Sent Events (SSE) for streaming task updates
Security in A2A: A2A delegates authentication to the transport layer (HTTPS + standard auth schemes). Agent Cards declare required authentication. The protocol itself does not define a trust model for agent outputs — implementors must design this.
Anthropic's Model Context Protocol (MCP)
MCP is a protocol for LLMs to connect to external tools, data sources, and services. It defines:
- Resources: data that can be read by the model (files, database rows, API responses)
- Tools: actions the model can execute (function calls)
- Prompts: reusable prompt templates provided by the server
MCP uses JSON-RPC 2.0 over stdio (local) or HTTP/SSE (remote).
Security in MCP: MCP tool calls carry whatever permissions the MCP server grants. If an MCP server has access to a filesystem, a prompt injection attack that causes the model to call the wrong tool can exfiltrate files. Always scope MCP server permissions to minimum required.
Decomposing Any New A2A Protocol — The Security Analysis Template
When given a new A2A protocol to evaluate:
- Authentication mechanism: How does Agent A prove identity to Agent B? Is it token-based? Certificate-based? No auth?
- Message format: JSON? Protobuf? Is it schema-validated before processing?
- Trust model: Does Agent B blindly execute instructions from Agent A? Is there a permission system?
- Replay attack surface: Can a message be captured and replayed? Is there a nonce/timestamp/sequence number?
- Man-in-the-middle surface: Is the transport encrypted? Can an intermediary modify messages?
- Denial of service surface: Can one agent send unlimited requests to another? Is there rate limiting?
- Privilege escalation surface: Can Agent A instruct Agent B to perform actions beyond A's authorization level? This is effectively a prompt injection attack at the protocol level.
- Output validation: Does the receiving agent validate outputs before acting on them? Or does it trust the sender's output blindly?
5. Tool Use and Function Calling
Tool Schema Design
Description quality matters: the model reads the description to decide when and how to call the tool. Vague descriptions lead to incorrect tool calls.
Include negative instructions: "Do NOT use this for X" in the description provides additional guardrails, though they are not security boundaries (adversarial inputs can override them — use authorization in the tool implementation).
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/god-ai-architect/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/ardurai/god-skill-suite/god-ai-architect)