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 j4flmao/agent-skills --skill bff-patterngit clone --depth 1 https://github.com/j4flmao/agent-skillsWrote 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/j4flmao/agent-skills/bff-pattern)<a href="https://agentmods.dev/skills/j4flmao/agent-skills/bff-pattern"><img src="https://agentmods.dev/badge/skills/j4flmao/agent-skills/bff-pattern/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/j4flmao/agent-skills/bff-pattern"><img src="https://agentmods.dev/badge/skills/j4flmao/agent-skills/bff-pattern.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00102 | $0.05243 |
| Opus 5.5 | $0.00041 | $0.02097 |
| Sonnet 5.5 | $0.00020 | $0.01049 |
| Haiku 4.5 | $0.00010 | $0.00524 |
Grade A, and why
backend-bff-pattern scanned grade A with 1 finding 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
const response = await fetch(url, { agent, signal: controller.signal }); How it starts
The opening of the file, as written. The whole thing — 610 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Backend BFF Pattern
Purpose
Design specialized Backend for Frontend (BFF) services that compose and transform backend APIs for each client type (web, mobile, IoT, third-party), reducing over-fetching and client complexity.
Agent Protocol
Trigger
Exact user phrases: "BFF", "Backend for Frontend", "API gateway", "gateway specialization", "frontend API", "mobile API", "web API", "API composition", "aggregation service", "frontend gateway", "BFF pattern".
Input Context
- Client types consuming the API (web, iOS, Android, third-party).
- Backend microservices architecture.
- Latency and data shape requirements per client.
Output Artifact
BFF architecture design or implementation snippet. No file unless requested.
Response Format
BFF: {client type}
Backing Services: [{service list}]
Composition: {aggregation|transformation|caching}
Security: {auth pattern}
Completion Criteria
- BFF per distinct client type defined.
- API composition logic documented.
- Auth model appropriate for each BFF.
- Caching and error handling configured.
- No business logic in BFF — only orchestration.
Max Response Length
4 lines per BFF. 20 lines for full design.
Workflow
Step 1: Identify Client Types
Web BFF -> SPA (React, Vue)
Mobile BFF -> iOS + Android apps
Partners BFF -> Third-party integrations
Admin BFF -> Internal admin panel
Step 2: Design BFF API per Client
Each BFF exposes APIs shaped for its client:
// Web BFF: returns a page-shaped response
GET /api/web/checkout/{cartId}
{
"items": [
{"id": "prod-1", "name": "Widget", "quantity": 2, "price": 19.99, "image": "https://..."}
],
"subtotal": 39.98,
"shipping": 5.99,
"tax": 3.20,
"total": 49.17,
"shippingOptions": [
{"id": "standard", "name": "Standard", "price": 5.99, "estimate": "5-7 days"},
{"id": "express", "name": "Express", "price": 12.99, "estimate": "2-3 days"}
],
"paymentMethods": [
{"id": "card", "name": "Credit Card", "last4": "4242", "expiry": "04/27"}
]
}
// Mobile BFF: returns a compact response with mobile-specific fields
GET /api/mobile/checkout/{cartId}
{
"total": 49.17,
"shippingOptions": ["standard", "express"],
"defaultPayment": "card_4242"
}
// Partner BFF: returns normalized data with partner-specific metadata
GET /api/partners/checkout/{cartId}?partner=acme
{
"orderReference": "ext-123",
"items": [...],
"commission": 2.46,
"total": 49.17
}
What ships with it
10 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.
- references/bff-advanced.md 8.7 KB
- references/bff-architecture.md 1.7 KB
- references/bff-auth-session.md 8.0 KB
- references/bff-fundamentals.md 3.4 KB
- references/bff-implementation-strategies.md 8.6 KB
- references/bff-orchestration.md 6.8 KB
- references/bff-performance.md 7.3 KB
- references/bff-rate-limiting.md 8.0 KB
- references/bff-security.md 1.7 KB
- references/bff-testing.md 6.7 KB
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 · 610 lines · 102 tokens per session scan A 8486155738c4
backend-bff-pattern is a skill published in the GitHub repository j4flmao/agent-skills (34 stars, last pushed 14d ago), licensed MIT. It adds 102 tokens to every session and 5,243 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other skills, from other repositories
commerce-api-gateway
Aggregate multiple commerce microservices behind a single API gateway with GraphQL federation, rate limiting, and unified authentication.
api-gateway-patterns
API Gateway patterns for routing, authentication, rate limiting, and service composition in microservices architectures. Use when implementing API gateways, building BFF layers, or managing service-to-service communication at scale.
media-upload-pipelines
Design resilient mobile media upload pipelines with signed URLs, resumable uploads (tus, S3 multipart), and post-upload processing. Use when implementing or reviewing user-generated media ingestion.
push-notifications-backend
Send push to mobile via FCM HTTP v1 and APNs over HTTP/2 with JWT, handle payload limits and token invalidation. Use when building or operating the push delivery service.
websockets-for-mobile
Design WebSocket servers and clients for mobile -- reconnection, heartbeats, backoff, and horizontal scale-out. Use when building realtime features over WebSockets.
bff-pattern
When and how to use a Backend-for-Frontend (BFF) for mobile -- scoping, ownership, and anti-patterns. Use when deciding whether a BFF is justified or designing one.