api-and-interface-design

api-and-interface-design is a skill for Claude Code from shennawardana23/skillme. It costs 96 tokens per session (1,891 once invoked), scanned A, original, Apache-2.0.

Guidance for designing interfaces between packages or modules inside one codebase, especially in Go. It is about in-process code boundaries, not the request and response format of a web API.

In plain words
What is it for?
Use it when placing Go interfaces, defining package APIs, or setting contracts between modules or teams working in the same program.
Why use it?
It helps keep shared code boundaries small and clear, so packages depend on only what they use instead of on large implementation packages.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the skillme plugin — 137 skills, 2 commands shipped together

Good fit Use it when placing Go interfaces, defining package APIs, or setting contracts between modules or teams working in the same program.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/shennawardana23/skillme/api-and-interface-design
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add shennawardana23/skillme --skill api-and-interface-design
Clone the repo
git clone --depth 1 https://github.com/shennawardana23/skillme

Made for: Claude Code.

Or install skillme, the plugin that ships this one along with the rest of its 137 skills, 2 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for api-and-interface-design

README.md
[![agentmods](https://agentmods.dev/badge/skills/shennawardana23/skillme/api-and-interface-design/github.svg)](https://agentmods.dev/skills/shennawardana23/skillme/api-and-interface-design)
Your own site
<a href="https://agentmods.dev/skills/shennawardana23/skillme/api-and-interface-design"><img src="https://agentmods.dev/badge/skills/shennawardana23/skillme/api-and-interface-design/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for api-and-interface-design

Your own site · 80×15
<a href="https://agentmods.dev/skills/shennawardana23/skillme/api-and-interface-design"><img src="https://agentmods.dev/badge/skills/shennawardana23/skillme/api-and-interface-design.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 96 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,891 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00096 $0.01891
Opus 5 $0.00048 $0.00945
Sonnet 5 $0.00019 $0.00378
Haiku 4.5 $0.00010 $0.00189

Measured 9d ago against content hash 0d64e46133ce, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

api-and-interface-design scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/api-and-interface-design/SKILL.md · 176 lines

How it starts

The opening of the file, as written. The whole thing — 176 lines — stays where its author put it; the contents beside it link to each section on GitHub.

API and Interface Design

This skill covers in-process boundaries: interfaces between packages, modules, or teams inside a single codebase or binary. For the shape of a wire-level contract (REST/RPC request/response bodies, error envelopes, pagination, versioning of an HTTP or RPC API), use the api-design skill instead — the two are complementary: a service's HTTP handler is itself a consumer of the internal interfaces this skill is about.

Core rule: define the interface where it's consumed, not where it's implemented

The single most common Go interface mistake is declaring an interface next to its implementation ("I built a Store, so I export a Store interface next to it"). This forces every consumer to depend on the producer's package just to get the interface type, and it tempts the producer into a single fat interface covering everything the type does.

// BAD: interface lives in the producer package, sized to the whole type.
package store

type Store interface {
    GetReservation(ctx context.Context, id string) (*Reservation, error)
    SaveReservation(ctx context.Context, r *Reservation) error
    GetGuest(ctx context.Context, id string) (*Guest, error)
    SaveGuest(ctx context.Context, g *Guest) error
    // ... ten more methods, because that's everything *SQLStore does
}

// GOOD: consumer package declares only the interface it needs.
package billing

// ReservationGetter is the only dependency billing has on storage.
type ReservationGetter interface {
    GetReservation(ctx context.Context, id string) (*Reservation, error)
}

func NewInvoicer(store ReservationGetter) *Invoicer { ... }

The producer (store.SQLStore) never needs to declare an interface at all — it just needs to satisfy whatever its consumers declare, which Go's structural typing does implicitly. This is the direct analogue of Go's own guidance ("accept interfaces, return structs"): a constructor should return a concrete type so callers get full access to it, and take interfaces as parameters so the function only asks for what it uses.

Read the full file on GitHub · 176 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 176 lines · 96 tokens per session scan A 0d64e46133ce

Subscribe to this mod's changes

api-and-interface-design is a skill published in the GitHub repository shennawardana23/skillme (2 stars, last pushed 12d ago), licensed Apache-2.0. It adds 96 tokens to every session and 1,891 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

temporal-developer

Develop, debug, and manage Temporal applications across Python, TypeScript, Go, Java, .NET, Ruby, and Rust. Use when the user is building workflows, activities, or workers with a Temporal SDK, debugging issues like non-determinism errors, stuck workflows, or activity retries, using Temporal CLI, Temporal Server, or…

temporalio/skill-temporal-developer · 161 tokens

fastify-best-practices

A reference guide for building Fastify, a Node.js framework for web servers and REST APIs, with JavaScript or TypeScript. It covers routes, plugins, validation, errors, testing, logging, security, databases, and deployment.

sutchan/Agent-Skills-Hub · 0 tokens

insforge-cli

Use this skill whenever someone needs a backend, or when managing InsForge backend and cloud infrastructure with the InsForge CLI. For application code that calls InsForge from a frontend, backend, or edge function, use the insforge app-integration skill instead.

sutchan/Agent-Skills-Hub · 0 tokens

php-pro

A set of practices for building PHP applications with modern PHP, Laravel, or Symfony. PHP is a programming language commonly used for server-side web applications.

sutchan/Agent-Skills-Hub · 120 tokens

better-auth-best-practices

A guide for configuring Better Auth, a TypeScript authentication library, on the server and client. It covers database adapters, sessions, plugins, environment variables, migrations, and a basic health check.

sutchan/Agent-Skills-Hub · 67 tokens

insforge-debug

A troubleshooting guide for InsForge projects, covering their backend, database, command-line tool, local development, and deployments. InsForge is a backend and database service for applications.

sutchan/Agent-Skills-Hub · 0 tokens