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.
npx skills add atretyak1985/swarmery --skill api-integrationgit clone --depth 1 https://github.com/atretyak1985/swarmeryWrote 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.
[](https://agentmods.dev/skills/atretyak1985/swarmery/api-integration)<a href="https://agentmods.dev/skills/atretyak1985/swarmery/api-integration"><img src="https://agentmods.dev/badge/skills/atretyak1985/swarmery/api-integration/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.
<a href="https://agentmods.dev/skills/atretyak1985/swarmery/api-integration"><img src="https://agentmods.dev/badge/skills/atretyak1985/swarmery/api-integration.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00043 | $0.00819 |
| Opus 5.5 | $0.00017 | $0.00328 |
| Sonnet 5.5 | $0.00009 | $0.00164 |
| Haiku 4.5 | $0.00004 | $0.00082 |
Grade A, and why
api-integration 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 1mo 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.
How it starts
The opening of the file, as written. The whole thing — 65 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Purpose
Produce tested integration code connecting the platform's layers: REST route handlers in the main app (project.json -> mainApp), ORM queries, server-side WebSocket clients for device/edge telemetry (project.json -> device), and SSE endpoints fanning real-time data to browsers. Generated code follows project conventions; patterns use Drizzle ORM — adapt to the project's actual ORM (project.json -> stack.db).
Rules (never violate)
- Verify the real ORM schema before writing; STOP and ask if table or column names are missing or ambiguous — never code against a guessed schema.
- Always
getDb()(lazy init),await auth()with 401 on authenticated routes,dynamic = 'force-dynamic'on session/env-reading routes, Zod on all external data. - Never hardcode environment-specific values (URLs, hostnames, API keys) — use
getServerEnv(); refuse if asked. - Every
useEffectopening an EventSource/WebSocket returns a cleanup function. - Never overwrite an existing file without reading it and informing the user first.
- After any write, run
api-contractto verify field alignment across layers.
Resources
- Read
resources/integration-patterns.mdwhen writing code — the six reference patterns (REST handler, ORM queries, lazy DB init, WebSocket, SSE, EventSource hook). - Read
resources/procedure-and-checks.mdwhen executing a task — the 8-step procedure, self-check, common mistakes, escalation, failure modes, and a full worked example.
How to use
What it does
Writes the integration code connecting your layers: a REST route handler, an ORM query, a server-side WebSocket client ingesting device telemetry, or an SSE endpoint fanning it out. It checks your real schema before writing, then applies project conventions throughout.
When to use it
- A new route handler under
apps/<mainApp>/src/app/api/**/route.ts. - An ORM select, insert, update, or delete in a handler or Server Component.
- A WebSocket telemetry subscription, SSE endpoint, or browser
EventSourcehook.
What ships with it
2 files 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.
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.
- 1mo ago First seen · 65 lines · 43 tokens per session scan A 953b1539191f
api-integration is a skill published in the GitHub repository atretyak1985/swarmery (7 stars, last pushed today), licensed Apache-2.0. It adds 43 tokens to every session and 819 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-09-03.
Other skills, from other repositories
gws-schema
Introspect any Google Workspace API schema — discover method parameters, request bodies, and response types before executing.
recipe-schema-explore
Discover and introspect any Google Workspace API before using it — explore methods, parameters, and types.
rust-network-module
Add Rust async networking modules with project-adapted listener lifecycle, protocol parsing, and meaningful tests. Includes Tokio TCP and example wire-protocol templates for nat464-sidecar or compatible Rust projects.
gws-shared
Shared gws CLI setup, schema discovery, shell quoting, pagination, and authorization conventions for Google Workspace operations.
azure-communication-common-java
Azure Communication Services common utilities for Java. Use when working with CommunicationTokenCredential, user identifiers, token refresh, or shared authentication across ACS services.
architecture-patterns
Architecture validation and patterns for clean architecture, backend structure enforcement, project structure validation, test standards, and context-aware sizing. Use when designing system boundaries, enforcing layered architecture, validating project structure, defining test standards, or choosing the right…