AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Api Design

skill-developersglobal-ai-agent-skills-api-design · by DevelopersGlobal

Design stable, versioned, self-documenting APIs. Easy to use correctly, hard to use incorrectly. Apply Hyrum's Law from day one.

No reviews yet
0 installs
31 views
0.0% view→install

Install

$ agentstack add skill-developersglobal-ai-agent-skills-api-design

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-developersglobal-ai-agent-skills-api-design)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
4mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Api Design? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Overview

APIs are contracts. Once published, every behavior — documented or not — becomes something users depend on (Hyrum's Law). This skill enforces the discipline of designing APIs that are stable, self-documenting, and difficult to misuse.

When to Use

  • Creating any public API endpoint
  • Designing function/library APIs
  • Extending or versioning existing APIs

Process

Step 1: Design the Interface First

  1. Write the usage examples before writing the implementation.
  2. Ask: Is this easy to use correctly? Is it hard to use incorrectly?
  3. Apply the principle of least surprise — the API should do what it looks like it does.
  4. Design for the caller, not the implementer.

Verify: You can write 3 example usages without looking at the implementation.

Step 2: Apply Hyrum's Law

  1. Every observable behavior of your API will be depended upon by someone.
  2. Document what IS and IS NOT guaranteed:
  • Stable: return type, error codes, semantic behavior
  • Unstable: response time, field ordering, internal implementation
  1. Be conservative in what you expose — you can always add, never remove.

Verify: Every public field and behavior is either documented as stable or marked as internal.

Step 3: Versioning Strategy

  1. Version from day one: /api/v1/, Content-Type: application/vnd.myapi.v1+json
  2. Breaking changes require a new version.
  3. Maintain old versions for at least 6 months with deprecation notices.
  4. Additive changes (new optional fields) are non-breaking.

Verify: API version is in the URL or headers. Deprecation policy is documented.

Step 4: Self-Documentation

  1. Every endpoint: purpose, inputs, outputs, error codes — documented.
  2. Error messages tell the caller what went wrong AND how to fix it.
  3. Schema validation on all inputs with meaningful error messages.
  4. OpenAPI/Swagger spec generated (not hand-written).

Verify: A new developer can use the API from documentation alone, without reading source code.

Common Rationalizations (and Rebuttals)

| Excuse | Rebuttal | |--------|----------| | "We'll document it later" | Undocumented APIs become black boxes. Document as you build. | | "We can break it, it's internal" | Internal APIs become external. Design them well from the start. | | "Versioning is premature" | Retrofitting versioning into an unversioned API is painful. Start versioned. |

Verification

  • [ ] Interface designed before implementation
  • [ ] Stable vs. unstable behaviors documented
  • [ ] Versioning strategy in place
  • [ ] All endpoints documented (OpenAPI/Swagger)
  • [ ] Error messages actionable
  • [ ] Breaking vs. non-breaking changes policy defined

References

  • [security-hardening skill](../security-hardening/SKILL.md)
  • Hyrum's Law: https://www.hyrumslaw.com/

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.