Best for
- Building an agent that uses tools to accomplish multi-step tasks.
- An agent that loops, stalls, or takes wrong actions.
- Designing the tool surface an agent will use.
nimadorostkar/Claude-Skills-collection/skills/ai/agent-design/SKILL.md
Use when building an LLM agent that uses tools over multiple steps. Covers tool design, the agent loop, error recovery, termination, human checkpoints, and knowing when an agent is the wrong architecture.
Decision brief
Covers tool design, the agent loop, error recovery, termination, human checkpoints, and knowing when an agent is the wrong architecture.
Compatibility matrix
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/nimadorostkar/Claude-Skills-collection --skill "skills/ai/agent-design"Inspect the Agent Skill "agent-design" from https://github.com/nimadorostkar/Claude-Skills-collection/blob/03f39b7041ec2679255f8d6bb5b18421561821ae/skills/ai/agent-design/SKILL.md at commit 03f39b7041ec2679255f8d6bb5b18421561821ae. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
1. Ask whether you need an agent — If the steps are known in advance, write the workflow. A deterministic pipeline with one LLM call per step is cheaper, faster, more debuggable, and more reliable than an agent. Agents earn their cost only when the path genuinely cannot be known…
Build LLM agents that complete tasks reliably and fail safely. The two failure modes that define bad agents are looping forever without progress, and taking a destructive action confidently and wrongly.
Building an agent that uses tools to accomplish multi-step tasks.
Tool design: granularity, naming, descriptions, and error returns.
The task, and how it decomposes.
Permission review
No configured static risk pattern was detected
This is not proof of safety. Runtime behavior, indirect dependencies, and hidden external systems are outside the static scan.
Evidence record
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 92/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 26 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Build LLM agents that complete tasks reliably and fail safely. The two failure modes that define bad agents are looping forever without progress, and taking a destructive action confidently and wrongly.
Error: 400 teaches the model nothing; Error: 'status' must be one of [open, closed]. You passed 'active'. lets it recover on the next step.A tool designed for a model rather than lifted from an API:
@tool
def search_orders(
customer_email: str | None = None,
status: Literal["open", "paid", "shipped", "cancelled"] | None = None,
placed_after: date | None = None,
limit: int = 20,
) -> str:
"""Search for orders. Use this to find an order when you do not know its ID.
You must provide at least one filter. If you already have an order ID,
use `get_order` instead — it is faster and returns full detail.
Returns a compact list: order ID, status, total, and customer email.
To see line items or the refund history, call `get_order` with an ID
from these results.
"""
if not any([customer_email, status, placed_after]):
# An error the model can actually act on.
return "Error: provide at least one of customer_email, status, or placed_after."
orders = db.search(...)[:limit]
if not orders:
return "No orders matched. Try widening the date range or removing the status filter."
# Compact: four fields, not the full object. The agent can fetch detail if it needs it.
return "\n".join(
f"{o.id} | {o.status} | {o.total_cents / 100:.2f} {o.currency} | {o.customer_email}"
for o in orders
)
A loop that terminates, with a checkpoint before anything irreversible:
async def run(task: str, max_steps: int = 25, token_budget: int = 200_000) -> Result:
history, tokens_used, recent_calls = [], 0, deque(maxlen=3)
for step in range(max_steps):
response = await model.complete(task, history, tools=TOOLS)
tokens_used += response.usage.total
if tokens_used > token_budget:
return Result.halted("token budget exhausted", history)
if response.is_final:
return Result.done(response.text, history)
call = response.tool_call
# No-progress detection: the same call twice in a row means it is stuck.
signature = (call.name, json.dumps(call.args, sort_keys=True))
if recent_calls.count(signature) >= 2:
return Result.halted(f"looping on {call.name} with identical arguments", history)
recent_calls.append(signature)
# Irreversible actions require a human. The agent proposes; it does not decide.
if call.name in DESTRUCTIVE_TOOLS:
approval = await request_approval(call, reason=response.reasoning)
if not approval.granted:
history.append(tool_result(call, f"Denied by operator: {approval.reason}"))
continue
result = await execute(call)
history.append(tool_result(call, result))
return Result.halted(f"step limit ({max_steps}) reached without completing", history)
Frequently asked questions
Covers tool design, the agent loop, error recovery, termination, human checkpoints, and knowing when an agent is the wrong architecture.
The source record exposes this install command: npx skills add https://github.com/nimadorostkar/Claude-Skills-collection --skill "skills/ai/agent-design". Inspect the command and pinned source before running it.
Alternatives
prowler-cloud/prowler
PostgreSQL indexing best practices for Prowler: index design, partial indexes, partitioned table indexing, EXPLAIN ANALYZE validation, concurrent operations, monitoring, and maintenance. Trigger: When creating or modifying PostgreSQL indexes, analyzing query performance with EXPLAIN, debugging slow queries, reviewing index usage statistics, reindexing, dropping indexes, or working with partitioned table indexes. Also trigger when discussing index strategies, partial indexes, or index maintenance
oaustegard/claude-skills
Generate hierarchical _FEATURES.md files that describe what a codebase DOES from a user/consumer perspective, anchored to source symbols via tree-sitting. Supports large complex codebases through feature-driven decomposition into sub-feature files. Uses a multi-pass synthesis: orientation → detail → overview rewrite. Use when someone says "what does this do", "document features", "feature inventory", "_FEATURES.md", or needs to understand a codebase's purpose before modifying it. Complements tre
HKUDS/Vibe-Trading
Create, modify, and optimize quantitative trading strategies, then backtest and evaluate them.
vasilyu1983/AI-Agents-public
Guides iOS testing with XCTest, XCUITest, Swift Testing, simctl, and xcresult. Use when choosing destinations, controlling flakes, or parsing test artifacts for native apps.