[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M77YVTZ1H8W9C46WNW6X22EP":3,"skill-same:01M77YVTZ1H8W9C46WNW6X22EP":92},{"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":35,"ownerHtmlUrl":36,"ownerBlogUrl":37,"ownerDescription":38,"updatedAt":39,"install":40,"resources":53},"01M77YVTZ1H8W9C46WNW6X22EP","rust-best-practices",null,"Guide for writing idiomatic Rust code based on Apollo GraphQL's best practices handbook. Use this skill when: (1) writing new Rust code or functions, (2) reviewing or refactoring existing Rust code, (3) deciding between borrowing vs cloning or ownership patterns, (4) implementing error handling with Result types, (5) optimizing Rust code for performance, (6) writing tests or documentation for Rust projects.","kannandreams\u002Ftuff","kannandreams","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1656663?v=4","01M77YVN9BPBMGPKKKVZMJ7RBM","kk","01M77YVNADBCVGGS8H3YV2DPXD",11,"MIT","https:\u002F\u002Fgithub.com\u002Fkannandreams\u002Ftuff\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Frust-best-practices\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: rust-best-practices\ndescription: >\n  Guide for writing idiomatic Rust code based on Apollo GraphQL's best practices handbook. Use this skill when:\n  (1) writing new Rust code or functions,\n  (2) reviewing or refactoring existing Rust code,\n  (3) deciding between borrowing vs cloning or ownership patterns,\n  (4) implementing error handling with Result types,\n  (5) optimizing Rust code for performance,\n  (6) writing tests or documentation for Rust projects.\nlicense: MIT\ncompatibility: Rust 1.70+, Cargo\nmetadata:\n  author: apollographql\n  version: \"1.1.0\"\nallowed-tools: Bash(cargo:*) Bash(rustc:*) Bash(rustfmt:*) Bash(clippy:*) Read Write Edit Glob Grep\n---\n\n# Rust Best Practices\n\nApply these guidelines when writing or reviewing Rust code. Based on Apollo GraphQL's [Rust Best Practices Handbook](https:\u002F\u002Fgithub.com\u002Fapollographql\u002Frust-best-practices).\n\n## Best Practices Reference\n\nBefore reviewing, familiarize yourself with Apollo's Rust best practices. Read ALL relevant chapters in the same turn in parallel. Reference these files when providing feedback:\n\n- [Chapter 1 - Coding Styles and Idioms](references\u002Fchapter_01.md): Borrowing vs cloning, Copy trait, Option\u002FResult handling, iterators, comments\n- [Chapter 2 - Clippy and Linting](references\u002Fchapter_02.md): Clippy configuration, important lints, workspace lint setup\n- [Chapter 3 - Performance Mindset](references\u002Fchapter_03.md): Profiling, avoiding redundant clones, stack vs heap, zero-cost abstractions\n- [Chapter 4 - Error Handling](references\u002Fchapter_04.md): Result vs panic, thiserror vs anyhow, error hierarchies\n- [Chapter 5 - Automated Testing](references\u002Fchapter_05.md): Test naming, one assertion per test, snapshot testing\n- [Chapter 6 - Generics and Dispatch](references\u002Fchapter_06.md): Static vs dynamic dispatch, trait objects\n- [Chapter 7 - Type State Pattern](references\u002Fchapter_07.md): Compile-time state safety, when to use it\n- [Chapter 8 - Comments vs Documentation](references\u002Fchapter_08.md): When to comment, doc comments, rustdoc\n- [Chapter 9 - Understanding Pointers](references\u002Fchapter_09.md): Thread safety, Send\u002FSync, pointer types\n\n## Quick Reference\n\n### Borrowing & Ownership\n- Prefer `&T` over `.clone()` unless ownership transfer is required\n- Use `&str` over `String`, `&[T]` over `Vec\u003CT>` in function parameters\n- Small `Copy` types (≤24 bytes) can be passed by value\n- Use `Cow\u003C'_, T>` when ownership is ambiguous\n\n### Error Handling\n- Return `Result\u003CT, E>` for fallible operations; avoid `panic!` in production\n- Never use `unwrap()`\u002F`expect()` outside tests\n- Use `thiserror` for library errors, `anyhow` for binaries only\n- Prefer `?` operator over match chains for error propagation\n\n### Performance\n- Always benchmark with `--release` flag\n- Run `cargo clippy -- -D clippy::perf` for performance hints\n- Avoid cloning in loops; use `.iter()` instead of `.into_iter()` for Copy types\n- Prefer iterators over manual loops; avoid intermediate `.collect()` calls\n\n### Linting\nRun regularly: `cargo clippy --all-targets --all-features --locked -- -D warnings`\n\nKey lints to watch:\n- `redundant_clone` - unnecessary cloning\n- `large_enum_variant` - oversized variants (consider boxing)\n- `needless_collect` - premature collection\n\nUse `#[expect(clippy::lint)]` over `#[allow(...)]` with justification comment.\n\n### Testing\n- Name tests descriptively: `process_should_return_error_when_input_empty()`\n- One assertion per test when possible\n- Use doc tests (`\u002F\u002F\u002F`) for public API examples\n- Consider `cargo insta` for snapshot testing generated output\n\n### Generics & Dispatch\n- Prefer generics (static dispatch) for performance-critical code\n- Use `dyn Trait` only when heterogeneous collections are needed\n- Box at API boundaries, not internally\n\n### Type State Pattern\nEncode valid states in the type system to catch invalid operations at compile time:\n```rust\nstruct Connection\u003CState> { \u002F* ... *\u002F _state: PhantomData\u003CState> }\nstruct Disconnected;\nstruct Connected;\n\nimpl Connection\u003CConnected> {\n    fn send(&self, data: &[u8]) { \u002F* only connected can send *\u002F }\n}\n```\n\n### Documentation\n- `\u002F\u002F` comments explain *why* (safety, workarounds, design rationale)\n- `\u002F\u002F\u002F` doc comments explain *what* and *how* for public APIs\n- Every `TODO` needs a linked issue: `\u002F\u002F TODO(#42): ...`\n- Enable `#![deny(missing_docs)]` for libraries\n","# Rust Best Practices\n\nApply these guidelines when writing or reviewing Rust code. Based on Apollo GraphQL's [Rust Best Practices Handbook](https:\u002F\u002Fgithub.com\u002Fapollographql\u002Frust-best-practices).\n\n## Best Practices Reference\n\nBefore reviewing, familiarize yourself with Apollo's Rust best practices. Read ALL relevant chapters in the same turn in parallel. Reference these files when providing feedback:\n\n- [Chapter 1 - Coding Styles and Idioms](references\u002Fchapter_01.md): Borrowing vs cloning, Copy trait, Option\u002FResult handling, iterators, comments\n- [Chapter 2 - Clippy and Linting](references\u002Fchapter_02.md): Clippy configuration, important lints, workspace lint setup\n- [Chapter 3 - Performance Mindset](references\u002Fchapter_03.md): Profiling, avoiding redundant clones, stack vs heap, zero-cost abstractions\n- [Chapter 4 - Error Handling](references\u002Fchapter_04.md): Result vs panic, thiserror vs anyhow, error hierarchies\n- [Chapter 5 - Automated Testing](references\u002Fchapter_05.md): Test naming, one assertion per test, snapshot testing\n- [Chapter 6 - Generics and Dispatch](references\u002Fchapter_06.md): Static vs dynamic dispatch, trait objects\n- [Chapter 7 - Type State Pattern](references\u002Fchapter_07.md): Compile-time state safety, when to use it\n- [Chapter 8 - Comments vs Documentation](references\u002Fchapter_08.md): When to comment, doc comments, rustdoc\n- [Chapter 9 - Understanding Pointers](references\u002Fchapter_09.md): Thread safety, Send\u002FSync, pointer types\n\n## Quick Reference\n\n### Borrowing & Ownership\n- Prefer `&T` over `.clone()` unless ownership transfer is required\n- Use `&str` over `String`, `&[T]` over `Vec\u003CT>` in function parameters\n- Small `Copy` types (≤24 bytes) can be passed by value\n- Use `Cow\u003C'_, T>` when ownership is ambiguous\n\n### Error Handling\n- Return `Result\u003CT, E>` for fallible operations; avoid `panic!` in production\n- Never use `unwrap()`\u002F`expect()` outside tests\n- Use `thiserror` for library errors, `anyhow` for binaries only\n- Prefer `?` operator over match chains for error propagation\n\n### Performance\n- Always benchmark with `--release` flag\n- Run `cargo clippy -- -D clippy::perf` for performance hints\n- Avoid cloning in loops; use `.iter()` instead of `.into_iter()` for Copy types\n- Prefer iterators over manual loops; avoid intermediate `.collect()` calls\n\n### Linting\nRun regularly: `cargo clippy --all-targets --all-features --locked -- -D warnings`\n\nKey lints to watch:\n- `redundant_clone` - unnecessary cloning\n- `large_enum_variant` - oversized variants (consider boxing)\n- `needless_collect` - premature collection\n\nUse `#[expect(clippy::lint)]` over `#[allow(...)]` with justification comment.\n\n### Testing\n- Name tests descriptively: `process_should_return_error_when_input_empty()`\n- One assertion per test when possible\n- Use doc tests (`\u002F\u002F\u002F`) for public API examples\n- Consider `cargo insta` for snapshot testing generated output\n\n### Generics & Dispatch\n- Prefer generics (static dispatch) for performance-critical code\n- Use `dyn Trait` only when heterogeneous collections are needed\n- Box at API boundaries, not internally\n\n### Type State Pattern\nEncode valid states in the type system to catch invalid operations at compile time:\n```rust\nstruct Connection\u003CState> { \u002F* ... *\u002F _state: PhantomData\u003CState> }\nstruct Disconnected;\nstruct Connected;\n\nimpl Connection\u003CConnected> {\n    fn send(&self, data: &[u8]) { \u002F* only connected can send *\u002F }\n}\n```\n\n### Documentation\n- `\u002F\u002F` comments explain *why* (safety, workarounds, design rationale)\n- `\u002F\u002F\u002F` doc comments explain *what* and *how* for public APIs\n- Every `TODO` needs a linked issue: `\u002F\u002F TODO(#42): ...`\n- Enable `#![deny(missing_docs)]` for libraries\n",{"name":5,"license":15,"metadata":24,"description":27,"allowed-tools":28,"compatibility":29},{"author":25,"version":26},"apollographql","1.1.0","Guide for writing idiomatic Rust code based on Apollo GraphQL's best practices handbook. Use this skill when: (1) writing new Rust code or functions, (2) reviewing or refactoring existing Rust code, (3) deciding between borrowing vs cloning or ownership patterns, (4) implementing error handling with Result types, (5) optimizing Rust code for performance, (6) writing tests or documentation for Rust projects.\n","Bash(cargo:*) Bash(rustc:*) Bash(rustfmt:*) Bash(clippy:*) Read Write Edit Glob Grep","Rust 1.70+, Cargo","main","c9af145b0d398e5561a1ba349e81900174fd827d",".agents\u002Fskills\u002Frust-best-practices",3,"https:\u002F\u002Fgithub.com\u002Fkannandreams\u002Ftuff","https:\u002F\u002Ftuffcli.dev","https:\u002F\u002Fgithub.com\u002Fkannandreams","https:\u002F\u002Fkannandreams.github.io\u002F","engineering * [\"data\", \"ai\", \"life\"];","2026-11-14 05:24:05",{"source":8,"skillName":5,"commands":41,"prompt":51,"zipAvailable":52},[42,45,48],{"tool":43,"command":44},"npx","npx skills add kannandreams\u002Ftuff --skill rust-best-practices",{"tool":46,"command":47},"bunx","bunx skills add kannandreams\u002Ftuff --skill rust-best-practices",{"tool":49,"command":50},"pnpm","pnpm dlx skills add kannandreams\u002Ftuff --skill rust-best-practices","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fkannandreams\u002Ftuff\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Frust-best-practices\u002FSKILL.md",true,[54,60,64,68,72,76,80,84,88],{"path":55,"resourceType":56,"resourceTypeDesc":57,"sizeBytes":58,"sourceHtmlUrl":59},"references\u002Fchapter_01.md","REFERENCE","参考文档",17339,"https:\u002F\u002Fgithub.com\u002Fkannandreams\u002Ftuff\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Frust-best-practices\u002Freferences\u002Fchapter_01.md",{"path":61,"resourceType":56,"resourceTypeDesc":57,"sizeBytes":62,"sourceHtmlUrl":63},"references\u002Fchapter_02.md",5453,"https:\u002F\u002Fgithub.com\u002Fkannandreams\u002Ftuff\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Frust-best-practices\u002Freferences\u002Fchapter_02.md",{"path":65,"resourceType":56,"resourceTypeDesc":57,"sizeBytes":66,"sourceHtmlUrl":67},"references\u002Fchapter_03.md",8785,"https:\u002F\u002Fgithub.com\u002Fkannandreams\u002Ftuff\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Frust-best-practices\u002Freferences\u002Fchapter_03.md",{"path":69,"resourceType":56,"resourceTypeDesc":57,"sizeBytes":70,"sourceHtmlUrl":71},"references\u002Fchapter_04.md",7082,"https:\u002F\u002Fgithub.com\u002Fkannandreams\u002Ftuff\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Frust-best-practices\u002Freferences\u002Fchapter_04.md",{"path":73,"resourceType":56,"resourceTypeDesc":57,"sizeBytes":74,"sourceHtmlUrl":75},"references\u002Fchapter_05.md",14122,"https:\u002F\u002Fgithub.com\u002Fkannandreams\u002Ftuff\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Frust-best-practices\u002Freferences\u002Fchapter_05.md",{"path":77,"resourceType":56,"resourceTypeDesc":57,"sizeBytes":78,"sourceHtmlUrl":79},"references\u002Fchapter_06.md",6813,"https:\u002F\u002Fgithub.com\u002Fkannandreams\u002Ftuff\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Frust-best-practices\u002Freferences\u002Fchapter_06.md",{"path":81,"resourceType":56,"resourceTypeDesc":57,"sizeBytes":82,"sourceHtmlUrl":83},"references\u002Fchapter_07.md",8236,"https:\u002F\u002Fgithub.com\u002Fkannandreams\u002Ftuff\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Frust-best-practices\u002Freferences\u002Fchapter_07.md",{"path":85,"resourceType":56,"resourceTypeDesc":57,"sizeBytes":86,"sourceHtmlUrl":87},"references\u002Fchapter_08.md",10132,"https:\u002F\u002Fgithub.com\u002Fkannandreams\u002Ftuff\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Frust-best-practices\u002Freferences\u002Fchapter_08.md",{"path":89,"resourceType":56,"resourceTypeDesc":57,"sizeBytes":90,"sourceHtmlUrl":91},"references\u002Fchapter_09.md",9570,"https:\u002F\u002Fgithub.com\u002Fkannandreams\u002Ftuff\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Frust-best-practices\u002Freferences\u002Fchapter_09.md",[93,100,107,113,120,125],{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":19},"01M77YWS88BRCV0T4K4TVY7V44","tuff-cli-guide","Reference for using Tuff CLI to manage agent capabilities — create, add (including MCP servers), list, diff, check, update, and scope operations.","https:\u002F\u002Fgithub.com\u002Fkannandreams\u002Ftuff\u002Fblob\u002Fmain\u002Fplugins\u002Ftuff\u002Fskills\u002Ftuff-cli-guide\u002FSKILL.md",[],[],{"skillNo":101,"name":102,"nameZh":6,"description":103,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":104,"categories":105,"keywords":106,"publishedAt":19},"01M77YWNT6WQN8WTC3B6YFW93S","python-uv-default","Use uv for Python dependency and environment management.","https:\u002F\u002Fgithub.com\u002Fkannandreams\u002Ftuff\u002Fblob\u002Fmain\u002Fexamples\u002Fskills\u002Fpython-uv-default\u002FSKILL.md",[],[],{"skillNo":108,"name":109,"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":110,"categories":111,"keywords":112,"publishedAt":19},"01M77YWK9JE24E9833QBZWRY6B","duplicate-files","https:\u002F\u002Fgithub.com\u002Fkannandreams\u002Ftuff\u002Fblob\u002Fmain\u002Fcrates\u002Ftuff-cli\u002Ftests\u002Ffixtures\u002Fduplicate-files\u002FSKILL.md",[],[],{"skillNo":114,"name":115,"nameZh":6,"description":116,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":117,"categories":118,"keywords":119,"publishedAt":19},"01M77YWGWEYVJ9J9M66EZGB3G3","security-review","Review code, configuration, and infrastructure for security vulnerabilities, secrets exposure, and attack surfaces.","https:\u002F\u002Fgithub.com\u002Fkannandreams\u002Ftuff\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fsecurity\u002Fsecurity-review\u002FSKILL.md",[],[],{"skillNo":121,"name":115,"nameZh":6,"description":116,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":122,"categories":123,"keywords":124,"publishedAt":19},"01M77YWD61T2RR0RWGZZ7VK3CX","https:\u002F\u002Fgithub.com\u002Fkannandreams\u002Ftuff\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fsecurity-review\u002FSKILL.md",[],[],{"skillNo":126,"name":127,"nameZh":6,"description":128,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":129,"categories":130,"keywords":131,"publishedAt":19},"01M77YW8JACA9WVKP4WSYHET43","find-skills","Helps users discover and install agent skills when they ask questions like \"how do I do X\", \"find a skill for X\", \"is there a skill that can...\", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.","https:\u002F\u002Fgithub.com\u002Fkannandreams\u002Ftuff\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Ffind-skills\u002FSKILL.md",[],[]]