[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6ETJS3SAC39K08SJVN4RMN5":3,"skill-same:01M6ETJS3SAC39K08SJVN4RMN5":69},{"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":33,"linkOnly":34,"markdownContent":35,"markdownBody":36,"frontMatter":37,"refName":40,"commitSha":41,"skillDirectory":42,"forksCount":43,"repositoryHtmlUrl":44,"repositoryHomepageUrl":45,"ownerHtmlUrl":46,"ownerBlogUrl":6,"ownerDescription":47,"updatedAt":48,"install":49,"resources":62},"01M6ETJS3SAC39K08SJVN4RMN5","async-patterns-guide",null,"Guides users on modern async patterns including native async fn in traits, async closures, and avoiding async-trait when possible. Activates when users work with async code.","ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",67,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Femillindfors\u002Fasync-patterns-guide\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32],"guide","async","patterns","async patterns guide","code","grep","work","read","fn","guides","users","native","traits","with","2026-11-10 10:12:30",false,"---\nname: async-patterns-guide\ndescription: Guides users on modern async patterns including native async fn in traits, async closures, and avoiding async-trait when possible. Activates when users work with async code.\nallowed-tools: Read, Grep\nversion: 1.0.0\n---\n\n# Async Patterns Guide Skill\n\nYou are an expert at modern Rust async patterns. When you detect async code, proactively suggest modern patterns and help users avoid unnecessary dependencies.\n\n## When to Activate\n\nActivate when you notice:\n- Use of async-trait crate\n- Async functions in traits\n- Async closures with manual construction\n- Questions about async patterns or performance\n\n## Key Decision: async-trait vs Native\n\n### Use Native Async Fn (Rust 1.75+)\n\n**When**:\n- Static dispatch (generics)\n- No dyn Trait needed\n- Performance-critical code\n- MSRV >= 1.75\n\n**Pattern**:\n```rust\n\u002F\u002F ✅ Modern: No macro needed (Rust 1.75+)\ntrait UserRepository {\n    async fn find_user(&self, id: &str) -> Result\u003CUser, Error>;\n    async fn save_user(&self, user: &User) -> Result\u003C(), Error>;\n}\n\nimpl UserRepository for PostgresRepo {\n    async fn find_user(&self, id: &str) -> Result\u003CUser, Error> {\n        self.db.query(id).await  \u002F\u002F Native async, no macro!\n    }\n\n    async fn save_user(&self, user: &User) -> Result\u003C(), Error> {\n        self.db.insert(user).await\n    }\n}\n\n\u002F\u002F Use with generics (static dispatch)\nasync fn process\u003CR: UserRepository>(repo: R) {\n    let user = repo.find_user(\"123\").await.unwrap();\n}\n```\n\n### Use async-trait Crate\n\n**When**:\n- Dynamic dispatch (dyn Trait) required\n- Need object safety\n- MSRV \u003C 1.75\n- Plugin systems or trait objects\n\n**Pattern**:\n```rust\nuse async_trait::async_trait;\n\n#[async_trait]\ntrait Plugin: Send + Sync {\n    async fn execute(&self) -> Result\u003C(), Error>;\n}\n\n\u002F\u002F Dynamic dispatch requires async-trait\nlet plugins: Vec\u003CBox\u003Cdyn Plugin>> = vec![\n    Box::new(PluginA),\n    Box::new(PluginB),\n];\n\nfor plugin in plugins {\n    plugin.execute().await?;\n}\n```\n\n## Migration Examples\n\n### Migrating from async-trait\n\n**Before**:\n```rust\nuse async_trait::async_trait;\n\n#[async_trait]\ntrait UserService {\n    async fn create_user(&self, email: &str) -> Result\u003CUser, Error>;\n}\n\n#[async_trait]\nimpl UserService for MyService {\n    async fn create_user(&self, email: &str) -> Result\u003CUser, Error> {\n        \u002F\u002F implementation\n    }\n}\n```\n\n**After** (if using static dispatch):\n```rust\n\u002F\u002F Remove async-trait dependency\ntrait UserService {\n    async fn create_user(&self, email: &str) -> Result\u003CUser, Error>;\n}\n\nimpl UserService for MyService {\n    async fn create_user(&self, email: &str) -> Result\u003CUser, Error> {\n        \u002F\u002F implementation - no changes needed!\n    }\n}\n```\n\n## Async Closure Patterns\n\n### Modern Async Closures (Rust 1.85+)\n\n```rust\n\u002F\u002F ✅ Native async closure\nasync fn process_all\u003CF>(items: Vec\u003CItem>, f: F) -> Result\u003C(), Error>\nwhere\n    F: AsyncFn(Item) -> Result\u003C(), Error>,\n{\n    for item in items {\n        f(item).await?;\n    }\n}\n\n\u002F\u002F Usage\nprocess_all(items, async |item| {\n    validate(&item).await?;\n    save(&item).await\n}).await?;\n```\n\n## Performance Considerations\n\n### Static vs Dynamic Dispatch\n\n**Static (Generics)**:\n```rust\n\u002F\u002F ✅ Zero-cost abstraction\nasync fn process\u003CR: Repository>(repo: R) {\n    repo.save().await;\n}\n\u002F\u002F Compiler generates specialized version for each type\n```\n\n**Dynamic (dyn Trait)**:\n```rust\n\u002F\u002F ⚠️ Runtime overhead (vtable indirection)\nasync fn process(repo: Box\u003Cdyn Repository>) {\n    repo.save().await;\n}\n\u002F\u002F Requires async-trait, adds boxing overhead\n```\n\n## Your Approach\n\nWhen you see async traits:\n1. Check if dyn Trait is actually needed\n2. Suggest removing async-trait if possible\n3. Explain performance benefits of native async fn\n4. Show migration path\n\nProactively help users use modern async patterns without unnecessary dependencies.\n","# Async Patterns Guide Skill\n\nYou are an expert at modern Rust async patterns. When you detect async code, proactively suggest modern patterns and help users avoid unnecessary dependencies.\n\n## When to Activate\n\nActivate when you notice:\n- Use of async-trait crate\n- Async functions in traits\n- Async closures with manual construction\n- Questions about async patterns or performance\n\n## Key Decision: async-trait vs Native\n\n### Use Native Async Fn (Rust 1.75+)\n\n**When**:\n- Static dispatch (generics)\n- No dyn Trait needed\n- Performance-critical code\n- MSRV >= 1.75\n\n**Pattern**:\n```rust\n\u002F\u002F ✅ Modern: No macro needed (Rust 1.75+)\ntrait UserRepository {\n    async fn find_user(&self, id: &str) -> Result\u003CUser, Error>;\n    async fn save_user(&self, user: &User) -> Result\u003C(), Error>;\n}\n\nimpl UserRepository for PostgresRepo {\n    async fn find_user(&self, id: &str) -> Result\u003CUser, Error> {\n        self.db.query(id).await  \u002F\u002F Native async, no macro!\n    }\n\n    async fn save_user(&self, user: &User) -> Result\u003C(), Error> {\n        self.db.insert(user).await\n    }\n}\n\n\u002F\u002F Use with generics (static dispatch)\nasync fn process\u003CR: UserRepository>(repo: R) {\n    let user = repo.find_user(\"123\").await.unwrap();\n}\n```\n\n### Use async-trait Crate\n\n**When**:\n- Dynamic dispatch (dyn Trait) required\n- Need object safety\n- MSRV \u003C 1.75\n- Plugin systems or trait objects\n\n**Pattern**:\n```rust\nuse async_trait::async_trait;\n\n#[async_trait]\ntrait Plugin: Send + Sync {\n    async fn execute(&self) -> Result\u003C(), Error>;\n}\n\n\u002F\u002F Dynamic dispatch requires async-trait\nlet plugins: Vec\u003CBox\u003Cdyn Plugin>> = vec![\n    Box::new(PluginA),\n    Box::new(PluginB),\n];\n\nfor plugin in plugins {\n    plugin.execute().await?;\n}\n```\n\n## Migration Examples\n\n### Migrating from async-trait\n\n**Before**:\n```rust\nuse async_trait::async_trait;\n\n#[async_trait]\ntrait UserService {\n    async fn create_user(&self, email: &str) -> Result\u003CUser, Error>;\n}\n\n#[async_trait]\nimpl UserService for MyService {\n    async fn create_user(&self, email: &str) -> Result\u003CUser, Error> {\n        \u002F\u002F implementation\n    }\n}\n```\n\n**After** (if using static dispatch):\n```rust\n\u002F\u002F Remove async-trait dependency\ntrait UserService {\n    async fn create_user(&self, email: &str) -> Result\u003CUser, Error>;\n}\n\nimpl UserService for MyService {\n    async fn create_user(&self, email: &str) -> Result\u003CUser, Error> {\n        \u002F\u002F implementation - no changes needed!\n    }\n}\n```\n\n## Async Closure Patterns\n\n### Modern Async Closures (Rust 1.85+)\n\n```rust\n\u002F\u002F ✅ Native async closure\nasync fn process_all\u003CF>(items: Vec\u003CItem>, f: F) -> Result\u003C(), Error>\nwhere\n    F: AsyncFn(Item) -> Result\u003C(), Error>,\n{\n    for item in items {\n        f(item).await?;\n    }\n}\n\n\u002F\u002F Usage\nprocess_all(items, async |item| {\n    validate(&item).await?;\n    save(&item).await\n}).await?;\n```\n\n## Performance Considerations\n\n### Static vs Dynamic Dispatch\n\n**Static (Generics)**:\n```rust\n\u002F\u002F ✅ Zero-cost abstraction\nasync fn process\u003CR: Repository>(repo: R) {\n    repo.save().await;\n}\n\u002F\u002F Compiler generates specialized version for each type\n```\n\n**Dynamic (dyn Trait)**:\n```rust\n\u002F\u002F ⚠️ Runtime overhead (vtable indirection)\nasync fn process(repo: Box\u003Cdyn Repository>) {\n    repo.save().await;\n}\n\u002F\u002F Requires async-trait, adds boxing overhead\n```\n\n## Your Approach\n\nWhen you see async traits:\n1. Check if dyn Trait is actually needed\n2. Suggest removing async-trait if possible\n3. Explain performance benefits of native async fn\n4. Show migration path\n\nProactively help users use modern async patterns without unnecessary dependencies.\n",{"name":5,"version":38,"description":7,"allowed-tools":39},"1.0.0","Read, Grep","main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002Faiskillstore\u002Fmarketplace\u002Femillindfors\u002Fasync-patterns-guide",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":8,"skillName":5,"commands":50,"prompt":60,"zipAvailable":61},[51,54,57],{"tool":52,"command":53},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill async-patterns-guide",{"tool":55,"command":56},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill async-patterns-guide",{"tool":58,"command":59},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill async-patterns-guide","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Femillindfors\u002Fasync-patterns-guide\u002FSKILL.md",true,[63],{"path":64,"resourceType":65,"resourceTypeDesc":66,"sizeBytes":67,"sourceHtmlUrl":68},"skill-report.json","REFERENCE","参考文档",15402,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Femillindfors\u002Fasync-patterns-guide\u002Fskill-report.json",[70,84,94,103,109,116],{"skillNo":71,"name":72,"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":73,"categories":74,"keywords":80,"publishedAt":33},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[75],{"categoryNo":76,"categoryName":77,"taxonomyType":78,"taxonomyTypeDesc":79},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[81,82,83],"model","model hierarchy","model hierarchy skill",{"skillNo":85,"name":86,"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":87,"categories":88,"keywords":90,"publishedAt":33},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[89],{"categoryNo":76,"categoryName":77,"taxonomyType":78,"taxonomyTypeDesc":79},[91,92,93],"MCP","zoom","zoom mcp",{"skillNo":95,"name":96,"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":97,"categories":98,"keywords":99,"publishedAt":33},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[100,101,102,92],"sdk","zoom apps sdk","apps",{"skillNo":104,"name":105,"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":106,"categories":107,"keywords":108,"publishedAt":33},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[105],{"skillNo":110,"name":111,"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":112,"categories":113,"keywords":115,"publishedAt":33},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[114],{"categoryNo":76,"categoryName":77,"taxonomyType":78,"taxonomyTypeDesc":79},[111],{"skillNo":117,"name":118,"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":119,"categories":120,"keywords":121,"publishedAt":33},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[118]]