[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EN7BNBHT6913NS1YJWE35H":3,"skill-same:01M7EN7BNBHT6913NS1YJWE35H":47},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":25,"commitSha":26,"skillDirectory":27,"forksCount":28,"repositoryHtmlUrl":29,"repositoryHomepageUrl":6,"ownerHtmlUrl":30,"ownerBlogUrl":31,"ownerDescription":6,"updatedAt":32,"install":33,"resources":46},"01M7EN7BNBHT6913NS1YJWE35H","grpc-pro",null,"gRPC guidance — protobuf design, service patterns, streaming, deadlines, load balancing, and debugging.","TanNhatCMS\u002Fjarvis","TanNhatCMS","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F113796420?v=4","01M753MV17KG5CD3152G3WQEQY","KietNT","01M7EKEDYVYQ6PWVJJMZ911VMX",0,"MIT","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fams-grpc-pro\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: grpc-pro\ndescription: gRPC guidance — protobuf design, service patterns, streaming, deadlines, load balancing, and debugging.\ncategory: development\n---\n\n## Overview\n\ngRPC is a high-performance RPC framework built on HTTP\u002F2 and Protocol Buffers: strongly-typed contracts, efficient binary serialization, and first-class streaming in every direction. It shines for service-to-service communication inside a backend, where its speed and codegen pay off. It's a poor fit for browsers and public third-party APIs. This skill covers designing protobuf contracts that evolve safely, using streaming well, and operating gRPC (deadlines, retries, load balancing) in production.\n\n## When to use\n\n- Building service-to-service APIs in a microservices architecture.\n- Designing protobuf schemas and versioning strategy.\n- Choosing between gRPC, REST, and message queues.\n- Adding streaming (server, client, bidirectional) to a service.\n- Debugging gRPC (grpcurl, interceptors, status codes).\n- Configuring deadlines, retries, and load balancing.\n- Exposing gRPC to browsers (grpc-web) or bridging to REST (grpc-gateway).\n\n## Core concepts\n\n- **Protobuf is the contract.** Define services and messages in `.proto` files; generate clients\u002Fservers in any language. The schema is the API — design it deliberately and review changes like code.\n- **Field numbers are forever.** Never reuse a field number or change a field's type incompatibly; reserve deleted fields (`reserved 4, 15;`). Backward\u002Fforward compatibility rules are strict and must be followed mechanically.\n- **Four call patterns.** Unary (request\u002Fresponse), server streaming, client streaming, bidirectional streaming. Use streaming for event feeds, large datasets, and realtime coordination — not as a default for simple calls.\n- **Deadlines, not just timeouts.** Every RPC should carry a deadline propagated across the call chain; servers must respect cancellation. A missing deadline turns one slow dependency into a cascading thread-pool exhaustion.\n- **Status codes.** gRPC's rich codes (`NOT_FOUND`, `INVALID_ARGUMENT`, `UNAVAILABLE`, `DEADLINE_EXCEEDED`...) are the error contract — map domain errors to them consistently and put machine-readable details in `google.rpc.Status` details, not in stringly messages.\n- **Interceptors.** Cross-cutting concerns (auth, logging, tracing, metrics, retries) belong in client\u002Fserver interceptors, keeping handlers focused on business logic.\n- **Load balancing.** gRPC's long-lived HTTP\u002F2 connections defeat naive round-robin DNS. Use client-side LB (lookaside like xDS, or grpclb), or a service mesh \u002F proxy that understands HTTP\u002F2 (Envoy) — plain L4 load balancers will pin all traffic to one backend.\n- **Retries with hedging awareness.** Retry only idempotent RPCs, only on retryable codes (`UNAVAILABLE`), with backoff + jitter and a retry budget. Blind retries amplify outages.\n- **grpc-web and grpc-gateway.** Browsers can't speak gRPC natively: grpc-web needs a proxy translation layer; grpc-gateway generates a REST\u002FJSON transcoding from the same protos. Both add operational surface — only expose to browsers when you must.\n- **Reflection.** Enable server reflection in dev\u002Fstaging for `grpcurl` exploration; disable or restrict it in production so your API surface isn't enumerable.\n- **Buf.** The modern protobuf toolchain: linting, breaking-change detection, and schema registry. `buf breaking` in CI enforces compatibility rules mechanically instead of relying on reviewer memory.\n- **Health checking protocol.** The standard `grpc.health.v1` service lets orchestrators and load balancers probe serving status per service — implement it rather than inventing your own.\n- **xDS and service mesh.** For large deployments, xDS-based control planes (or a mesh sidecar) give gRPC rich traffic policy — retries, timeouts, circuit breaking — without client-side config.\n\n## Practical workflow\n\n1. **Design the protos.** One package per service boundary; request\u002Fresponse messages per method (never bare scalars — you can't extend them); stable field numbers; `google.api.http` annotations if you plan REST transcoding.\n   ```proto\n   syntax = \"proto3\";\n   package shop.orders.v1;\n\n   service OrderService {\n     rpc GetOrder(GetOrderRequest) returns (Order);\n     rpc StreamOrderEvents(StreamOrderEventsRequest) returns (stream OrderEvent);\n   }\n   message GetOrderRequest { string order_id = 1; }\n   ```\n2. **Generate and implement.** `buf generate` (or protoc) for stubs; keep handlers thin — validate, call domain services, map to responses. Never leak internal errors; map to status codes.\n3. **Add interceptors.** Auth token validation, request logging with correlation IDs, OpenTelemetry tracing, and metrics (latency histograms, error rates by code) — on both client and server.\n   ```go\n   \u002F\u002F unary server interceptor: auth + user injection\n   func authInterceptor(ctx context.Context, req any, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (any, error) {\n       token, err := bearerToken(ctx)\n       if err != nil {\n           return nil, status.Error(codes.Unauthenticated, \"missing credentials\")\n       }\n       return handler(withUser(ctx, validate(token)), req)\n   }\n   ```\n4. **Set deadlines everywhere.** Client-side default deadlines (e.g., 5s for unary), server handlers checking `context.Context` cancellation; propagate deadlines through downstream calls with reduced budgets.\n5. **Configure retries carefully.** Retry budget (e.g., 10-20% of traffic), idempotent methods only, exponential backoff with jitter; test what happens when the dependency is fully down.\n6. **Handle streaming correctly.** Backpressure via bounded channels\u002Fqueues; heartbeat\u002Fkeepalive to detect dead peers; clean shutdown draining streams; never buffer unbounded streams in memory.\n   - For bidirectional streams, define the protocol precisely (who speaks first, message ordering, termination) — document it in the proto comments.\n7. **Debug with grpcurl.** `grpcurl -plaintext localhost:50051 list` and direct method invocation replace curl for gRPC; pair with server reflection in non-prod environments.\n8. **Deploy.** Health checking protocol (`grpc.health.v1`) wired to orchestrator probes; TLS everywhere (even internally, via mesh or certs); connection-level settings (max message size, keepalive) tuned per service.\n\n## Common pitfalls\n\n- **Reusing field numbers** — silently corrupts data across versions; reserve deleted numbers forever.\n- **No deadlines** — one slow downstream cascades into full thread exhaustion; deadline every RPC.\n- **L4 load balancing** — all connections pin to one pod; use client-side or proxy-based HTTP\u002F2-aware LB.\n- **Retrying non-idempotent RPCs** — duplicated side effects; retry only safe methods on safe codes.\n- **Unbounded streaming buffers** — memory exhaustion from fast producers; apply backpressure.\n- **Leaking internal errors** — stack traces and DB details in status messages; map to codes with safe details.\n- **Oversized messages** — stuffing megabytes into unary responses; stream or paginate instead, and set sane max-message limits.\n- **Reflection on in production** — enumerable API surface; restrict to non-prod.\n- **Changing field types incompatibly** — int32→int64 is fine on the wire but breaks generated code assumptions; treat type changes as breaking.\n- **No health checks** — orchestrator can't tell a wedged server from a healthy one; implement the standard health protocol.\n- **Default max-message-size surprises** — 4MB default too small for some payloads, too generous for others; set it explicitly per service.\n- **Ignoring keepalive settings** — dead peers holding resources indefinitely; tune keepalive on both client and server.\n- **One proto package for everything** — merge conflicts and unwanted coupling; keep one package per service boundary.\n","## Overview\n\ngRPC is a high-performance RPC framework built on HTTP\u002F2 and Protocol Buffers: strongly-typed contracts, efficient binary serialization, and first-class streaming in every direction. It shines for service-to-service communication inside a backend, where its speed and codegen pay off. It's a poor fit for browsers and public third-party APIs. This skill covers designing protobuf contracts that evolve safely, using streaming well, and operating gRPC (deadlines, retries, load balancing) in production.\n\n## When to use\n\n- Building service-to-service APIs in a microservices architecture.\n- Designing protobuf schemas and versioning strategy.\n- Choosing between gRPC, REST, and message queues.\n- Adding streaming (server, client, bidirectional) to a service.\n- Debugging gRPC (grpcurl, interceptors, status codes).\n- Configuring deadlines, retries, and load balancing.\n- Exposing gRPC to browsers (grpc-web) or bridging to REST (grpc-gateway).\n\n## Core concepts\n\n- **Protobuf is the contract.** Define services and messages in `.proto` files; generate clients\u002Fservers in any language. The schema is the API — design it deliberately and review changes like code.\n- **Field numbers are forever.** Never reuse a field number or change a field's type incompatibly; reserve deleted fields (`reserved 4, 15;`). Backward\u002Fforward compatibility rules are strict and must be followed mechanically.\n- **Four call patterns.** Unary (request\u002Fresponse), server streaming, client streaming, bidirectional streaming. Use streaming for event feeds, large datasets, and realtime coordination — not as a default for simple calls.\n- **Deadlines, not just timeouts.** Every RPC should carry a deadline propagated across the call chain; servers must respect cancellation. A missing deadline turns one slow dependency into a cascading thread-pool exhaustion.\n- **Status codes.** gRPC's rich codes (`NOT_FOUND`, `INVALID_ARGUMENT`, `UNAVAILABLE`, `DEADLINE_EXCEEDED`...) are the error contract — map domain errors to them consistently and put machine-readable details in `google.rpc.Status` details, not in stringly messages.\n- **Interceptors.** Cross-cutting concerns (auth, logging, tracing, metrics, retries) belong in client\u002Fserver interceptors, keeping handlers focused on business logic.\n- **Load balancing.** gRPC's long-lived HTTP\u002F2 connections defeat naive round-robin DNS. Use client-side LB (lookaside like xDS, or grpclb), or a service mesh \u002F proxy that understands HTTP\u002F2 (Envoy) — plain L4 load balancers will pin all traffic to one backend.\n- **Retries with hedging awareness.** Retry only idempotent RPCs, only on retryable codes (`UNAVAILABLE`), with backoff + jitter and a retry budget. Blind retries amplify outages.\n- **grpc-web and grpc-gateway.** Browsers can't speak gRPC natively: grpc-web needs a proxy translation layer; grpc-gateway generates a REST\u002FJSON transcoding from the same protos. Both add operational surface — only expose to browsers when you must.\n- **Reflection.** Enable server reflection in dev\u002Fstaging for `grpcurl` exploration; disable or restrict it in production so your API surface isn't enumerable.\n- **Buf.** The modern protobuf toolchain: linting, breaking-change detection, and schema registry. `buf breaking` in CI enforces compatibility rules mechanically instead of relying on reviewer memory.\n- **Health checking protocol.** The standard `grpc.health.v1` service lets orchestrators and load balancers probe serving status per service — implement it rather than inventing your own.\n- **xDS and service mesh.** For large deployments, xDS-based control planes (or a mesh sidecar) give gRPC rich traffic policy — retries, timeouts, circuit breaking — without client-side config.\n\n## Practical workflow\n\n1. **Design the protos.** One package per service boundary; request\u002Fresponse messages per method (never bare scalars — you can't extend them); stable field numbers; `google.api.http` annotations if you plan REST transcoding.\n   ```proto\n   syntax = \"proto3\";\n   package shop.orders.v1;\n\n   service OrderService {\n     rpc GetOrder(GetOrderRequest) returns (Order);\n     rpc StreamOrderEvents(StreamOrderEventsRequest) returns (stream OrderEvent);\n   }\n   message GetOrderRequest { string order_id = 1; }\n   ```\n2. **Generate and implement.** `buf generate` (or protoc) for stubs; keep handlers thin — validate, call domain services, map to responses. Never leak internal errors; map to status codes.\n3. **Add interceptors.** Auth token validation, request logging with correlation IDs, OpenTelemetry tracing, and metrics (latency histograms, error rates by code) — on both client and server.\n   ```go\n   \u002F\u002F unary server interceptor: auth + user injection\n   func authInterceptor(ctx context.Context, req any, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (any, error) {\n       token, err := bearerToken(ctx)\n       if err != nil {\n           return nil, status.Error(codes.Unauthenticated, \"missing credentials\")\n       }\n       return handler(withUser(ctx, validate(token)), req)\n   }\n   ```\n4. **Set deadlines everywhere.** Client-side default deadlines (e.g., 5s for unary), server handlers checking `context.Context` cancellation; propagate deadlines through downstream calls with reduced budgets.\n5. **Configure retries carefully.** Retry budget (e.g., 10-20% of traffic), idempotent methods only, exponential backoff with jitter; test what happens when the dependency is fully down.\n6. **Handle streaming correctly.** Backpressure via bounded channels\u002Fqueues; heartbeat\u002Fkeepalive to detect dead peers; clean shutdown draining streams; never buffer unbounded streams in memory.\n   - For bidirectional streams, define the protocol precisely (who speaks first, message ordering, termination) — document it in the proto comments.\n7. **Debug with grpcurl.** `grpcurl -plaintext localhost:50051 list` and direct method invocation replace curl for gRPC; pair with server reflection in non-prod environments.\n8. **Deploy.** Health checking protocol (`grpc.health.v1`) wired to orchestrator probes; TLS everywhere (even internally, via mesh or certs); connection-level settings (max message size, keepalive) tuned per service.\n\n## Common pitfalls\n\n- **Reusing field numbers** — silently corrupts data across versions; reserve deleted numbers forever.\n- **No deadlines** — one slow downstream cascades into full thread exhaustion; deadline every RPC.\n- **L4 load balancing** — all connections pin to one pod; use client-side or proxy-based HTTP\u002F2-aware LB.\n- **Retrying non-idempotent RPCs** — duplicated side effects; retry only safe methods on safe codes.\n- **Unbounded streaming buffers** — memory exhaustion from fast producers; apply backpressure.\n- **Leaking internal errors** — stack traces and DB details in status messages; map to codes with safe details.\n- **Oversized messages** — stuffing megabytes into unary responses; stream or paginate instead, and set sane max-message limits.\n- **Reflection on in production** — enumerable API surface; restrict to non-prod.\n- **Changing field types incompatibly** — int32→int64 is fine on the wire but breaks generated code assumptions; treat type changes as breaking.\n- **No health checks** — orchestrator can't tell a wedged server from a healthy one; implement the standard health protocol.\n- **Default max-message-size surprises** — 4MB default too small for some payloads, too generous for others; set it explicitly per service.\n- **Ignoring keepalive settings** — dead peers holding resources indefinitely; tune keepalive on both client and server.\n- **One proto package for everything** — merge conflicts and unwanted coupling; keep one package per service boundary.\n",{"name":5,"category":24,"description":7},"development","main","af388a77c2fe5e0b4fd879cca4300a0ffa9a6579","skills\u002Fams-grpc-pro",1,"https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis","https:\u002F\u002Fgithub.com\u002FTanNhatCMS","https:\u002F\u002Fmrkiet.name.vn","2026-11-07 14:23:08",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add TanNhatCMS\u002Fjarvis --skill grpc-pro",{"tool":39,"command":40},"bunx","bunx skills add TanNhatCMS\u002Fjarvis --skill grpc-pro",{"tool":42,"command":43},"pnpm","pnpm dlx skills add TanNhatCMS\u002Fjarvis --skill grpc-pro","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fams-grpc-pro\u002FSKILL.md",true,[],[48,55,63,70,77,84],{"skillNo":49,"name":50,"nameZh":6,"description":51,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":52,"categories":53,"keywords":54,"publishedAt":19},"01M7EWYJR0J8DARY7E59Z6Y9MV","web-scrape","Turn web pages into LLM-ready markdown via the Firecrawl API (renders JS, anti-bot handling). Use when browser_open\u002Ffetch fails on JS-heavy pages, or when you need clean markdown\u002Fstructured extraction from a site. Requires FIRECRAWL_API_KEY.","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fweb-scrape\u002FSKILL.md",[],[],{"skillNo":56,"name":57,"nameZh":6,"description":58,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":59,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":19},"01M7EWYBN5P6F2AJG3FR24T9BP","design-taste-frontend","tasteskill v2, the anti-slop frontend skill. Art direction for websites, distilled from a study of 247 curated gallery sites (One Page Love, Awwwards Sites of the Day). Deals researched directions (idea, composition, type, palette, photographs, section blueprints) from a library, enforces a strict no-slop house style with a real-browser inspector, and runs a look-and-fix loop on screenshots. Use this whenever you build, design, redesign, restyle, polish or review a landing page, marketing site, portfolio, product page, one-pager, hero or any public-facing web page, in any stack (HTML\u002FCSS, React, Next.js, Vue, Svelte, Astro, Tailwind) — also when the user says a page looks generic, templated, \"AI-made\", sloppy, or asks to make it look designed, premium, award-level or less like every other site. Not for dashboards or app screens.","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Ftaste-design\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Ftaste-design\u002FSKILL.md",[],[],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M7EWY8FQFNQ2GB7NZZWGSSDX","test-driven-development","Use when implementing any feature or bugfix, before writing implementation code","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-tdd\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M7EWY5SHBFRH1HDHVWM9K7TV","systematic-debugging","Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-debugging\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M7EWY3NM0Z0JAKS7HDZ24K66","requesting-code-review","Use when completing tasks, implementing major features, or before merging to verify work meets requirements","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-code-review\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M7EWY0WRMWX4M9ZFY0WKC593","brainstorming","You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-brainstorming\u002FSKILL.md",[],[]]