Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

Back to skills

Agent System Design

ASecurity

Production agent SLA discipline — MAX_LOOPS, MAX_TOKENS, MAX_COST, MAX_LATENCY, MAX_TOOL_CALLS, circuit breakers, sovereignty boundaries, degradation modes. Use before deploying any autonomous loop to production.

47 stars
0 votes
0 copies
0 views
Added 9/23/2026
ai-agentspythongorailsapi

Works with

apimcp

Security Analysis

A100/100

Scanned 9/23/2026

Install to Claude Code

$npx -y skills add akillness/jeo-skills --skill agent-system-design --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Agent System Design?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Agent System Design
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/akillness-agent-system-design/badge)](https://www.skillsdirectory.com/skills/akillness-agent-system-design)

More formats (shields.io, HTML) on the badges page.

Download Zip
Files
SKILL.md
---
name: agent-system-design
description: Production agent SLA discipline — MAX_LOOPS, MAX_TOKENS, MAX_COST, MAX_LATENCY, MAX_TOOL_CALLS, circuit breakers, sovereignty boundaries, degradation modes. Use before deploying any autonomous loop to production.
---

# Agent System Design

## Overview

Demos run forever; production cannot. This skill defines the **five budgets** every production agent must enforce, the circuit breakers that stop runaway loops, and the sovereignty rules that keep agents from straying outside their domain.

## When to use

- Moving an agent from prototype to production
- An agent looped, spent $200, and produced nothing useful
- You can't answer "what is this agent allowed to do?" in one sentence
- Need to set SLO/SLA with stakeholders
- Multi-agent system where one agent can call another

## The five budgets

| Budget | Default cap | When exceeded |
|--------|-------------|---------------|
| `MAX_LOOPS` | 25 iterations | Stop, hand to human |
| `MAX_TOKENS` | 200k per run | Summarize state, restart |
| `MAX_COST_USD` | $2 per run | Hard stop, page operator |
| `MAX_LATENCY_S` | 300s wall clock | Return partial, log incomplete |
| `MAX_TOOL_CALLS` | 50 per run | Stop, suspicious behavior |

Caps are **per run**, enforced by the harness, not by prompting the LLM.

## Loop termination rules

Stop when ANY of these is true:
1. Goal verified (tests pass / acceptance criteria met)
2. Budget cap hit
3. Same tool+args repeated 3× → loop detector
4. Guardrail block (see `agent-guardrails`)
5. HITL approval denied
6. Operator kill signal

## Circuit breaker pattern

```python
class AgentCircuitBreaker:
    def __init__(self, max_failures=3, window_s=60, cooldown_s=300):
        self.failures = deque()
        self.tripped_until = 0

    def call(self, fn, *args):
        now = time.time()
        if now < self.tripped_until:
            raise CircuitOpen()
        try:
            return fn(*args)
        except Exception:
            self.failures.append(now)
            self._prune(now)
            if len(self.failures) >= self.max_failures:
                self.tripped_until = now + self.cooldown_s
            raise
```

Apply per tool, per downstream service, per agent.

## Sovereignty boundaries

Every agent has a **domain card**:

```yaml
agent: billing-assistant
owns:
  - invoice CRUD
  - refund initiation (HITL required > $100)
borrows:
  - customer lookup (read-only, via customer-agent)
forbidden:
  - user account deletion
  - sending external emails
escalates_to: ops-on-call
```

Rule: an agent never silently calls outside its `owns` set. Cross-domain calls go through explicit routing (see `a2a-protocol`).

## Degradation modes

When upstream fails, degrade rather than crash:

| Failure | Degradation |
|---------|-------------|
| LLM API down | Cached answer + "stale" flag |
| Tool service down | Skip optional tools, mark partial |
| Budget hit mid-run | Summarize progress, queue resume |
| Guardrail uncertain | Default-deny + HITL |

## Retry policy

- Exponential backoff with jitter, max 3 attempts
- Idempotency keys on all state-changing tools (see `mcp-builder`)
- Never retry guardrail blocks (they're decisions, not failures)

## Reference dataclass

```python
@dataclass
class AgentSLA:
    max_loops: int = 25
    max_tokens: int = 200_000
    max_cost_usd: float = 2.0
    max_latency_s: int = 300
    max_tool_calls: int = 50
    require_hitl_above_usd: float = 100.0
    circuit_breaker: AgentCircuitBreaker = field(default_factory=AgentCircuitBreaker)
    on_cap_hit: Literal["stop", "summarize_restart", "escalate"] = "stop"
```

## Further reading

- SRE for agents — SLO, error budget, postmortems
- Circuit breaker patterns (Hystrix, resilience4j)
- LLM cost-control playbooks (2026)
- Pair with: `agent-guardrails`, `agent-observability`

Attribution

akillnessakillness
View sourceMore from akillness →
SSkills DirectorySkills Directory

Your tool, in front of Claude Code builders.

3 founder slots · $299/mo · GSC-verified traffic · sponsors can never buy grades.

See placements

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Your tool, in front of Claude Code builders.

3 founder slots · $299/mo · GSC-verified traffic · sponsors can never buy grades.

See placements

Related Skills

Caveman

Ultra-compressed communication mode that cuts output tokens while keeping technical accuracy. Levels: lite, full, ultra and the wenyan variants. Use for /caveman, "caveman mode", "talk like caveman", "be brief" or "less tokens".

1066601 votes

Hyperplan

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...

686011 votes

Mcp Code Execution

Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.

3351 votes

catchup

Recovers the conversation and failed tool calls of a previous Codex, Claude Code, Antigravity, Cline, Copilot CLI, Cursor, DeepSeek Harness, Kimi, OpenCode, Pi Agent, or ZCode session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", asks to recover/summarize a previous session before continuing, or asks to diagnose or report a catchup failure. Do NOT use for the current conversation, git history, or any non-agent log.

651 votes

math-skill

A comprehensive mathematical reasoning skill for AI assistants — handles arithmetic to research-level problems with rigorous step-by-step reasoning, systematic verification, and transparent uncertainty handling

381 votes
View all in ai-agents →