api-and-interface-design

api-and-interface-design is a skill for Claude Code from GuillemRoca/agent-skills-android. It costs 51 tokens per session (2,877 once invoked), scanned A, original, MIT.

A guide for designing contracts between parts of an application, such as repositories, business logic, API clients, databases, and user interfaces.

In plain words
What is it for?
Use it when creating or changing APIs, database access interfaces, Kotlin contracts, or communication between modules.
Why use it?
It helps prevent changes to shared interfaces from unexpectedly breaking other parts of the application.

Skill for Claude Code

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

Part of the agent-skills-android plugin — 30 skills, 8 commands, 3 agents shipped together

Good fit Use it when creating or changing APIs, database access interfaces, Kotlin contracts, or communication between modules.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/guillemroca/agent-skills-android/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 GuillemRoca/agent-skills-android --skill api-and-interface-design
Clone the repo
git clone --depth 1 https://github.com/GuillemRoca/agent-skills-android

Made for: Claude Code.

Or install agent-skills-android, the plugin that ships this one along with the rest of its 30 skills, 8 commands, 3 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/guillemroca/agent-skills-android/api-and-interface-design/github.svg)](https://agentmods.dev/skills/guillemroca/agent-skills-android/api-and-interface-design)
Your own site
<a href="https://agentmods.dev/skills/guillemroca/agent-skills-android/api-and-interface-design"><img src="https://agentmods.dev/badge/skills/guillemroca/agent-skills-android/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/guillemroca/agent-skills-android/api-and-interface-design"><img src="https://agentmods.dev/badge/skills/guillemroca/agent-skills-android/api-and-interface-design.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 51 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,877 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.00051 $0.02877
Opus 5.5 $0.00020 $0.01151
Sonnet 5.5 $0.00010 $0.00575
Haiku 4.5 $0.00005 $0.00288

Measured 16d ago against content hash 4353fbe3a8ee, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 16d 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 · 301 lines

How it starts

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

API and Interface Design

Overview

Hyrum's Law: "With a sufficient number of users of an API, all observable behaviors of your system will be depended on by somebody." Design interfaces — Repository contracts, UseCase signatures, Retrofit services, Room DAOs — as deliberate contracts. Everything observable becomes a dependency.

When to Use

  • Defining a new Repository interface
  • Creating Retrofit API service interfaces
  • Designing Room DAOs
  • Defining ViewModel ↔ UI contracts (UiState, Events)
  • Changing any public interface in a shared module
  • Designing inter-module contracts in multi-module projects
  • Sending state-changing requests that can be retried (payments, orders, messages, uploads)

Skip when: Modifying internal (private) implementation details.

Core Process

Step 1: Contract-First Design

  1. Define the interface before implementing:
// Repository contract (in :core:domain)
interface TaskRepository {
    fun getTasks(): Flow<List<Task>>
    fun getTaskById(taskId: String): Flow<Task?>
    suspend fun createTask(title: String, description: String?): Task
    suspend fun updateTask(task: Task)
    suspend fun deleteTask(taskId: String)
    suspend fun syncWithRemote()
}
  1. Design principles:
    • Return Flow for observable data (not suspend for single reads)
    • Use suspend for one-shot operations
    • Accept domain types, not framework types (no Entity in interfaces)
    • Throw domain-specific exceptions, not framework exceptions

Step 2: Retrofit Interfaces

  1. Define clean API contracts:
interface TaskApi {
    @GET("tasks")
    suspend fun getTasks(
        @Query("page") page: Int = 1,
        @Query("per_page") perPage: Int = 20,
    ): TaskListResponse

    @GET("tasks/{id}")
    suspend fun getTask(@Path("id") taskId: String): TaskResponse

    @POST("tasks")
    suspend fun createTask(@Body request: CreateTaskRequest): TaskResponse

    @PUT("tasks/{id}")
    suspend fun updateTask(
        @Path("id") taskId: String,
        @Body request: UpdateTaskRequest,
    ): TaskResponse

    @DELETE("tasks/{id}")
    suspend fun deleteTask(@Path("id") taskId: String)
}

Read the full file on GitHub · 301 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. 16d ago Changed · +52 lines · +10 tokens per session 4353fbe3a8ee
  2. 1mo ago First seen · 249 lines · 41 tokens per session scan A 7cfe54de61e5

Subscribe to this mod's changes

api-and-interface-design is a skill published in the GitHub repository GuillemRoca/agent-skills-android (3 stars, last pushed 17d ago), licensed MIT. It adds 51 tokens to every session and 2,877 once invoked, about $0.0002 per session on Opus 5.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

spec-kitty-orchestrator-api-operator

Teach agents and external systems how to use spec-kitty orchestrator-api to drive workflows from outside the host CLI. Triggers: "use orchestrator-api", "build a custom orchestrator", "automate externally", "integrate CI with spec-kitty", "call spec-kitty from another tool", "orchestrator contract", "external…

Priivacy-ai/spec-kitty · 125 tokens

spk-integrate-orchestrator-api

Use Spec Kitty orchestrator-api from external systems, respecting host boundaries, state contracts, and workflow commands.

Priivacy-ai/spec-kitty · 30 tokens

skill-agent-task-patterns

Agent SDK task integration patterns for Business Central. Triggers on: Agent Task Builder, Agent Task Message Builder, Public API, AssignTask, ExternalId, agent session detection, BindSubscription, TryFunction agent task, multi-turn agent conversation, agent attachment, task lifecycle management, OnPrem-only methods…

javiarmesto/ALDC-AL-Development-Collection · 84 tokens

skill-api

AL API development patterns for Business Central. Use when creating OData/REST API pages, HttpClient integrations, webhook implementations, or any external system integration via API.

javiarmesto/ALDC-AL-Development-Collection · 36 tokens

skill-events

AL event-driven architecture for Business Central. Use when creating EventSubscribers, IntegrationEvents, BusinessEvents, or implementing publisher/subscriber patterns in extensions.

javiarmesto/ALDC-AL-Development-Collection · 32 tokens

engineering-backend-architect

Design backend system architecture for new products, large features, platform refactors, API and database design, microservices decomposition, event-driven systems, scaling, reliability, observability, and cloud deployment.

flc1125/skills · 45 tokens