[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6MCQ0NK55REQST02NKNGVPG":3,"skill-same:01M6MCQ0NK55REQST02NKNGVPG":86},{"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":41,"linkOnly":42,"markdownContent":43,"markdownBody":44,"frontMatter":45,"refName":52,"commitSha":53,"skillDirectory":54,"forksCount":55,"repositoryHtmlUrl":56,"repositoryHomepageUrl":57,"ownerHtmlUrl":58,"ownerBlogUrl":59,"ownerDescription":60,"updatedAt":61,"install":62,"resources":75},"01M6MCQ0NK55REQST02NKNGVPG","rust-trait-api-design",null,"Design and review Rust trait APIs, generic bounds, dispatch models, and conversion contracts for clear public interfaces. Use when designing, refactoring, or reviewing traits, generics, trait objects, associated types, impl Trait, From\u002FTryFrom, AsRef, Borrow, or crate APIs.","hashgraph-online\u002Fawesome-codex-plugins","hashgraph-online","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F160371962?v=4","01M6CNB6NRJVNNGN14TR01Q6D3","HOL (Hashgraph Online)","01M6JT1HSKKG9V68KQAQGBA7XP",1575,"MIT","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002FLVTD-LLC\u002Fskills\u002Fskills\u002Frust-trait-api-design\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40],"rust","api design","rust trait api design","api","design","models","when","generic","for","api-design","traits","types","clear","impl","objects","conversion","dispatch","use","refactoring","code","codex","review","2026-11-10 10:12:30",false,"---\nname: rust-trait-api-design\ndescription: Design and review Rust trait APIs, generic bounds, dispatch models, and conversion contracts for clear public interfaces. Use when designing, refactoring, or reviewing traits, generics, trait objects, associated types, impl Trait, From\u002FTryFrom, AsRef, Borrow, or crate APIs.\nlicense: MIT\ncompatibility: Codex, Claude Code, and other Agent Skills-compatible clients.\nmetadata:\n  version: \"0.1.0\"\n  displayName: Rust Trait API Design\n  category: Rust\n  tags: rust,traits,generics,api-design,trait-objects\n---\n\n# Rust Trait API Design\n\nUse this skill to make Rust APIs generic where useful, concrete where simpler,\nand object-safe when dynamic dispatch is part of the design. Optimize for the\nsmallest capability contract that callers and implementors can understand.\n\n## Core Workflow\n\n1. Identify whether the API consumes, borrows, returns, stores, or dispatches\n   behavior.\n2. Start with concrete types for local code. Generalize only when at least two\n   callers or implementations need the flexibility.\n3. Use generic bounds for compile-time polymorphism and inlining. Use `dyn\n   Trait` for heterogeneous values, plugin-like extension points, or runtime\n   dispatch.\n4. Place bounds at the point that needs them. Prefer `where` clauses when\n   bounds are long or involve associated types.\n5. Decide whether a trait is intended for downstream implementation. Seal it,\n   keep fields private, or use constructors when invariants must not be\n   implemented externally.\n6. Use standard conversion traits where they match exactly. Do not invent a\n   custom conversion trait before checking `From`, `TryFrom`, `AsRef`, `AsMut`,\n   `Borrow`, `ToOwned`, and `Cow`.\n7. Add compile tests, unit tests, or examples that prove the public API is\n   callable the way the skill expects future users to call it.\n\n## API Design Rules\n\n- Accept `impl Trait` or a named generic for parameters when callers should\n  pass many concrete types.\n- Return `impl Trait` when hiding one concrete return type. Return `Box\u003Cdyn\n  Trait>` when the concrete type varies at runtime.\n- Prefer associated types when each implementation has one natural related\n  type. Prefer generic trait parameters when one implementation supports many\n  target types.\n- Implement `From` for infallible conversions and `TryFrom` for fallible\n  conversions. Implementing these gives callers `Into` and `TryInto`.\n- Use `AsRef` for cheap reference-to-reference conversion. Use `Borrow` only\n  when borrowed and owned forms have equivalent `Eq`, `Hash`, and `Ord`\n  behavior.\n- Avoid `Copy` bounds unless the algorithm semantically requires bitwise copy.\n\n## Trait Object Review\n\nRead `references\u002Ftrait-api-patterns.md` when choosing between generics and\n`dyn Trait`, or when public traits fail object-safety checks.\n\nBefore making a public trait object-safe, check:\n\n- Methods do not use generic type parameters.\n- Methods do not return `Self` unless constrained with `where Self: Sized`.\n- Associated types are specified on the trait object where needed.\n- The object is behind a pointer such as `&dyn Trait`, `Box\u003Cdyn Trait>`, or\n  `Arc\u003Cdyn Trait + Send + Sync>`.\n\n## Common Smells\n\n- A public function takes `&Vec\u003CT>` because it only needs iteration.\n- The API accepts `String` and immediately borrows it as `&str`.\n- The API implements `Into` directly instead of `From`.\n- A trait has many blanket bounds that only one method needs.\n- A trait object was used because lifetimes were confusing, not because runtime\n  dispatch is required.\n- `async-trait` is used in a public trait without checking whether native\n  `async fn` in traits, `trait-variant`, or boxed futures fit the dispatch and\n  `Send` needs better.\n","# Rust Trait API Design\n\nUse this skill to make Rust APIs generic where useful, concrete where simpler,\nand object-safe when dynamic dispatch is part of the design. Optimize for the\nsmallest capability contract that callers and implementors can understand.\n\n## Core Workflow\n\n1. Identify whether the API consumes, borrows, returns, stores, or dispatches\n   behavior.\n2. Start with concrete types for local code. Generalize only when at least two\n   callers or implementations need the flexibility.\n3. Use generic bounds for compile-time polymorphism and inlining. Use `dyn\n   Trait` for heterogeneous values, plugin-like extension points, or runtime\n   dispatch.\n4. Place bounds at the point that needs them. Prefer `where` clauses when\n   bounds are long or involve associated types.\n5. Decide whether a trait is intended for downstream implementation. Seal it,\n   keep fields private, or use constructors when invariants must not be\n   implemented externally.\n6. Use standard conversion traits where they match exactly. Do not invent a\n   custom conversion trait before checking `From`, `TryFrom`, `AsRef`, `AsMut`,\n   `Borrow`, `ToOwned`, and `Cow`.\n7. Add compile tests, unit tests, or examples that prove the public API is\n   callable the way the skill expects future users to call it.\n\n## API Design Rules\n\n- Accept `impl Trait` or a named generic for parameters when callers should\n  pass many concrete types.\n- Return `impl Trait` when hiding one concrete return type. Return `Box\u003Cdyn\n  Trait>` when the concrete type varies at runtime.\n- Prefer associated types when each implementation has one natural related\n  type. Prefer generic trait parameters when one implementation supports many\n  target types.\n- Implement `From` for infallible conversions and `TryFrom` for fallible\n  conversions. Implementing these gives callers `Into` and `TryInto`.\n- Use `AsRef` for cheap reference-to-reference conversion. Use `Borrow` only\n  when borrowed and owned forms have equivalent `Eq`, `Hash`, and `Ord`\n  behavior.\n- Avoid `Copy` bounds unless the algorithm semantically requires bitwise copy.\n\n## Trait Object Review\n\nRead `references\u002Ftrait-api-patterns.md` when choosing between generics and\n`dyn Trait`, or when public traits fail object-safety checks.\n\nBefore making a public trait object-safe, check:\n\n- Methods do not use generic type parameters.\n- Methods do not return `Self` unless constrained with `where Self: Sized`.\n- Associated types are specified on the trait object where needed.\n- The object is behind a pointer such as `&dyn Trait`, `Box\u003Cdyn Trait>`, or\n  `Arc\u003Cdyn Trait + Send + Sync>`.\n\n## Common Smells\n\n- A public function takes `&Vec\u003CT>` because it only needs iteration.\n- The API accepts `String` and immediately borrows it as `&str`.\n- The API implements `Into` directly instead of `From`.\n- A trait has many blanket bounds that only one method needs.\n- A trait object was used because lifetimes were confusing, not because runtime\n  dispatch is required.\n- `async-trait` is used in a public trait without checking whether native\n  `async fn` in traits, `trait-variant`, or boxed futures fit the dispatch and\n  `Send` needs better.\n",{"name":5,"license":15,"metadata":46,"description":7,"compatibility":51},{"tags":47,"version":48,"category":49,"displayName":50},"rust,traits,generics,api-design,trait-objects","0.1.0","Rust","Rust Trait API Design","Codex, Claude Code, and other Agent Skills-compatible clients.","main","2b63f856ce19c2a797929cacabd9e0fc936812fa","plugins\u002FLVTD-LLC\u002Fskills\u002Fskills\u002Frust-trait-api-design",491,"https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins","https:\u002F\u002Fhol.org\u002Fplugins\u002Fbest-codex-plugins","https:\u002F\u002Fgithub.com\u002Fhashgraph-online","https:\u002F\u002Fhol.org","Open-source standards and developer tools for interoperable AI agents: discovery, identity, communication, payments, privacy and security.","2026-11-14 14:06:13",{"source":8,"skillName":5,"commands":63,"prompt":73,"zipAvailable":74},[64,67,70],{"tool":65,"command":66},"npx","npx skills add hashgraph-online\u002Fawesome-codex-plugins --skill rust-trait-api-design",{"tool":68,"command":69},"bunx","bunx skills add hashgraph-online\u002Fawesome-codex-plugins --skill rust-trait-api-design",{"tool":71,"command":72},"pnpm","pnpm dlx skills add hashgraph-online\u002Fawesome-codex-plugins --skill rust-trait-api-design","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002FLVTD-LLC\u002Fskills\u002Fskills\u002Frust-trait-api-design\u002FSKILL.md",true,[76,82],{"path":77,"resourceType":78,"resourceTypeDesc":79,"sizeBytes":80,"sourceHtmlUrl":81},"agents\u002Fopenai.yaml","REFERENCE","参考文档",244,"https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002FLVTD-LLC\u002Fskills\u002Fskills\u002Frust-trait-api-design\u002Fagents\u002Fopenai.yaml",{"path":83,"resourceType":78,"resourceTypeDesc":79,"sizeBytes":84,"sourceHtmlUrl":85},"references\u002Ftrait-api-patterns.md",2014,"https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002FLVTD-LLC\u002Fskills\u002Fskills\u002Frust-trait-api-design\u002Freferences\u002Ftrait-api-patterns.md",[87,96,104,112,120,128],{"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":91,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":95},"01M7DV332YQMGD8WTRJ9DZQXTB","worktable-review-with-annotations","Create, inspect, reply to, update, or resolve situated Worktable annotations. Use when feedback belongs to a Doc section, block, text range, or HTML Doc, or when the user asks to address existing review feedback and coordinate a requested artifact edit.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-review-with-annotations\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-review-with-annotations\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":100,"sourceHtmlUrl":101,"categories":102,"keywords":103,"publishedAt":95},"01M7DV2YGHCZVBEB1AHYB6CGHE","worktable-find-and-synthesize-context","Find, assess, and synthesize context from Worktable Docs and Records. Use when the user asks what a workspace contains, wants workspace-backed research, needs current facts reconciled across artifacts, or requests a cited synthesis without changing workspace state.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-find-and-synthesize-context\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-find-and-synthesize-context\u002FSKILL.md",[],[],{"skillNo":105,"name":106,"nameZh":6,"description":107,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":108,"sourceHtmlUrl":109,"categories":110,"keywords":111,"publishedAt":95},"01M7DV2TQN1H11ME2SAF9MXN7V","worktable-create-or-update-docs","Create, edit, rename, or maintain narrative Worktable Docs. Use for plans, decisions, briefs, notes, research syntheses, and other durable prose when the user requests a new artifact or a safe update to an existing one.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-update-docs\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-update-docs\u002FSKILL.md",[],[],{"skillNo":113,"name":114,"nameZh":6,"description":115,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":116,"sourceHtmlUrl":117,"categories":118,"keywords":119,"publishedAt":95},"01M7DV2NE452NEA8TXATKSNAJH","worktable-create-or-manage-records","Organize repeated structured information as durable Worktable Records. Use for research datasets, inventories, directories, pipelines, trackers, and other collections whose items need identity, fields, filtering, links, validation, or individual updates.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-manage-records\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-manage-records\u002FSKILL.md",[],[],{"skillNo":121,"name":122,"nameZh":6,"description":123,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":124,"sourceHtmlUrl":125,"categories":126,"keywords":127,"publishedAt":95},"01M7DV2HENRBR2KSCVM064WH0Y","worktable-create-or-manage-interactive-html","Create or improve durable visual and interactive artifacts in Worktable. Use for dashboards, trackers, calculators, mini apps, slide presentations, and other requests that benefit from a polished HTML Doc.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-manage-interactive-html\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-manage-interactive-html\u002FSKILL.md",[],[],{"skillNo":129,"name":130,"nameZh":6,"description":131,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":132,"sourceHtmlUrl":133,"categories":134,"keywords":135,"publishedAt":95},"01M7DV2CADR5R7RQFFYPNAGR9Y","worktable-collaborate-threads","Read, answer, and hand off messages through durable Worktable threads with users or other authenticated participants. Use when the user asks to check addressed messages, reply to a participant, continue a thread, request another agent's help, wait briefly for a response, or watch for comments and messages sent to the agent.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-collaborate-threads\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-collaborate-threads\u002FSKILL.md",[],[]]