scaffold-composable-sample
Scaffolds a documentation sample for a new composable using the project's standard structure.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Scaffolds a documentation sample for a new composable using the project's standard structure.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Workflow for creating SSR-safe, memory-safe, version-adaptive composables wrapping anime.js utilities.
Create complete documentation sites for projects. Use when asked to: "create docs", "add documentation", "setup docs site", "generate docs", "document my project", "write docs", "initialize documentation", "add a docs folder", "create a docs website". Generates Docus-based sites with search, dark mode, MCP server, and llms.txt integration.
Guide for creating pages in the playground for the module
Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.
Guide for creating utility tests in this project using Nuxt test utils and component mounting.
| name | scaffold-composable-sample |
| description | Scaffolds a documentation sample for a new composable using the project's standard structure. |
Standardize the creation of documentation samples for Nuxt AnimeJS composables. Ensures consistent structure including Type Definitions, Arguments, Usage (Script + Template), and Return Values.
Standard Docus frontmatter with title, Description, and navigation icon (pick a unique semantic icon from Phosphor icons, e.g., i-ph-lightning for WAAPI).
Instant Play Badge: If the composable supports being called outside a Vue instance (after mounting), include the following badge linked to the composables index:
::nuxt-link{to="/composables/introduction#instant-play"}
:badge{icon="mage:zap-fill" label="Instant Play" size="md" variant="soft"}
::
Type Definition: Include ONLY the function signature at the top.
Arguments: Use ::field-group and ::field components. Use specific types extracted from src/runtime/app/utils/normalize-targets.ts (e.g., AnimeTargets, WaapiTargets) to ensure accuracy.
Use ::render-code-block-preview component pointing to a demo component in examples/composables/.
::render-code-block-preview{src="examples/composables/MyDemo.vue"}
::
ProxyReturns<Draggable> object").createProxy, reactive, or ref.ProxyReturns, add a ::caution block about properties being undefined until initialization.Add an ## API section with a ### Types sub-section at the bottom of the file. This is where all detailed type aliases and helper types should live.
normalize-targets.ts for accepted target types.icon.Object) are used where specific types exist.Demo Vue files live in docs/app/components/content/examples/. Structure:
examples/
composables/ # Composable demos
components/ # Component demos
misc/ # Utility/easing demos
ExampleWrapper — import from ~/components/shared/ExampleWrapper.vuesimple-box, spot) are defined globally in ExampleWrapper.vue — use them as template classes, never via @apply (they aren't Tailwind utilities)@reference "~/assets/css/main.css" at the top of the <style scoped> blockref, useTemplateRef, composables like useAnimate don't need explicit imports#nanime/utils, #nanime/easings, #nanime/proxies/text aliasesExampleWrapper tag and its import are automatically stripped from the displayed code in docs"Scaffold sample for useMyAnimation"
---
title: useMyAnimation
description: Documentation for useMyAnimation.
navigation:
icon: i-ph-star
---
# useMyAnimation
Brief description.
## Type Definition
\`\`\`ts
function useMyAnimation(target: MyAnimationTargets, options: Options): ReturnType
\`\`\`
### Arguments
::field-group
::field{name="target" type="MyAnimationTargets" required}
Description.
::
::field{name="options" type="Options"}
Description.
::
::
## Usage
::render-code-block-preview{src="examples/composables/MyAnimationDemo.vue"}
::
## Return Value
Returns a `ReturnType` object.
## API
### Types
\`\`\`ts
type MyAnimationTargets = ... // from normalize-targets.ts
type Options = ...
\`\`\`