agent-instructions
Use when writing project instructions for a coding agent (CLAUDE.md, AGENTS.md, or equivalent). Covers what belongs in them, what…
Use when decomposing a system into services, or deciding whether to. Covers service boundaries, inter-service communication, distributed data, saga patterns, and the operational cost of the network. Trigger on "should we split the monolith", "extract this into a service", "our
Claude Code
$ npx -y skills add nimadorostkar/Claude-Skills-collection --skill microservices --agent claude-code
Codex
$ npx skills add nimadorostkar/Claude-Skills-collection --skill microservices -a codex -y
Cursor
$ npx skills add nimadorostkar/Claude-Skills-collection --skill microservices -a cursor -y
Gemini CLI
$ npx skills add nimadorostkar/Claude-Skills-collection --skill microservices -a gemini-cli -y
GitHub Copilot
$ npx skills add nimadorostkar/Claude-Skills-collection --skill microservices -a github-copilot -y
OpenCode
$ npx skills add nimadorostkar/Claude-Skills-collection --skill microservices -a opencode -y
Windsurf
$ npx skills add nimadorostkar/Claude-Skills-collection --skill microservices -a windsurf -y
name: microservices description: Use when decomposing a system into services, or deciding whether to. Covers service boundaries, inter-service communication, distributed data, saga patterns, and the operational cost of the network. Trigger on "should we split the monolith", "extract this into a service", "our services are too coupled". Do not use for broker and event design — see the event-driven-architecture skill; for pre-build system design, see the system-design skill. metadata: category: backend version: 1.0.0 tags: [microservices, distributed-systems, saga, boundaries]
Decide where service boundaries belong — and whether you need them at all. Splitting a system converts function calls into network calls, and every network call is a new failure mode you must design for.
1. **Justify the split** — The valid reasons are independent deployability, independent scaling, and team autonomy. "Microservices are best practice" is not a reason. 2. **Draw boundaries around data** — A service owns its data exclusively. If two services need the same table, they are one service. 3. **Prefer asynchronous** — A synchronous call chain of five services has the availability of the least available one, multiplied. Events decouple. 4. **Design the failure** — For every synchronous call: timeout, retry policy, circuit breaker, and a defined degraded behavior. 5. **Solve distributed writes with the outbox** — Write the state change and the event in one local transaction; publish from the outbox. Two-phase commit across services is not available to you. 6. **Trace everything** — Correlation ID propagated through every hop. Without it, a distributed system is undebuggable.
**Transactional outbox — the state change and the event commit atomically:**
BEGIN;
UPDATE orders SET status = 'paid' WHERE id = $1;
INSERT INTO outbox (id, aggregate_id, type, payload, created_at)
VALUES (gen_random_uuid(), $1, 'order.paid',
jsonb_build_object('order_id', $1, 'amount_cents', $2, 'version', 1),
now());
COMMIT;A separate relay polls `outbox`, publishes to the broker, and marks rows as sent. If the publish fails, the row remains and is retried; if the transaction rolls back, no event is emitted. The state and the event can never disagree.
**Saga compensation for a booking spanning three services:**
1. Reserve inventory -> compensate: release inventory 2. Charge payment -> compensate: refund payment 3. Confirm shipment -> compensate: cancel shipment Failure at step 3 runs compensations for 2 and 1, in reverse order. Each compensation must be idempotent — it will be retried.
A curated library of 137 production-grade skills for Claude and other AI coding agents. Every skill follows one structure, speaks with one voice, and earns its place by changing what the agent does.
Use when writing project instructions for a coding agent (CLAUDE.md, AGENTS.md, or equivalent). Covers what belongs in them, what…
Use when an agent needs state that survives a session or a context compaction. Covers what to persist, file-based memory,…
Use when automating agent behavior with lifecycle hooks. Covers hook events, deterministic enforcement of rules the model should…
Use when packaging skills, commands, hooks, and MCP servers into a distributable plugin. Covers manifest structure, bundling,…
Use when writing a new skill for an AI agent. Covers scoping, description writing for reliable triggering, progressive…
Use when reviewing or improving an existing agent skill. Covers triggering accuracy, content quality, redundancy with the base…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.