[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6CCYWP5MMAB2P30HCX04GYC":3,"skill-same:01M6CCYWP5MMAB2P30HCX04GYC":74},{"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":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":47,"commitSha":48,"skillDirectory":49,"forksCount":50,"repositoryHtmlUrl":51,"repositoryHomepageUrl":6,"ownerHtmlUrl":52,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":53,"install":54,"resources":67},"01M6CCYWP5MMAB2P30HCX04GYC","async-python-patterns",null,"Master Python asyncio, concurrent programming, and async\u002Fawait patterns for high-performance applications. Use when building async APIs, concurrent systems, or I\u002FO-bound applications requiring non-blocking operations.","cercova-studios\u002F10x-swe","cercova-studios","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F217108198?v=4","01M6CCYGHXTH80N3BXRW6KESTE","Cercova Studios","01M6CCYGPADH5MJDR0VNNR775C",1,"MIT","https:\u002F\u002Fgithub.com\u002Fcercova-studios\u002F10x-swe\u002Fblob\u002Fmain\u002Fplugins\u002F10x-swe\u002Fskills\u002Fasync-python-patterns\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"python","async python patterns","python patterns","async","patterns","when","SWE","await","for","high","high-performance","systems","master","use","operations","programming","10x","applications","plugin","performance","2026-11-10 10:12:30",false,"---\nname: async-python-patterns\ndescription: Master Python asyncio, concurrent programming, and async\u002Fawait patterns\n  for high-performance applications. Use when building async APIs, concurrent systems,\n  or I\u002FO-bound applications requiring non-blocking operations.\nmetadata:\n  skill-graph-id: plugin\u002F10x-swe\u002Fasync-python-patterns\n  skill-graph-uses: ''\n  skill-graph-used-by: ''\n---\n\n# Async Python Patterns\n\nUse asyncio for concurrent I\u002FO when a synchronous implementation cannot meet the requirement. Inspect the supported Python version and existing async framework before selecting APIs.\n\n## Workflow\n\n1. Identify the workload: concurrent network or database I\u002FO, blocking library calls, or CPU work. Keep simple scripts synchronous. Threads can offload blocking I\u002FO; pure Python CPU parallelism generally requires processes unless the workload releases the GIL.\n2. Mark sync\u002Fasync boundaries explicitly. Await coroutines and use async-native clients. Offload necessary blocking calls; never call `asyncio.run()` inside an already running event loop.\n3. Define task ownership, maximum concurrency, queue capacity, deadlines, and shutdown behavior. A semaphore limits concurrent operations; it does not enforce requests per second.\n4. Reuse connection pools and close responses, sessions, and database resources. Use async context managers and failure-safe cleanup.\n5. Choose the failure policy before launching tasks: fail the group, collect individual failures, or retry bounded transient errors. Inspect every collected exception; do not silently discard failed items.\n6. On cancellation, clean up and propagate `CancelledError`. Cancel and await owned tasks during shutdown. Ensure each queue item receives `task_done()`, including sentinels, and provide a shutdown path for every consumer.\n7. Test successful completion, timeout, cancellation, partial failure, resource cleanup, and concurrency limits. Measure latency and resource usage under representative load.\n\n## Reference routing\n\nUse [detailed patterns](references\u002Fpatterns.md) only for the needed topic:\n\n- Fundamental Patterns: coroutines, `gather`, task creation, errors, and timeouts.\n- Advanced Patterns: context managers, iterators, queues, semaphores, and locks.\n- Real-World Applications: HTTP, database, and WebSocket sketches.\n- Performance Best Practices: pooling, batches, and blocking-call boundaries.\n- Common Pitfalls and Testing Async Code: cancellation and pytest examples.\n\nThese preserved examples contain simplifications. The producer-consumer sketch has fewer sentinels than consumers and does not await cancelled tasks; the HTTP pooling sketch leaves responses unconsumed; database query strings are illustrative and must use driver parameters in real code. An asyncio lock synchronizes tasks on one loop, not arbitrary threads. Adapt rather than copy.\n\n## Verify\n\nUse the installed framework's supported task and fixture APIs. Prefer [Python's asyncio documentation](https:\u002F\u002Fdocs.python.org\u002F3\u002Flibrary\u002Fasyncio.html) for exact semantics. Report unresolved failures and untested shutdown behavior; completed tasks alone do not prove safe cleanup.\n","# Async Python Patterns\n\nUse asyncio for concurrent I\u002FO when a synchronous implementation cannot meet the requirement. Inspect the supported Python version and existing async framework before selecting APIs.\n\n## Workflow\n\n1. Identify the workload: concurrent network or database I\u002FO, blocking library calls, or CPU work. Keep simple scripts synchronous. Threads can offload blocking I\u002FO; pure Python CPU parallelism generally requires processes unless the workload releases the GIL.\n2. Mark sync\u002Fasync boundaries explicitly. Await coroutines and use async-native clients. Offload necessary blocking calls; never call `asyncio.run()` inside an already running event loop.\n3. Define task ownership, maximum concurrency, queue capacity, deadlines, and shutdown behavior. A semaphore limits concurrent operations; it does not enforce requests per second.\n4. Reuse connection pools and close responses, sessions, and database resources. Use async context managers and failure-safe cleanup.\n5. Choose the failure policy before launching tasks: fail the group, collect individual failures, or retry bounded transient errors. Inspect every collected exception; do not silently discard failed items.\n6. On cancellation, clean up and propagate `CancelledError`. Cancel and await owned tasks during shutdown. Ensure each queue item receives `task_done()`, including sentinels, and provide a shutdown path for every consumer.\n7. Test successful completion, timeout, cancellation, partial failure, resource cleanup, and concurrency limits. Measure latency and resource usage under representative load.\n\n## Reference routing\n\nUse [detailed patterns](references\u002Fpatterns.md) only for the needed topic:\n\n- Fundamental Patterns: coroutines, `gather`, task creation, errors, and timeouts.\n- Advanced Patterns: context managers, iterators, queues, semaphores, and locks.\n- Real-World Applications: HTTP, database, and WebSocket sketches.\n- Performance Best Practices: pooling, batches, and blocking-call boundaries.\n- Common Pitfalls and Testing Async Code: cancellation and pytest examples.\n\nThese preserved examples contain simplifications. The producer-consumer sketch has fewer sentinels than consumers and does not await cancelled tasks; the HTTP pooling sketch leaves responses unconsumed; database query strings are illustrative and must use driver parameters in real code. An asyncio lock synchronizes tasks on one loop, not arbitrary threads. Adapt rather than copy.\n\n## Verify\n\nUse the installed framework's supported task and fixture APIs. Prefer [Python's asyncio documentation](https:\u002F\u002Fdocs.python.org\u002F3\u002Flibrary\u002Fasyncio.html) for exact semantics. Report unresolved failures and untested shutdown behavior; completed tasks alone do not prove safe cleanup.\n",{"name":5,"metadata":44,"description":7},{"skill-graph-id":45,"skill-graph-uses":46,"skill-graph-used-by":46},"plugin\u002F10x-swe\u002Fasync-python-patterns","","main","12441d84a8a292fcc94f47bc98877cbefd9b52e2","plugins\u002F10x-swe\u002Fskills\u002Fasync-python-patterns",0,"https:\u002F\u002Fgithub.com\u002Fcercova-studios\u002F10x-swe","https:\u002F\u002Fgithub.com\u002Fcercova-studios","2026-11-12 07:39:44",{"source":8,"skillName":5,"commands":55,"prompt":65,"zipAvailable":66},[56,59,62],{"tool":57,"command":58},"npx","npx skills add cercova-studios\u002F10x-swe --skill async-python-patterns",{"tool":60,"command":61},"bunx","bunx skills add cercova-studios\u002F10x-swe --skill async-python-patterns",{"tool":63,"command":64},"pnpm","pnpm dlx skills add cercova-studios\u002F10x-swe --skill async-python-patterns","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fcercova-studios\u002F10x-swe\u002Fblob\u002Fmain\u002Fplugins\u002F10x-swe\u002Fskills\u002Fasync-python-patterns\u002FSKILL.md",true,[68],{"path":69,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":72,"sourceHtmlUrl":73},"references\u002Fpatterns.md","REFERENCE","参考文档",20715,"https:\u002F\u002Fgithub.com\u002Fcercova-studios\u002F10x-swe\u002Fblob\u002Fmain\u002Fplugins\u002F10x-swe\u002Fskills\u002Fasync-python-patterns\u002Freferences\u002Fpatterns.md",[75,113,148,168,186,198],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":79,"licenseFileUrl":80,"sourceHtmlUrl":81,"categories":82,"keywords":88,"publishedAt":39},"01M6CD3T6EQ9N5KPNXCM6ABHVA","turnstile-spin","Set up Cloudflare Turnstile end-to-end in a project. Scan the codebase, create the widget via the Cloudflare API, embed it where user requests need bot verification (form submissions, SPA actions, API endpoints, download links, comment or vote submissions, etc.), wire canonical server-side siteverify in the customer's existing backend, validate, and persist the skill. Load this when a user asks to add Turnstile, set up CAPTCHA, protect a form or endpoint from bots, or fix a Turnstile integration. Uses Cloudflare's documented Turnstile contract.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fcercova-studios\u002F10x-swe\u002Fblob\u002Fmain\u002Fplugins\u002F10x-swe\u002Fskills\u002Fturnstile-spin\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fcercova-studios\u002F10x-swe\u002Fblob\u002Fmain\u002Fplugins\u002F10x-swe\u002Fskills\u002Fturnstile-spin\u002FSKILL.md",[83],{"categoryNo":84,"categoryName":85,"taxonomyType":86,"taxonomyTypeDesc":87},"01JBSEEDCAT000000000000010","后端与接口","SCENARIO","使用场景",[89,90,91,92,93,94,95,96,97,98,99,100,101,102,37,103,104,105,106,107,108,109,110,111,112,25,24],"turnstile spin","SET","nextjs","actions","up","fix","cloudflare","bot","api","permissions","create","astro","server","verification","endpoints","customer","backend","sveltekit","integration","app","bots","spa","project","end",{"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":79,"licenseFileUrl":117,"sourceHtmlUrl":118,"categories":119,"keywords":131,"publishedAt":39},"01M6CD0BJYRNV610HYYPX933RE","frontend-design","Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.","https:\u002F\u002Fgithub.com\u002Fcercova-studios\u002F10x-swe\u002Fblob\u002Fmain\u002Fplugins\u002F10x-swe\u002Fskills\u002Ffrontend-design\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fcercova-studios\u002F10x-swe\u002Fblob\u002Fmain\u002Fplugins\u002F10x-swe\u002Fskills\u002Ffrontend-design\u002FSKILL.md",[120,123,126],{"categoryNo":121,"categoryName":122,"taxonomyType":86,"taxonomyTypeDesc":87},"01JBSEEDCAT000000000000009","前端开发",{"categoryNo":124,"categoryName":125,"taxonomyType":86,"taxonomyTypeDesc":87},"01JBSEEDCAT000000000000015","视觉设计",{"categoryNo":127,"categoryName":128,"taxonomyType":129,"taxonomyTypeDesc":130},"01JBSEEDCAT000000000000032","设计师","PROFESSION","适用职业",[132,133,134,99,135,136,36,137,138,139,32,140,141,142,143,144,145,24,146,28,147],"frontend design","frontend","design","web","quality","creative","web components","Production","code","components","user","generic","aesthetics","pages","with","build",{"skillNo":149,"name":150,"nameZh":6,"description":151,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":152,"categories":153,"keywords":154,"publishedAt":39},"01M6CD4QX8C4DST98AY21HEYCM","source-insights","Prepare inspected source evidence, preserve exact citations, and publish reviewed insights into an explicit local library.","https:\u002F\u002Fgithub.com\u002Fcercova-studios\u002F10x-swe\u002Fblob\u002Fmain\u002Fplugins\u002Fknowledge\u002Fskills\u002Fsource-insights\u002FSKILL.md",[],[155,156,157,158,159,160,161,162,163,164,165,166,167],"source insights","insights","source","publish","Citations","evidence","library","workflows","prepare","session","global","local","preserve",{"skillNo":169,"name":170,"nameZh":6,"description":171,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":172,"categories":173,"keywords":177,"publishedAt":39},"01M6CD4N1HVNC1EXPEBZT7YS31","skill-graph","Discover skills and workflows through independent lexical search, relationship paths and a terminal graph.","https:\u002F\u002Fgithub.com\u002Fcercova-studios\u002F10x-swe\u002Fblob\u002Fmain\u002Fplugins\u002Fknowledge\u002Fskills\u002Fskill-graph\u002FSKILL.md",[174],{"categoryNo":175,"categoryName":176,"taxonomyType":86,"taxonomyTypeDesc":87},"01JBSEEDCAT000000000000023","Skill与智能体开发",[178,179,37,162,180,35,181,165,182,183,184,25,185],"graph","skill graph","terminal","search","discover skills","discover","paths","relationship",{"skillNo":187,"name":188,"nameZh":6,"description":189,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":190,"categories":191,"keywords":192,"publishedAt":39},"01M6CD4HQKXNZ57YEGD8QVK6Z6","session-search","Recall public session turns with exact provenance, bounded excerpts and independent piped exports.","https:\u002F\u002Fgithub.com\u002Fcercova-studios\u002F10x-swe\u002Fblob\u002Fmain\u002Fplugins\u002Fknowledge\u002Fskills\u002Fsession-search\u002FSKILL.md",[],[181,164,193,194,162,195,196,165,146,156,157,197],"session search","public","provenance","recall","bounded",{"skillNo":199,"name":200,"nameZh":6,"description":201,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":202,"categories":203,"keywords":210,"publishedAt":39},"01M6CD4ET7DVNBYPDAMAYMSK2T","newsletter","Produce a private local AI newsletter from bounded public research, with cited deep dives, HTML\u002FMarkdown output, Dagu scheduling and seven-day retention.","https:\u002F\u002Fgithub.com\u002Fcercova-studios\u002F10x-swe\u002Fblob\u002Fmain\u002Fplugins\u002Fknowledge\u002Fskills\u002Fnewsletter\u002FSKILL.md",[204,207],{"categoryNo":205,"categoryName":206,"taxonomyType":86,"taxonomyTypeDesc":87},"01JBSEEDCAT000000000000005","邮件与沟通",{"categoryNo":208,"categoryName":209,"taxonomyType":86,"taxonomyTypeDesc":87},"01JBSEEDCAT000000000000021","资料检索与研究",[200,211,212,213,214,194,162,215,216,217,218,165,146,219,220,166,197,221],"local ai","dagu","produce","research","markdown","scheduling","html","daily","deep","retention","output"]