Skip to content
Back to skills

Bondery Api

ASecurity

Bondery Fastify API contracts — transport wrappers, list pagination (offset/search/sort), resource-keyed responses, mutations, Stripe-style errors, route registration order, mobile sync, rate limits, versioning, and MCP tool naming. Use when adding or changing API routes, client API calls, OpenAPI, sync protocol, API error codes, or MCP tools.

  • 41 stars
  • 0 votes
  • 0 copies
  • 5 views
  • Added November 24, 2026
databasesgoapisecurity

Works with

  • cursor
  • cli
  • api
  • mcp

Security analysis

A100/100

Pro scans all 16 files and shows the line behind each finding

Scanned November 24, 2026

npx -y skills add usebondery/bondery --skill bondery-api --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Bondery Api?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Bondery Api
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/usebondery-bondery-api/badge)](https://www.skillsdirectory.com/skills/usebondery-bondery-api)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: bondery-api
description: >
  Bondery Fastify API contracts — transport wrappers, list pagination (offset/search/sort),
  resource-keyed responses, mutations, Stripe-style errors, route registration order,
  mobile sync, rate limits, versioning, and MCP tool naming. Use when adding or changing API
  routes, client API calls, OpenAPI, sync protocol, API error codes, or MCP tools.
metadata:
  version: "1.0.0"
  namespace: bondery
---

# Bondery API

## When to use

- Adding or changing Fastify routes, Zod schemas, or OpenAPI docs
- Implementing client HTTP calls (webapp BFF, mobile, chrome extension)
- Designing list endpoints, pagination, search, or sort behavior
- Create/update mutation responses or error codes
- Mobile offline sync (pull, outbox, materializers)
- Rate limiting or API versioning questions
- Adding or renaming MCP tools or prompts (`POST /mcp`)
- Naming URL query params (`search`, `next_action`, `redirect`, Expo `group_id`)

## Non-negotiables

- Clients call the API through transport wrappers — never scattered raw `fetch` with duplicated auth
- Success responses are **resource-keyed** (`{ contact }`, `{ contacts, pagination }`) — not `{ data }`
- Errors use `{ error: { code, type, message, doc_url, ... } }` — catalog codes only, snake_case
- Paginated lists use **offset** pagination (`limit`, `offset`) — no cursor / `page_token` / `after_id`
- Paginated `ORDER BY` ends with a unique column (`id`) — tied rows repeat across pages — see `references/api-design.md#stable-page-order`
- Query param is `search`, not `q`
- Expo mobile shareable query params are snake_case (`group_id` on `/contacts`) — see `references/url-query-params.md`
- Webapp product deep links use `next_action=intended_action` (snake_case names and values) — not one-off flags — see [references/url-query-params.md](references/url-query-params.md)
- Create returns `201` + full resource object — see `references/api-mutations.md`
- Fastify routes use Zod + `fastify-zod-openapi` — not TypeBox
- Registration order is published doc order — see `references/api-route-ordering.md`
- MCP tool names are `{create|get|update|delete|search}_{resource}` — never `list_*` or `log_*` — see `references/mcp-tools.md`
- Limited responses emit `RateLimit` and `RateLimit-Policy`. See [references/rate-limits.md](references/rate-limits.md).
- If `Idempotency-Key` matches the same user and the same raw request, authenticated `POST` and `PATCH` replay the saved response. See [references/idempotency-keys.md](references/idempotency-keys.md).

## Decision tree

| Task                                                                     | Read                                                                 |
| ------------------------------------------------------------------------ | -------------------------------------------------------------------- |
| New list endpoint                                                        | [references/api-design.md](references/api-design.md)                 |
| Client HTTP call                                                         | [references/api-usage.md](references/api-usage.md)                   |
| Create/update response                                                   | [references/api-mutations.md](references/api-mutations.md)           |
| Error codes (server)                                                     | [references/api-errors.md](references/api-errors.md)                 |
| Fastify route / OpenAPI                                                  | [references/fastify-routes.md](references/fastify-routes.md)         |
| HTTP status codes                                                        | [references/status-codes.md](references/status-codes.md)             |
| Doc sidebar order                                                        | [references/api-route-ordering.md](references/api-route-ordering.md) |
| Mobile sync                                                              | [references/sync-architecture.md](references/sync-architecture.md)   |
| Health / liveness / readiness probes                                     | [references/health-probes.md](references/health-probes.md)           |
| Rate limits                                                              | [references/rate-limits.md](references/rate-limits.md)               |
| Idempotency keys                                                         | [references/idempotency-keys.md](references/idempotency-keys.md)     |
| Versioning policy                                                        | [references/versioning.md](references/versioning.md)                 |
| MCP tools / prompts                                                      | [references/mcp-tools.md](references/mcp-tools.md)                   |
| Query param names (`search`, `next_action`, `redirect`, Expo `group_id`) | [references/url-query-params.md](references/url-query-params.md)     |

Full index: [references/README.md](references/README.md).

For client error display and i18n, see the `bondery-ux` skill (`references/common/api-errors-display.md`). For E2E coverage of API-facing flows, see `bondery-e2e-tests`. For auth, tenant isolation, webhooks, uploads, and route security, see `bondery-security`.

## API design checklist (before merge)

- [ ] Resource URL follows Fastify conventions (plural, kebab-case, static-before-dynamic)
- [ ] Correct HTTP method + status code (not 200 for everything) — see `references/status-codes.md`
- [ ] Zod schema from `@bondery/schemas`; route exported as `AppRoutePlugin`
- [ ] `applyOpenApiRouteMeta(routeOptions, { area })` on every top-level route plugin
- [ ] `description` + `response` on every route schema (`withOkResponse` / `withCreatedResponse`)
- [ ] Every inline OpenAPI property and every parameter has a `description` (Zod `.describe()`). `check:openapi` fails when one is missing.
- [ ] Paginated list uses nested `pagination` with server-computed `hasMore` (offset only)
- [ ] Paginated `ORDER BY` ends with a unique column (`id`) so pages cannot repeat a row — see `references/api-design.md#stable-page-order`
- [ ] Create returns `201` + full resource object; mutations per `references/api-mutations.md`
- [ ] New error code → catalog + `/docs/api/errors/{code}` + `en`/`cs`/`de` translations
- [ ] `pnpm run generate:openapi -w api` — confirm doc order in diff
- [ ] `pnpm run check:openapi` passes (includes route-order CI check)
- [ ] `check-route-errors`, `pnpm run check:api-errors` pass at repo root
- [ ] Auth, tenant scoping, webhooks, or uploads touched → `bondery-security` checklist satisfied
- [ ] MCP tools follow `{create|get|update|delete|search}_{resource}` — see `references/mcp-tools.md`
- [ ] Limited responses emit `RateLimit` and `RateLimit-Policy`. See `references/rate-limits.md`.
- [ ] The global hook covers a new `POST` or `PATCH`. An exemption sets `idempotency: false`. Name the exemption and the reason in `references/idempotency-keys.md`.
- [ ] Product deep-link actions use `next_action` from `NEXT_ACTIONS` — see `references/url-query-params.md`

Files in this skill

  • SKILL.md7 KB
  • references/README.md2.2 KB
  • references/api-design.md14.2 KB
  • references/api-errors.md3.7 KB
  • references/api-mutations.md6.5 KB
  • references/api-route-ordering.md4.3 KB
  • references/api-usage.md17.8 KB
  • references/fastify-routes.md2.8 KB
  • references/health-probes.md6.6 KB
  • references/idempotency-keys.md3.7 KB
  • references/mcp-tools.md15 KB
  • references/rate-limits.md4.2 KB
  • references/status-codes.md5.1 KB
  • references/sync-architecture.md9.2 KB
  • references/url-query-params.md4.7 KB
  • references/versioning.md3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in databases →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.