Community程式設計與開發github.com

apollographql/rust-best-practices

基於 Apollo GraphQL 最佳實踐手冊,指導如何撰寫符合 Rust 語言的慣用程式碼。

rust-best-practices 是什麼?

這個技能提供 Apollo GraphQL 團隊的 Rust 最佳實務指南,協助開發者撰寫符合 Rust 語言慣例的程式碼。它涵蓋了常見的 Rust 開發場景,例如:撰寫新程式碼或函式、審查或重構既有程式碼、在借用(borrowing)與克隆(cloning)或所有權(ownership)模式之間做選擇、使用 Result 型別實作錯誤處理、針對效能最佳化 Rust 程式碼,以及為 Rust 專案撰寫測試或文件。此技能基於 Apollo GraphQL 的內部手冊,確保程式碼風格與最佳實務與 Apollo 工程團隊一致。支援所有 Rust 開發環境(如 Cargo、Rust Analyzer、VS Code 等),並可作為 AI 編碼助手(如 Claude Code、Cursor、Codex)的參考指南。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/apollographql/skills/tree/main/skills/rust-best-practices

Installed? Explore more 程式設計與開發 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

rust-best-practices 是做什麼的?

基於 Apollo GraphQL 最佳實踐手冊,指導如何撰寫符合 Rust 語言的慣用程式碼。在以下情況使用此技能:(1) 撰寫新的 Rust 程式碼或函式,(2) 審查或重構現有的 Rust 程式碼,(3) 在借用(borrowing)與克隆(cloning)或所有權(ownership)模式之間做選擇,(4) 使用 Result 型別實作錯誤處理,(5) 針對效能最佳化 Rust 程式碼,(6) 為 Rust 專案撰寫測試或文件。

Individual skills in this repo

This repo contains 9 individual skills — each has its own dedicated page.

apollographql/apollo-client

Guide for building React applications with Apollo Client 4.x. Use this skill when: (1) setting up Apollo Client in a React project, (2) writing GraphQL queries or mutations with hooks, (3) configuring caching or cache policies, (4) managing local state with reactive variables, (5) troubleshooting Apollo Client errors or performance issues.

apollographql/apollo-connectors

Guide for integrating REST APIs into GraphQL supergraphs using Apollo Connectors with @source and @connect directives. Use this skill when the user: (1) mentions "connectors", "Apollo Connectors", or "REST Connector", (2) wants to integrate a REST API into GraphQL, (3) references @source or @connect directives, (4) works with files containing "# Note to AI Friends: This is an Apollo Connectors schema".

apollographql/apollo-federation

Guide for authoring Apollo Federation subgraph schemas. Use this skill when: (1) creating new subgraph schemas for a federated supergraph, (2) defining or modifying entities with @key, (3) sharing types/fields across subgraphs with @shareable, (4) working with federation directives (@external, @requires, @provides, @override, @inaccessible), (5) troubleshooting composition errors, (6) any task involving federation schema design patterns.

apollographql/apollo-mcp-server

Guide for using Apollo MCP Server to connect AI agents with GraphQL APIs. Use this skill when: (1) setting up or configuring Apollo MCP Server, (2) defining MCP tools from GraphQL operations, (3) using introspection tools (introspect, search, validate, execute), (4) troubleshooting MCP server connectivity or tool execution issues.

apollographql/apollo-router

Version-aware guide for configuring and running Apollo Router for federated GraphQL supergraphs. Generates correct YAML for both Router v1.x and v2.x. Use this skill when: (1) setting up Apollo Router to run a supergraph, (2) configuring routing, headers, or CORS, (3) implementing custom plugins (Rhai scripts or coprocessors), (4) configuring telemetry (tracing, metrics, logging), (5) troubleshooting Router performance or connectivity issues.

apollographql/apollo-server

Guide for building GraphQL servers with Apollo Server 5.x. Use this skill when: (1) setting up a new Apollo Server project, (2) writing resolvers or defining GraphQL schemas, (3) implementing authentication or authorization, (4) creating plugins or custom data sources, (5) troubleshooting Apollo Server errors or performance issues.

apollographql/graphql-operations

Guide for writing GraphQL operations (queries, mutations, fragments) following best practices. Use this skill when: (1) writing GraphQL queries or mutations, (2) organizing operations with fragments, (3) optimizing data fetching patterns, (4) setting up type generation or linting, (5) reviewing operations for efficiency.

apollographql/graphql-schema

Guide for designing GraphQL schemas following industry best practices. Use this skill when: (1) designing a new GraphQL schema or API, (2) reviewing existing schema for improvements, (3) deciding on type structures or nullability, (4) implementing pagination or error patterns, (5) ensuring security in schema design.

apollographql/rover

Guide for using Apollo Rover CLI to manage GraphQL schemas and federation. Use this skill when: (1) publishing or fetching subgraph/graph schemas, (2) composing supergraph schemas locally or via GraphOS, (3) running local supergraph development with rover dev, (4) validating schemas with check and lint commands, (5) configuring Rover authentication and environment, (6) exploring or searching a graph's schema for agent-driven discovery (rover schema describe / rover schema search).

相關技能