Agent tool contracts

From charlieviettq/awesome-agent-skill · View interactive version

Agent tool contracts is an AI agent skill from the GitHub repository charlieviettq/awesome-agent-skill. Design agent tools and CLI surfaces—schemas, naming, errors, idempotency, and discoverability for LLM callers. Use when defining tools for agents, SDKs, or AI-native CLIs.

How to use this skill

Skill file

Agent tool contracts

Tool design rules

  1. Verb-noun names — search_issues, create_draft_pr (not doStuff).
  2. Minimal parameters — fewer required fields; sensible defaults in description.
  3. Explicit side effects — "Creates...", "Deletes...", "Read-only" in description.
  4. Bounded output — paginate or truncate; return summary + pointer for large data.
  5. Stable errors — { "code": "NOT_FOUND", "message": "..." }.

Schema quality

Idempotency and safety

| Operation | Pattern |

|-----------|---------|

| Read | Safe to retry |

| Create | Idempotency key or dedupe by natural key |

| Update | Version or ETag when concurrent edits possible |

| Delete | Soft delete or two-step confirm in description |

AI-native CLI (when applicable)

Review checklist

Related

mcp-builder for MCP-specific packaging; agent-evaluation for measuring tool accuracy.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.