[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7CS16GSCRX8HQ4GVF7TM4S2":3,"skill-same:01M7CS16GSCRX8HQ4GVF7TM4S2":58},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":26,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":29,"install":30,"resources":43},"01M7CS16GSCRX8HQ4GVF7TM4S2","bama-performance",null,"Make a macOS app fast by measuring hangs, stutter, CPU, memory, and energy, then moving work off the main thread and onto the GPU. Use when the app freezes, a shortcut feels slow, dragging stutters, the fan spins, memory grows, or the user asks to optimize or profile.","newmindsgroup\u002Fvisual-design-kit","newmindsgroup","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F38358889?v=4","01M7CRXVBNJ0WGRTNWHWY2HVQ9","01M7CRXVC9ZXSZBAPZTP3Y39CA",2,"MIT","https:\u002F\u002Fgithub.com\u002Fnewmindsgroup\u002Fvisual-design-kit\u002Fblob\u002Fmain\u002Fextras\u002Fbama-mac-studio\u002Fskills\u002Fbama-performance\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: bama-performance\ndescription: Make a macOS app fast by measuring hangs, stutter, CPU, memory, and energy, then moving work off the main thread and onto the GPU. Use when the app freezes, a shortcut feels slow, dragging stutters, the fan spins, memory grows, or the user asks to optimize or profile.\n---\n\n\u003C!-- Version-Timestamp: 2026-10-27 07:36:32 AST -->\n\n## Adapted execution contract\n\nThis is the pinned, MIT-attributed BAMA capability adapted for the owned design kit. Read `ADAPTATION.md` at the BAMA package root before executing helpers. Project instructions, approved DESIGN.md and canonical tokens take precedence. Use supported Codex or Claude Code tools. Resolve this skill's sibling files relative to its installed SKILL.md; `skill_dir` is a task-local shell variable that you set to that resolved directory before running the examples in either host. Invoke a named `bama-*` skill through the host's supported skill mechanism.\n\nStage local builds by default. Installation, signing identity selection, launch, CLI linking, MCP registration, system setting changes and capture access are separate explicit operations. Existing task authorization applies; ask only for an action not already authorized. Stage or commit only when the current task or repository workflow authorizes it. Stage explicit paths and include required attribution. The helpers do not commit. Preserve the feature, story and testing workflow below using the hardened helpers. Legacy installed-app paths in examples must be replaced by the staged binary returned by `build.sh`.\n\nBefore a new scaffold exists, keep planning evidence under the selected `\u003CAppName>-planning\u002Fdocs\u002F` sibling or an existing approved planning folder. Treat docs paths below as relative to that planning folder until the fresh app is scaffolded, then copy the planning docs explicitly without replacing existing files. For an existing app, keep its current project layout.\n\nThe upstream acceptance statements describe checks to perform, never completed results. Screenshots, runtime behavior, permissions and cross-host acceptance require actual evidence. Use synthetic data and owned temporary test roots. Do not run a hosted session over real app data without project authorization.\n\n\n\n# Performance\n\nFast means two numbers: the first frame after a key press shows in under\n100 ms, and nothing on the main thread blocks for more than 50 ms. Every\nchange in this skill starts and ends with a **measurement**, so you know it\nhelped. Symptom-by-symptom fixes are in [recipes.md](recipes.md). For\nvideo, audio, camera, Metal, or large image pipelines, also read\n[gpu-media.md](gpu-media.md).\n\n## The loop\n\n```text\nreproduce -> measure (release build) -> find the line -> fix -> measure again -> commit with the numbers\n```\n\n1. **Reproduce.** Write the exact steps, or add a probe command to the\n   debug bridge (`bama-test-mac-app` skill) that runs the slow action and logs\n   the time of each step.\n2. **Measure the release build.** Debug Swift is 3 to 10 times slower and\n   points at the wrong code.\n3. **Find the line.** Pick the tool for the symptom:\n\n   | Symptom | Tool |\n   | --- | --- |\n   | App freezes, spinning pointer | `sample \u003CApp> 5`, then read the main thread stack |\n   | Slow action | Time Profiler: `xcrun xctrace record --template 'Time Profiler' --attach \u003CApp> --time-limit 10s` |\n   | Short freezes while typing or dragging | `--template 'Hangs'` |\n   | Stutter while moving or animating | `--template 'Animation Hitches'` |\n   | Memory grows | `footprint \u003CApp>`, `leaks \u003CApp>`, `--template 'Allocations'` |\n   | Fan, battery | `--template 'Energy Log'`, look for timers and polling |\n\n   Read traces as text, not in the Instruments GUI: see \"Measuring\" in\n   [recipes.md](recipes.md). Delete every `.trace` after reading. A trace\n   stores the app's full environment, and an app opened from an agent's\n   shell inherits that shell's tokens. Never commit or share one.\n\n4. **Fix** with the matching recipe.\n5. **Measure again** with the same steps. Put before and after in the\n   commit message: \"Picker opens in 40 ms, was 600 ms\".\n\n## The rules that fix most problems\n\n- **Main thread does UI only.** File, network, database, image decoding,\n  Accessibility calls, and audio go elsewhere. A main-thread call that waits\n  on another process (CoreAudio, AX) can freeze the app for minutes.\n- **Show first, work after.** Put the window or panel on screen in the same\n  frame as the key press, then load. Never make the UI wait for the work.\n- **Let the GPU composite.** Large images go in a `CALayer` once. Pointer\n  movement changes only small layers. Never redraw a full-screen picture per\n  mouse event.\n- **Decode at display size.** ImageIO thumbnails, cached in `NSCache`.\n- **Do not animate what must be fast.** Search results and switchers\n  update in place.\n- **No polling without a reason.** Timers get a tolerance and stop when\n  nothing on screen needs them.\n\n## Apple silicon notes\n\n- Core Animation, Core Image (one shared `CIContext`), Vision, and\n  AVFoundation already run on the GPU or the Neural Engine. Hand them the\n  work instead of looping over pixels in Swift.\n- Write Metal (`MTKView`, compute shaders) only when a measurement shows\n  Core Animation or Core Image is too slow. Most apps never need it.\n- Unified memory means a `CGImage` from ScreenCaptureKit passes to a layer\n  without a copy. Keep it as a `CGImage` or `IOSurface`. Converting to\n  `NSImage` and back costs copies.\n\nDone when the slow action has a measured before and after, the after meets\nthe two numbers at the top, and the commit message names both.\n","\u003C!-- Version-Timestamp: 2026-10-27 07:36:32 AST -->\n\n## Adapted execution contract\n\nThis is the pinned, MIT-attributed BAMA capability adapted for the owned design kit. Read `ADAPTATION.md` at the BAMA package root before executing helpers. Project instructions, approved DESIGN.md and canonical tokens take precedence. Use supported Codex or Claude Code tools. Resolve this skill's sibling files relative to its installed SKILL.md; `skill_dir` is a task-local shell variable that you set to that resolved directory before running the examples in either host. Invoke a named `bama-*` skill through the host's supported skill mechanism.\n\nStage local builds by default. Installation, signing identity selection, launch, CLI linking, MCP registration, system setting changes and capture access are separate explicit operations. Existing task authorization applies; ask only for an action not already authorized. Stage or commit only when the current task or repository workflow authorizes it. Stage explicit paths and include required attribution. The helpers do not commit. Preserve the feature, story and testing workflow below using the hardened helpers. Legacy installed-app paths in examples must be replaced by the staged binary returned by `build.sh`.\n\nBefore a new scaffold exists, keep planning evidence under the selected `\u003CAppName>-planning\u002Fdocs\u002F` sibling or an existing approved planning folder. Treat docs paths below as relative to that planning folder until the fresh app is scaffolded, then copy the planning docs explicitly without replacing existing files. For an existing app, keep its current project layout.\n\nThe upstream acceptance statements describe checks to perform, never completed results. Screenshots, runtime behavior, permissions and cross-host acceptance require actual evidence. Use synthetic data and owned temporary test roots. Do not run a hosted session over real app data without project authorization.\n\n\n\n# Performance\n\nFast means two numbers: the first frame after a key press shows in under\n100 ms, and nothing on the main thread blocks for more than 50 ms. Every\nchange in this skill starts and ends with a **measurement**, so you know it\nhelped. Symptom-by-symptom fixes are in [recipes.md](recipes.md). For\nvideo, audio, camera, Metal, or large image pipelines, also read\n[gpu-media.md](gpu-media.md).\n\n## The loop\n\n```text\nreproduce -> measure (release build) -> find the line -> fix -> measure again -> commit with the numbers\n```\n\n1. **Reproduce.** Write the exact steps, or add a probe command to the\n   debug bridge (`bama-test-mac-app` skill) that runs the slow action and logs\n   the time of each step.\n2. **Measure the release build.** Debug Swift is 3 to 10 times slower and\n   points at the wrong code.\n3. **Find the line.** Pick the tool for the symptom:\n\n   | Symptom | Tool |\n   | --- | --- |\n   | App freezes, spinning pointer | `sample \u003CApp> 5`, then read the main thread stack |\n   | Slow action | Time Profiler: `xcrun xctrace record --template 'Time Profiler' --attach \u003CApp> --time-limit 10s` |\n   | Short freezes while typing or dragging | `--template 'Hangs'` |\n   | Stutter while moving or animating | `--template 'Animation Hitches'` |\n   | Memory grows | `footprint \u003CApp>`, `leaks \u003CApp>`, `--template 'Allocations'` |\n   | Fan, battery | `--template 'Energy Log'`, look for timers and polling |\n\n   Read traces as text, not in the Instruments GUI: see \"Measuring\" in\n   [recipes.md](recipes.md). Delete every `.trace` after reading. A trace\n   stores the app's full environment, and an app opened from an agent's\n   shell inherits that shell's tokens. Never commit or share one.\n\n4. **Fix** with the matching recipe.\n5. **Measure again** with the same steps. Put before and after in the\n   commit message: \"Picker opens in 40 ms, was 600 ms\".\n\n## The rules that fix most problems\n\n- **Main thread does UI only.** File, network, database, image decoding,\n  Accessibility calls, and audio go elsewhere. A main-thread call that waits\n  on another process (CoreAudio, AX) can freeze the app for minutes.\n- **Show first, work after.** Put the window or panel on screen in the same\n  frame as the key press, then load. Never make the UI wait for the work.\n- **Let the GPU composite.** Large images go in a `CALayer` once. Pointer\n  movement changes only small layers. Never redraw a full-screen picture per\n  mouse event.\n- **Decode at display size.** ImageIO thumbnails, cached in `NSCache`.\n- **Do not animate what must be fast.** Search results and switchers\n  update in place.\n- **No polling without a reason.** Timers get a tolerance and stop when\n  nothing on screen needs them.\n\n## Apple silicon notes\n\n- Core Animation, Core Image (one shared `CIContext`), Vision, and\n  AVFoundation already run on the GPU or the Neural Engine. Hand them the\n  work instead of looping over pixels in Swift.\n- Write Metal (`MTKView`, compute shaders) only when a measurement shows\n  Core Animation or Core Image is too slow. Most apps never need it.\n- Unified memory means a `CGImage` from ScreenCaptureKit passes to a layer\n  without a copy. Keep it as a `CGImage` or `IOSurface`. Converting to\n  `NSImage` and back costs copies.\n\nDone when the slow action has a measured before and after, the after meets\nthe two numbers at the top, and the commit message names both.\n",{"name":5,"description":7},"main","753c596e097d0288f4f74e22d6b8457014eac8b2","extras\u002Fbama-mac-studio\u002Fskills\u002Fbama-performance",0,"https:\u002F\u002Fgithub.com\u002Fnewmindsgroup\u002Fvisual-design-kit","https:\u002F\u002Fgithub.com\u002Fnewmindsgroup","2026-11-10 11:31:50",{"source":8,"skillName":5,"commands":31,"prompt":41,"zipAvailable":42},[32,35,38],{"tool":33,"command":34},"npx","npx skills add newmindsgroup\u002Fvisual-design-kit --skill bama-performance",{"tool":36,"command":37},"bunx","bunx skills add newmindsgroup\u002Fvisual-design-kit --skill bama-performance",{"tool":39,"command":40},"pnpm","pnpm dlx skills add newmindsgroup\u002Fvisual-design-kit --skill bama-performance","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fnewmindsgroup\u002Fvisual-design-kit\u002Fblob\u002Fmain\u002Fextras\u002Fbama-mac-studio\u002Fskills\u002Fbama-performance\u002FSKILL.md",true,[44,50,54],{"path":45,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":48,"sourceHtmlUrl":49},"agents\u002Fopenai.yaml","REFERENCE","参考文档",98,"https:\u002F\u002Fgithub.com\u002Fnewmindsgroup\u002Fvisual-design-kit\u002Fblob\u002Fmain\u002Fextras\u002Fbama-mac-studio\u002Fskills\u002Fbama-performance\u002Fagents\u002Fopenai.yaml",{"path":51,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":52,"sourceHtmlUrl":53},"gpu-media.md",6479,"https:\u002F\u002Fgithub.com\u002Fnewmindsgroup\u002Fvisual-design-kit\u002Fblob\u002Fmain\u002Fextras\u002Fbama-mac-studio\u002Fskills\u002Fbama-performance\u002Fgpu-media.md",{"path":55,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":56,"sourceHtmlUrl":57},"recipes.md",9488,"https:\u002F\u002Fgithub.com\u002Fnewmindsgroup\u002Fvisual-design-kit\u002Fblob\u002Fmain\u002Fextras\u002Fbama-mac-studio\u002Fskills\u002Fbama-performance\u002Frecipes.md",[59,66,73,80,87,94],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":18},"01M7CSR2BPCD04SARPWN7EJ5R0","web-design","Load before planning, designing, auditing or launching any website, landing page, cinematic hero, microsite or above-the-fold layout, or a prompt for Lovable, Bolt or v0 to build one, including regulated (prescription drug, health, finance), multilingual or market-specific launches. Covers page types (home, product, pricing, about, blog), conversion and ethical persuasion, responsive and fluid layouts, Core Web Vitals, SEO and structured data, localization and language-law requirements, stack and CMS choice (Astro, Next.js, WordPress, Webflow, Framer) and launch QA.","https:\u002F\u002Fgithub.com\u002Fnewmindsgroup\u002Fvisual-design-kit\u002Fblob\u002Fmain\u002Fplugins\u002Fvisual-design-studio\u002Fskills\u002Fweb-design\u002FSKILL.md",[],[],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":18},"01M7CSQX00CVQAWP2QDHKVXFMS","ux-design","Load before designing or reviewing any flow, form, onboarding, navigation or content for real users, especially low-literacy, older, neurodivergent, child or other specific audiences. Covers research and usability tests, heuristic reviews, personas and jobs to be done, journeys and service blueprints, information architecture, UX laws, SUS, SEQ and HEART metrics, plain language and reading level, and microcopy and error messages.","https:\u002F\u002Fgithub.com\u002Fnewmindsgroup\u002Fvisual-design-kit\u002Fblob\u002Fmain\u002Fplugins\u002Fvisual-design-studio\u002Fskills\u002Fux-design\u002FSKILL.md",[],[],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":18},"01M7CSQQE0HX6Q8YR2EA1TR6P4","ui-design","Load before designing or specifying any interface screen or component, even a quick one: forms, tables, navigation, dashboards, onboarding, auth and passkeys, pricing, checkout, search and filters, settings, empty, loading and error states, notifications, consent and age-appropriate flows, and AI chat and agent interfaces, all to WCAG 2.2 AA. Also picks React UI libraries (toasts, drawers, command menus). Gives component specs, state matrices, sizes, density and keyboard and accessibility behavior.","https:\u002F\u002Fgithub.com\u002Fnewmindsgroup\u002Fvisual-design-kit\u002Fblob\u002Fmain\u002Fplugins\u002Fvisual-design-studio\u002Fskills\u002Fui-design\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":18},"01M7CSQFM0F9QKZ17S54PYN8M7","typography","Choose, pair, size and set type for brand, web, app, print, slides, signage and motion: modular scales, fluid clamp() type, measure, leading, tracking, OpenType features, font licensing and web font loading, and multiscript setting for CJK, Arabic, Hebrew, Devanagari and Thai. Use when selecting or pairing fonts, building a type scale or type tokens, fixing weak hierarchy or bad line breaks, setting long-form text or numbers, loading web fonts, or localizing type for another market.","https:\u002F\u002Fgithub.com\u002Fnewmindsgroup\u002Fvisual-design-kit\u002Fblob\u002Fmain\u002Fplugins\u002Fvisual-design-studio\u002Fskills\u002Ftypography\u002FSKILL.md",[],[],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":18},"01M7CSQ95PB7K9JBEFYZVA7226","reference-reconstruction","Reconstructs the observed interface and behavior of a supplied app, site or screenshot set using a screen index, measurements, state and command maps, reusable components and matched-condition comparisons. Use when asked to reverse engineer, clone, reproduce or match a reference product, then adapt it if requested.","https:\u002F\u002Fgithub.com\u002Fnewmindsgroup\u002Fvisual-design-kit\u002Fblob\u002Fmain\u002Fplugins\u002Fvisual-design-studio\u002Fskills\u002Freference-reconstruction\u002FSKILL.md",[],[],{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":18},"01M7CSQ1XRH2MBXH21MSZ7PXWJ","print-packaging-social","Load before any print, packaging, label, barcode, social, out-of-home, slide-deck or email design question, even a quick one, and before making finished collateral files. Specs: bleed, safe zones, 300ppi, CMYK, PDF\u002FX preflight, dielines, barcodes, social formats with 9:16 safe areas, billboard letter heights, 16:9 decks, bulletproof email. Renders token-driven brand books, sell sheets, cards, carousels and decks to PDF and PNG with a Canva editable twin.","https:\u002F\u002Fgithub.com\u002Fnewmindsgroup\u002Fvisual-design-kit\u002Fblob\u002Fmain\u002Fplugins\u002Fvisual-design-studio\u002Fskills\u002Fprint-packaging-social\u002FSKILL.md",[],[]]