[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7BWHCABKC5RRVSXM28RGQGC":3,"skill-same:01M7BWHCABKC5RRVSXM28RGQGC":67},{"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":30,"commitSha":31,"skillDirectory":32,"forksCount":33,"repositoryHtmlUrl":34,"repositoryHomepageUrl":6,"ownerHtmlUrl":35,"ownerBlogUrl":36,"ownerDescription":37,"updatedAt":38,"install":39,"resources":52},"01M7BWHCABKC5RRVSXM28RGQGC","apollo-router-plugin-creator",null,"Guide for writing Apollo Router native Rust plugins. Use this skill when: (1) users want to create a new router plugin, (2) users want to add service hooks (router_service, supergraph_service, execution_service, subgraph_service), (3) users want to modify an existing router plugin, (4) users need to understand router plugin patterns or the request lifecycle. (5) triggers on requests like \"create a new plugin\", \"add a router plugin\", \"modify the X plugin\", or \"add subgraph_service hook\".","CognitionAI\u002Fdevin-marketplace","CognitionAI","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F163493330?v=4","01M7BVSRD98NC4FG8T3EZS6V5M","Cognition","01M7BVSRDX111C2XPWJ0E6MY26",29,"MIT","https:\u002F\u002Fgithub.com\u002FCognitionAI\u002Fdevin-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Fgraphos-tools\u002Fskills\u002Fapollo-router-plugin-creator\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: apollo-router-plugin-creator\ndescription: >\n  Guide for writing Apollo Router native Rust plugins. Use this skill when:\n  (1) users want to create a new router plugin,\n  (2) users want to add service hooks (router_service, supergraph_service, execution_service, subgraph_service),\n  (3) users want to modify an existing router plugin,\n  (4) users need to understand router plugin patterns or the request lifecycle.\n  (5) triggers on requests like \"create a new plugin\", \"add a router plugin\", \"modify the X plugin\", or \"add subgraph_service hook\".\nlicense: MIT\nallowed-tools: Read Write Edit Glob Grep\nmetadata:\n  author: apollographql\n  version: \"1.0.0\"\n  compatibility: \"Requires Apollo Router with native plugin support\"\n---\n\n# Apollo Router Plugin Creator\n\nCreate native Rust plugins for Apollo Router.\n\n## Request Lifecycle\n\n```\n┌────────┐             ┌────────────────┐                                   ┌────────────────────┐               ┌───────────────────┐       ┌─────────────────────┐\n│ Client │             │ Router Service │                                   │ Supergraph Service │               │ Execution Service │       │ Subgraph Service(s) │\n└────┬───┘             └────────┬───────┘                                   └──────────┬─────────┘               └─────────┬─────────┘       └──────────┬──────────┘\n     │                          │                                                      │                                   │                            │\n     │      Sends request       │                                                      │                                   │                            │\n     │──────────────────────────▶                                                      │                                   │                            │\n     │                          │                                                      │                                   │                            │\n     │                          │  Converts raw HTTP request to GraphQL\u002FJSON request   │                                   │                            │\n     │                          │──────────────────────────────────────────────────────▶                                   │                            │\n     │                          │                                                      │                                   │                            │\n     │                          │                                                      │  Initiates query plan execution   │                            │\n     │                          │                                                      │───────────────────────────────────▶                            │\n     │                          │                                                      │                                   │                            │\n     │                          │                                                      │                               ┌par [Initiates sub-operation]───────┐\n     │                          │                                                      │                               │   │                            │   │\n     │                          │                                                      │                               │   │  Initiates sub-operation   │   │\n     │                          │                                                      │                               │   │────────────────────────────▶   │\n     │                          │                                                      │                               │   │                            │   │\n     │                          │                                                      │                               ├[Initiates sub-operation]╌╌╌╌╌╌╌╌╌╌╌┤\n     │                          │                                                      │                               │   │                            │   │\n     │                          │                                                      │                               │   │  Initiates sub-operation   │   │\n     │                          │                                                      │                               │   │────────────────────────────▶   │\n     │                          │                                                      │                               │   │                            │   │\n     │                          │                                                      │                               ├[Initiates sub-operation]╌╌╌╌╌╌╌╌╌╌╌┤\n     │                          │                                                      │                               │   │                            │   │\n     │                          │                                                      │                               │   │  Initiates sub-operation   │   │\n     │                          │                                                      │                               │   │────────────────────────────▶   │\n     │                          │                                                      │                               │   │                            │   │\n     │                          │                                                      │                               └────────────────────────────────────┘\n     │                          │                                                      │                                   │                            │\n     │                          │                                                      │  Assembles and returns response   │                            │\n     │                          │                                                      ◀╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌│                            │\n     │                          │                                                      │                                   │                            │\n     │                          │            Returns GraphQL\u002FJSON response             │                                   │                            │\n     │                          ◀╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌│                                   │                            │\n     │                          │                                                      │                                   │                            │\n     │  Returns HTTP response   │                                                      │                                   │                            │\n     ◀╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌│                                                      │                                   │                            │\n     │                          │                                                      │                                   │                            │\n┌────┴───┐             ┌────────┴───────┐                                   ┌──────────┴─────────┐               ┌─────────┴─────────┐       ┌──────────┴──────────┐\n│ Client │             │ Router Service │                                   │ Supergraph Service │               │ Execution Service │       │ Subgraph Service(s) │\n└────────┘             └────────────────┘                                   └────────────────────┘               └───────────────────┘       └─────────────────────┘\n```\n\n## Service Hooks\n\n### Service Overview\n\n| Service              | Description                                                                                                                                                                                                                                                                                                                                                                                                                                           |\n|----------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `router_service`     | Runs at the very beginning and very end of the HTTP request lifecycle.For example, JWT authentication is performed within the RouterService.Define router_service if your customization needs to interact with HTTP context and headers. It doesn't support access to the body property                                                                                                                                                               |\n| `supergraph_service` | Runs at the very beginning and very end of the GraphQL request lifecycle.Define supergraph_service if your customization needs to interact with the GraphQL request or the GraphQL response. For example, you can add a check for anonymous queries.                                                                                                                                                                                                  |\n| `execution_service`  | Handles initiating the execution of a query plan after it's been generated.Define execution_service if your customization includes logic to govern execution (for example, if you want to block a particular query based on a policy decision).                                                                                                                                                                                                       |\n| `subgraph_service`   | Handles communication between the router and your subgraphs.Define subgraph_service to configure this communication (for example, to dynamically add HTTP headers to pass to a subgraph).Whereas other services are called once per client request, this service is called once per subgraph request that's required to resolve the client's request. Each call is passed a subgraph parameter that indicates the name of the corresponding subgraph. |\n\n**Signatures:**\n```rust\nfn router_service(&self, service: router::BoxService) -> router::BoxService\nfn supergraph_service(&self, service: supergraph::BoxService) -> supergraph::BoxService\nfn execution_service(&self, service: execution::BoxService) -> execution::BoxService\nfn subgraph_service(&self, name: &str, service: subgraph::BoxService) -> subgraph::BoxService\n```\n\n### Individual Hooks (Tower Layers)\n\nUse `ServiceBuilder` to compose these hooks within any service:\n\n| Hook                      | Purpose                                      | Sync\u002FAsync |\n|---------------------------|----------------------------------------------|------------|\n| `map_request(fn)`         | Transform request before proceeding          | Sync       |\n| `map_response(fn)`        | Transform response before returning          | Sync       |\n| `checkpoint(fn)`          | Validate\u002Ffilter, can short-circuit           | Sync       |\n| `checkpoint_async(fn)`    | Async validation, can short-circuit          | Async      |\n| `buffered()`              | Enable service cloning (needed for async)    | -          |\n| `instrument(span)`        | Add tracing span around service              | -          |\n| `rate_limit(num, period)` | Control request throughput                   | -          |\n| `timeout(duration)`       | Set operation time limit                     | -          |\n\n### Choosing a Service Hook\n\n**By data needed:**\n- HTTP headers only → `router_service`\n- GraphQL query\u002Fvariables → `supergraph_service`\n- Query plan → `execution_service`\n- Per-subgraph control → `subgraph_service`\n\n**By timing:**\n- Before GraphQL parsing → `router_service` request\n- After parsing, before planning → `supergraph_service` request\n- After planning, before execution → `execution_service` request\n- Before\u002Fafter each subgraph call → `subgraph_service`\n- Final response to client → `router_service` response\n\nSee [references\u002Fservice-hooks.md](references\u002Fservice-hooks.md) for implementation patterns.\n\n## Quick Start\n\n### Step 1: Create Plugin File\n\nCreate a new file `src\u002Fplugins\u002Fmy_plugin.rs` with required imports:\n\n```rust\nuse std::ops::ControlFlow;\nuse apollo_router::plugin::{Plugin, PluginInit};\nuse apollo_router::register_plugin;\nuse apollo_router::services::{router, subgraph, supergraph};\nuse schemars::JsonSchema;\nuse serde::Deserialize;\nuse tower::{BoxError, ServiceBuilder, ServiceExt};\n\nconst PLUGIN_NAME: &str = \"my_plugin\";\n```\n\n### Step 2: Define Configuration Struct\n\nEvery plugin needs a configuration struct with `Deserialize` and `JsonSchema` derives. The `JsonSchema` enables configuration validation in editors:\n\n```rust\n#[derive(Debug, Clone, Default, Deserialize, JsonSchema)]\nstruct MyPluginConfig {\n  \u002F\u002F\u002F Enable the plugin\n  enabled: bool,\n  \u002F\u002F Add other configuration fields as needed\n}\n```\n\n### Step 3: Define Plugin Struct\n\n```rust\n#[derive(Debug)]\nstruct MyPlugin {\n  configuration: MyPluginConfig,\n}\n```\n\n### Step 4: Implement Plugin Trait\n\nImplement the `Plugin` trait with the required `Config` type and `new` constructor:\n\n```rust\n#[async_trait::async_trait]\nimpl Plugin for MyPlugin {\n  type Config = MyPluginConfig;\n\n  async fn new(init: PluginInit\u003CSelf::Config>) -> Result\u003CSelf, BoxError> {\n    Ok(MyPlugin { configuration: init.config })\n  }\n\n  \u002F\u002F Add service hooks based on your needs (see \"Choosing a Service Hook\" section)\n}\n```\n\n### Step 5: Add Service Hooks\n\nChoose which service(s) to hook based on your requirements, see [Service Overview](#service-overview) for details.\n\nExample service hook:\n```rust\nfn supergraph_service(&self, service: supergraph::BoxService) -> supergraph::BoxService {\n  if !self.configuration.enabled {\n    return service;\n  }\n\n  ServiceBuilder::new()\n    .map_request(|req| { \u002F* transform request *\u002F req })\n    .map_response(|res| { \u002F* transform response *\u002F res })\n    .service(service)\n    .boxed()\n}\n```\n\n### Step 6: Register Plugin\n\nAt the bottom of your plugin file, register it with the router:\n\n```rust\nregister_plugin!(\"acme\", \"my_plugin\", MyPlugin);\n```\n\n### Step 7: Add Module to mod.rs\n\nIn `src\u002Fplugins\u002Fmod.rs`, add your module:\n\n```rust\npub mod my_plugin;\n```\n\n### Step 8: Configure in YAML\n\nEnable your plugin in the router configuration:\n\n```yaml\nplugins:\n  acme.my_plugin:\n    enabled: true\n```\n\n## Common Patterns\n\nFor implementation patterns and code examples, see [references\u002Fservice-hooks.md](references\u002Fservice-hooks.md):\n- Enable\u002Fdisable pattern\n- Request\u002Fresponse transformation (`map_request`, `map_response`)\n- Checkpoint (early return\u002Fshort-circuit)\n- Context passing between hooks\n- Async operations (`checkpoint_async`, `buffered`)\n- Error response builders\n\n## Examples\n\n### Apollo Router Examples\n\nLocated in the [Apollo Router plugins directory](https:\u002F\u002Fgithub.com\u002Fapollographql\u002Frouter\u002Ftree\u002Fdev\u002Fapollo-router\u002Fsrc\u002Fplugins):\n\n| Plugin                 | Service Hook           | Pattern           | Description                 |\n|------------------------|------------------------|-------------------|-----------------------------|\n| `forbid_mutations.rs`  | `execution_service`    | checkpoint        | Simple gate on query plan   |\n| `expose_query_plan.rs` | execution + supergraph | Context passing   | Multi-service coordination  |\n| `cors.rs`              | `router_service`       | HTTP layer        | CORS handling at HTTP level |\n| `headers\u002F`             | `subgraph_service`     | Layer composition | Complex header manipulation |\n\nFor full code examples and testing patterns, see [references\u002Fexamples.md](references\u002Fexamples.md).\n\n## Prerequisites\n\nIt is advised to have the [rust-best-practices](https:\u002F\u002Fskills.sh\u002Fapollographql\u002Fskills\u002Frust-best-practices) skill installed for writing idiomatic Rust code when developing router plugins. If installed, follow those best practices when generating or modifying plugin code.\n\n## Resources\n\n- [references\u002Fservice-hooks.md](references\u002Fservice-hooks.md) - Detailed service hook implementations\n- [references\u002Fexisting-plugins.md](references\u002Fexisting-plugins.md) - Index of existing plugins\n- [references\u002Fexamples.md](references\u002Fexamples.md) - Full code examples and testing patterns\n- Apollo Router plugins: https:\u002F\u002Fgithub.com\u002Fapollographql\u002Frouter\u002Ftree\u002Fdev\u002Fapollo-router\u002Fsrc\u002Fplugins","# Apollo Router Plugin Creator\n\nCreate native Rust plugins for Apollo Router.\n\n## Request Lifecycle\n\n```\n┌────────┐             ┌────────────────┐                                   ┌────────────────────┐               ┌───────────────────┐       ┌─────────────────────┐\n│ Client │             │ Router Service │                                   │ Supergraph Service │               │ Execution Service │       │ Subgraph Service(s) │\n└────┬───┘             └────────┬───────┘                                   └──────────┬─────────┘               └─────────┬─────────┘       └──────────┬──────────┘\n     │                          │                                                      │                                   │                            │\n     │      Sends request       │                                                      │                                   │                            │\n     │──────────────────────────▶                                                      │                                   │                            │\n     │                          │                                                      │                                   │                            │\n     │                          │  Converts raw HTTP request to GraphQL\u002FJSON request   │                                   │                            │\n     │                          │──────────────────────────────────────────────────────▶                                   │                            │\n     │                          │                                                      │                                   │                            │\n     │                          │                                                      │  Initiates query plan execution   │                            │\n     │                          │                                                      │───────────────────────────────────▶                            │\n     │                          │                                                      │                                   │                            │\n     │                          │                                                      │                               ┌par [Initiates sub-operation]───────┐\n     │                          │                                                      │                               │   │                            │   │\n     │                          │                                                      │                               │   │  Initiates sub-operation   │   │\n     │                          │                                                      │                               │   │────────────────────────────▶   │\n     │                          │                                                      │                               │   │                            │   │\n     │                          │                                                      │                               ├[Initiates sub-operation]╌╌╌╌╌╌╌╌╌╌╌┤\n     │                          │                                                      │                               │   │                            │   │\n     │                          │                                                      │                               │   │  Initiates sub-operation   │   │\n     │                          │                                                      │                               │   │────────────────────────────▶   │\n     │                          │                                                      │                               │   │                            │   │\n     │                          │                                                      │                               ├[Initiates sub-operation]╌╌╌╌╌╌╌╌╌╌╌┤\n     │                          │                                                      │                               │   │                            │   │\n     │                          │                                                      │                               │   │  Initiates sub-operation   │   │\n     │                          │                                                      │                               │   │────────────────────────────▶   │\n     │                          │                                                      │                               │   │                            │   │\n     │                          │                                                      │                               └────────────────────────────────────┘\n     │                          │                                                      │                                   │                            │\n     │                          │                                                      │  Assembles and returns response   │                            │\n     │                          │                                                      ◀╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌│                            │\n     │                          │                                                      │                                   │                            │\n     │                          │            Returns GraphQL\u002FJSON response             │                                   │                            │\n     │                          ◀╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌│                                   │                            │\n     │                          │                                                      │                                   │                            │\n     │  Returns HTTP response   │                                                      │                                   │                            │\n     ◀╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌│                                                      │                                   │                            │\n     │                          │                                                      │                                   │                            │\n┌────┴───┐             ┌────────┴───────┐                                   ┌──────────┴─────────┐               ┌─────────┴─────────┐       ┌──────────┴──────────┐\n│ Client │             │ Router Service │                                   │ Supergraph Service │               │ Execution Service │       │ Subgraph Service(s) │\n└────────┘             └────────────────┘                                   └────────────────────┘               └───────────────────┘       └─────────────────────┘\n```\n\n## Service Hooks\n\n### Service Overview\n\n| Service              | Description                                                                                                                                                                                                                                                                                                                                                                                                                                           |\n|----------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `router_service`     | Runs at the very beginning and very end of the HTTP request lifecycle.For example, JWT authentication is performed within the RouterService.Define router_service if your customization needs to interact with HTTP context and headers. It doesn't support access to the body property                                                                                                                                                               |\n| `supergraph_service` | Runs at the very beginning and very end of the GraphQL request lifecycle.Define supergraph_service if your customization needs to interact with the GraphQL request or the GraphQL response. For example, you can add a check for anonymous queries.                                                                                                                                                                                                  |\n| `execution_service`  | Handles initiating the execution of a query plan after it's been generated.Define execution_service if your customization includes logic to govern execution (for example, if you want to block a particular query based on a policy decision).                                                                                                                                                                                                       |\n| `subgraph_service`   | Handles communication between the router and your subgraphs.Define subgraph_service to configure this communication (for example, to dynamically add HTTP headers to pass to a subgraph).Whereas other services are called once per client request, this service is called once per subgraph request that's required to resolve the client's request. Each call is passed a subgraph parameter that indicates the name of the corresponding subgraph. |\n\n**Signatures:**\n```rust\nfn router_service(&self, service: router::BoxService) -> router::BoxService\nfn supergraph_service(&self, service: supergraph::BoxService) -> supergraph::BoxService\nfn execution_service(&self, service: execution::BoxService) -> execution::BoxService\nfn subgraph_service(&self, name: &str, service: subgraph::BoxService) -> subgraph::BoxService\n```\n\n### Individual Hooks (Tower Layers)\n\nUse `ServiceBuilder` to compose these hooks within any service:\n\n| Hook                      | Purpose                                      | Sync\u002FAsync |\n|---------------------------|----------------------------------------------|------------|\n| `map_request(fn)`         | Transform request before proceeding          | Sync       |\n| `map_response(fn)`        | Transform response before returning          | Sync       |\n| `checkpoint(fn)`          | Validate\u002Ffilter, can short-circuit           | Sync       |\n| `checkpoint_async(fn)`    | Async validation, can short-circuit          | Async      |\n| `buffered()`              | Enable service cloning (needed for async)    | -          |\n| `instrument(span)`        | Add tracing span around service              | -          |\n| `rate_limit(num, period)` | Control request throughput                   | -          |\n| `timeout(duration)`       | Set operation time limit                     | -          |\n\n### Choosing a Service Hook\n\n**By data needed:**\n- HTTP headers only → `router_service`\n- GraphQL query\u002Fvariables → `supergraph_service`\n- Query plan → `execution_service`\n- Per-subgraph control → `subgraph_service`\n\n**By timing:**\n- Before GraphQL parsing → `router_service` request\n- After parsing, before planning → `supergraph_service` request\n- After planning, before execution → `execution_service` request\n- Before\u002Fafter each subgraph call → `subgraph_service`\n- Final response to client → `router_service` response\n\nSee [references\u002Fservice-hooks.md](references\u002Fservice-hooks.md) for implementation patterns.\n\n## Quick Start\n\n### Step 1: Create Plugin File\n\nCreate a new file `src\u002Fplugins\u002Fmy_plugin.rs` with required imports:\n\n```rust\nuse std::ops::ControlFlow;\nuse apollo_router::plugin::{Plugin, PluginInit};\nuse apollo_router::register_plugin;\nuse apollo_router::services::{router, subgraph, supergraph};\nuse schemars::JsonSchema;\nuse serde::Deserialize;\nuse tower::{BoxError, ServiceBuilder, ServiceExt};\n\nconst PLUGIN_NAME: &str = \"my_plugin\";\n```\n\n### Step 2: Define Configuration Struct\n\nEvery plugin needs a configuration struct with `Deserialize` and `JsonSchema` derives. The `JsonSchema` enables configuration validation in editors:\n\n```rust\n#[derive(Debug, Clone, Default, Deserialize, JsonSchema)]\nstruct MyPluginConfig {\n  \u002F\u002F\u002F Enable the plugin\n  enabled: bool,\n  \u002F\u002F Add other configuration fields as needed\n}\n```\n\n### Step 3: Define Plugin Struct\n\n```rust\n#[derive(Debug)]\nstruct MyPlugin {\n  configuration: MyPluginConfig,\n}\n```\n\n### Step 4: Implement Plugin Trait\n\nImplement the `Plugin` trait with the required `Config` type and `new` constructor:\n\n```rust\n#[async_trait::async_trait]\nimpl Plugin for MyPlugin {\n  type Config = MyPluginConfig;\n\n  async fn new(init: PluginInit\u003CSelf::Config>) -> Result\u003CSelf, BoxError> {\n    Ok(MyPlugin { configuration: init.config })\n  }\n\n  \u002F\u002F Add service hooks based on your needs (see \"Choosing a Service Hook\" section)\n}\n```\n\n### Step 5: Add Service Hooks\n\nChoose which service(s) to hook based on your requirements, see [Service Overview](#service-overview) for details.\n\nExample service hook:\n```rust\nfn supergraph_service(&self, service: supergraph::BoxService) -> supergraph::BoxService {\n  if !self.configuration.enabled {\n    return service;\n  }\n\n  ServiceBuilder::new()\n    .map_request(|req| { \u002F* transform request *\u002F req })\n    .map_response(|res| { \u002F* transform response *\u002F res })\n    .service(service)\n    .boxed()\n}\n```\n\n### Step 6: Register Plugin\n\nAt the bottom of your plugin file, register it with the router:\n\n```rust\nregister_plugin!(\"acme\", \"my_plugin\", MyPlugin);\n```\n\n### Step 7: Add Module to mod.rs\n\nIn `src\u002Fplugins\u002Fmod.rs`, add your module:\n\n```rust\npub mod my_plugin;\n```\n\n### Step 8: Configure in YAML\n\nEnable your plugin in the router configuration:\n\n```yaml\nplugins:\n  acme.my_plugin:\n    enabled: true\n```\n\n## Common Patterns\n\nFor implementation patterns and code examples, see [references\u002Fservice-hooks.md](references\u002Fservice-hooks.md):\n- Enable\u002Fdisable pattern\n- Request\u002Fresponse transformation (`map_request`, `map_response`)\n- Checkpoint (early return\u002Fshort-circuit)\n- Context passing between hooks\n- Async operations (`checkpoint_async`, `buffered`)\n- Error response builders\n\n## Examples\n\n### Apollo Router Examples\n\nLocated in the [Apollo Router plugins directory](https:\u002F\u002Fgithub.com\u002Fapollographql\u002Frouter\u002Ftree\u002Fdev\u002Fapollo-router\u002Fsrc\u002Fplugins):\n\n| Plugin                 | Service Hook           | Pattern           | Description                 |\n|------------------------|------------------------|-------------------|-----------------------------|\n| `forbid_mutations.rs`  | `execution_service`    | checkpoint        | Simple gate on query plan   |\n| `expose_query_plan.rs` | execution + supergraph | Context passing   | Multi-service coordination  |\n| `cors.rs`              | `router_service`       | HTTP layer        | CORS handling at HTTP level |\n| `headers\u002F`             | `subgraph_service`     | Layer composition | Complex header manipulation |\n\nFor full code examples and testing patterns, see [references\u002Fexamples.md](references\u002Fexamples.md).\n\n## Prerequisites\n\nIt is advised to have the [rust-best-practices](https:\u002F\u002Fskills.sh\u002Fapollographql\u002Fskills\u002Frust-best-practices) skill installed for writing idiomatic Rust code when developing router plugins. If installed, follow those best practices when generating or modifying plugin code.\n\n## Resources\n\n- [references\u002Fservice-hooks.md](references\u002Fservice-hooks.md) - Detailed service hook implementations\n- [references\u002Fexisting-plugins.md](references\u002Fexisting-plugins.md) - Index of existing plugins\n- [references\u002Fexamples.md](references\u002Fexamples.md) - Full code examples and testing patterns\n- Apollo Router plugins: https:\u002F\u002Fgithub.com\u002Fapollographql\u002Frouter\u002Ftree\u002Fdev\u002Fapollo-router\u002Fsrc\u002Fplugins",{"name":5,"license":15,"metadata":24,"description":28,"allowed-tools":29},{"author":25,"version":26,"compatibility":27},"apollographql","1.0.0","Requires Apollo Router with native plugin support","Guide for writing Apollo Router native Rust plugins. Use this skill when: (1) users want to create a new router plugin, (2) users want to add service hooks (router_service, supergraph_service, execution_service, subgraph_service), (3) users want to modify an existing router plugin, (4) users need to understand router plugin patterns or the request lifecycle. (5) triggers on requests like \"create a new plugin\", \"add a router plugin\", \"modify the X plugin\", or \"add subgraph_service hook\".\n","Read Write Edit Glob Grep","main","9836d94e88404aabb682086405c2aa9cba7657ac","plugins\u002Fgraphos-tools\u002Fskills\u002Fapollo-router-plugin-creator",156,"https:\u002F\u002Fgithub.com\u002FCognitionAI\u002Fdevin-marketplace","https:\u002F\u002Fgithub.com\u002FCognitionAI","https:\u002F\u002Fcognition.ai\u002F","Makers of Devin, the AI software engineer.","2026-11-13 07:08:23",{"source":8,"skillName":5,"commands":40,"prompt":50,"zipAvailable":51},[41,44,47],{"tool":42,"command":43},"npx","npx skills add CognitionAI\u002Fdevin-marketplace --skill apollo-router-plugin-creator",{"tool":45,"command":46},"bunx","bunx skills add CognitionAI\u002Fdevin-marketplace --skill apollo-router-plugin-creator",{"tool":48,"command":49},"pnpm","pnpm dlx skills add CognitionAI\u002Fdevin-marketplace --skill apollo-router-plugin-creator","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FCognitionAI\u002Fdevin-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Fgraphos-tools\u002Fskills\u002Fapollo-router-plugin-creator\u002FSKILL.md",true,[53,59,63],{"path":54,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":57,"sourceHtmlUrl":58},"references\u002Fexamples.md","REFERENCE","参考文档",5023,"https:\u002F\u002Fgithub.com\u002FCognitionAI\u002Fdevin-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Fgraphos-tools\u002Fskills\u002Fapollo-router-plugin-creator\u002Freferences\u002Fexamples.md",{"path":60,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":61,"sourceHtmlUrl":62},"references\u002Fexisting-plugins.md",1755,"https:\u002F\u002Fgithub.com\u002FCognitionAI\u002Fdevin-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Fgraphos-tools\u002Fskills\u002Fapollo-router-plugin-creator\u002Freferences\u002Fexisting-plugins.md",{"path":64,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":65,"sourceHtmlUrl":66},"references\u002Fservice-hooks.md",7150,"https:\u002F\u002Fgithub.com\u002FCognitionAI\u002Fdevin-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Fgraphos-tools\u002Fskills\u002Fapollo-router-plugin-creator\u002Freferences\u002Fservice-hooks.md",[68,74,81,87,94,101],{"skillNo":69,"name":70,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":19},"01M7BYC4AJGM98P2G9JH7QS24Z","business-data","https:\u002F\u002Fgithub.com\u002FCognitionAI\u002Fdevin-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Fwindsor-ai\u002Fskills\u002Fbusiness-data\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":19},"01M7BYBZ0CD4CBCPZHRZ551BNK","workflow","Creates durable, resumable workflows using Vercel's Workflow SDK. Use when building workflows that need to survive restarts, pause for external events, retry on failure, or coordinate multi-step operations over time. Triggers on mentions of \"workflow\", \"durable functions\", \"resumable\", \"workflow sdk\", \"queue\", \"event\", \"push\", \"subscribe\", or step-based orchestration.","https:\u002F\u002Fgithub.com\u002FCognitionAI\u002Fdevin-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Fvercel\u002Fskills\u002Fworkflow\u002Fupstream\u002FSKILL.md",[],[],{"skillNo":82,"name":76,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":19},"01M7BYB1XSZHKHD8JZTQJ62JN0","Vercel Workflow SDK expert guidance. Use when building durable workflows, long-running tasks, API routes or agents that need pause\u002Fresume, retries, step-based execution, or crash-safe orchestration with Vercel Workflow.","https:\u002F\u002Fgithub.com\u002FCognitionAI\u002Fdevin-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Fvercel\u002Fskills\u002Fworkflow\u002FSKILL.md",[],[],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":19},"01M7BYASGMK935J33E21N5WTW0","verification","Full-story verification — infers what the user is building, then verifies the complete flow end-to-end: browser → API → data → response. Triggers on dev server start and 'why isn't this working' signals.","https:\u002F\u002Fgithub.com\u002FCognitionAI\u002Fdevin-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Fvercel\u002Fskills\u002Fverification\u002FSKILL.md",[],[],{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":19},"01M7BY9WJERKSKEH9HK6E71GW2","vercel-storage","Vercel storage expert guidance — Blob, Global Config (formerly Edge Config), and Marketplace storage (Neon Postgres, Upstash Redis). Use when choosing, configuring, or using data storage with Vercel applications.","https:\u002F\u002Fgithub.com\u002FCognitionAI\u002Fdevin-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Fvercel\u002Fskills\u002Fvercel-storage\u002FSKILL.md",[],[],{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":19},"01M7BY9N034894YV2J9DCRZHYS","vercel-services","Configure and troubleshoot Vercel Services for multiple frontends and backends in one project. Use when composing a polyglot or multi-service application on one Vercel deployment; defining the `services` key, service-targeted rewrites, or service bindings in `vercel.json`; or running all services with `vercel dev`.","https:\u002F\u002Fgithub.com\u002FCognitionAI\u002Fdevin-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Fvercel\u002Fskills\u002Fvercel-services\u002FSKILL.md",[],[]]