api-and-interface-design

api-and-interface-design is a skill for Claude Code, Codex from peterblazejewicz/claude-plugins. It costs 64 tokens per session (5,131 once invoked), scanned A, original, MIT.

Guidance for designing stable boundaries between parts of a .NET system, such as HTTP APIs, shared data types, libraries, database-backed contracts, and interfaces. These boundaries define how one piece of software communicates with another.

In plain words
What is it for?
Use it when creating or changing web endpoints, public C# types, DTOs, module boundaries, database-related contracts, or published NuGet library interfaces.
Why use it?
Poorly designed interfaces are easy to misuse and difficult to change without breaking existing users. This guidance helps preserve compatibility as the system evolves.

Skill for Claude CodeCodex

Part of the dotnet-skills plugin — 24 skills, 9 commands, 4 agents shipped together

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.

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

Made for: Claude Code, Codex.

Or install dotnet-skills, the plugin that ships this one along with the rest of its 24 skills, 9 commands, 4 agents.

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/peterblazejewicz/claude-plugins/api-and-interface-design.svg)](https://agentmods.dev/skills/peterblazejewicz/claude-plugins/api-and-interface-design)
Your own site
<a href="https://agentmods.dev/skills/peterblazejewicz/claude-plugins/api-and-interface-design"><img src="https://agentmods.dev/badge/skills/peterblazejewicz/claude-plugins/api-and-interface-design.svg" alt="Measured on agentmods" height="20"></a>
Per session 64 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,131 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00064 $0.05131
Opus 5 $0.00032 $0.02566
Sonnet 5 $0.00013 $0.01026
Haiku 4.5 $0.00006 $0.00513

Measured 5d ago against content hash 221749a2a426, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, 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 5d 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.

plugins/dotnet-skills/skills/api-and-interface-design/SKILL.md · 423 lines

How it starts

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

API and Interface Design

Overview

Design stable, well-documented interfaces that are hard to misuse. Good interfaces make the right thing easy and the wrong thing hard. This applies to REST APIs, gRPC services, NuGet package surface area, assembly boundaries, record/DTO shapes, and any surface where one piece of code talks to another.

When to Use

  • Designing new HTTP endpoints (Minimal APIs or controllers)
  • Defining module boundaries or contracts between projects in a solution
  • Creating public types in MyApp.Contracts or a shared NuGet library
  • Establishing database schemas that inform DTO shape
  • Changing existing public interfaces (especially in a published NuGet package)

Core Principles

Hyrum's Law

With a sufficient number of users of an API, all observable behaviors of your system will be depended on by somebody, regardless of what you promise in the contract.

This means: every public behavior — including undocumented quirks, exception messages, response ordering, and even the presence of unused fields in a JSON response — becomes a de facto contract once users depend on it. Design implications:

  • Be intentional about what you expose. Mark types internal unless a consumer outside the assembly truly needs them. Every observable behavior is a potential commitment.
  • Don't leak implementation details. Don't return EF Core entities directly from HTTP endpoints — project to DTOs (MyApp.Contracts) so schema changes to the entity don't break consumers.
  • Plan for deprecation at design time. See deprecation-and-migration for how to safely remove things users depend on.
  • Tests are not enough. Even with perfect contract tests, Hyrum's Law means "safe" changes can break real users who depend on undocumented behaviour (an exact error string, the order of a List<T> returned from a LINQ query, the presence of a nullable field that was always null).

Read the full file on GitHub · 423 lines

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. 5d ago First seen · 423 lines · 64 tokens per session scan A 221749a2a426

Subscribe to this mod's changes

api-and-interface-design is a skill published in the GitHub repository peterblazejewicz/claude-plugins (7 stars, last pushed 2mo ago), licensed MIT. It adds 64 tokens to every session and 5,131 once invoked, about $0.0003 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

build-and-test

How to build and test .NET projects in the Agent Framework repository. Use this when verifying or testing changes.

microsoft/agent-framework · 26 tokens

verify-dotnet-samples

How to build, run and verify the .NET sample projects in the Agent Framework repository. Use this when a user wants to verify that the samples still function as expected.

microsoft/agent-framework · 40 tokens

agents-sdk-dotnet-activityhandler-migration

Use when migrating a Microsoft 365 Agents SDK agent that uses ActivityHandler or TeamsActivityHandler to AgentApplication. This is ONLY for DotNet projects that uses Microsoft.Agents. packages. Triggered by Agents SDK bots that subclass ActivityHandler or TeamsActivityHandler that need to be modernized to…

microsoft/Agents · 76 tokens

agents-sdk-dotnet

Use when any code imports Microsoft.Agents.Hosting.AspNetCore, Microsoft.Agents.Builder, or related Agents SDK packages, or when the user is building, configuring, or asking questions about a Microsoft 365 Agents SDK agent in C# / .NET. Trigger on questions about appsettings.json, connection configuration…

microsoft/Agents · 112 tokens

bf-to-agents-sdk-dotnet-migration

Use when migrating a Bot Framework .NET SDK bot to Microsoft 365 Agents SDK. Triggered by projects that depend on packages: Microsoft.Bot.Builder or Microsoft.Bot.Builder.Integration.AspNet.Core that want to migrate to Agents SDK.

microsoft/Agents · 56 tokens

agents-sdk-dotnet-otel

Use when adding, configuring, validating, or troubleshooting OpenTelemetry observability for a Microsoft 365 Agents SDK application in C# / .NET. Trigger when the user mentions OpenTelemetry, OTel, telemetry, traces, metrics, logs, OTLP, Aspire Dashboard, Application Insights, Azure Monitor, distributed tracing…

microsoft/Agents · 86 tokens