원클릭으로
format-figure
// Reformats a figure component file to conform to the standard section order and naming conventions defined in the figure guidelines.
// Reformats a figure component file to conform to the standard section order and naming conventions defined in the figure guidelines.
Commits code changes, pushes to remote, and deploys to production. Use when the user wants to commit, push, and deploy their changes in one workflow.
Commit relevant changes, push to remote, and deploy the site. Use when finished with changes and ready to ship.
Build and deploy the rectified-flow-explainer site. Use when deploying, publishing, or pushing to production.
| name | format-figure |
| description | Reformats a figure component file to conform to the standard section order and naming conventions defined in the figure guidelines. |
Reformats a Svelte figure component to follow the standard design pattern.
When the user invokes this skill, follow these steps:
Read both files:
diffusion-explorer/apps/rectified-flow-explainer/src/lib/figures/README.mdIdentify the existing code sections within the <script> tag. Look for:
Note which sections are present, their current order, and whether they have proper section comment separators.
Report to the user:
render instead of draw)Reorganize the <script> section into this order:
// ----------------------------------------------------------------
// Props
// ----------------------------------------------------------------
// ----------------------------------------------------------------
// State
// ----------------------------------------------------------------
// ----------------------------------------------------------------
// Helpers
// ----------------------------------------------------------------
// ----------------------------------------------------------------
// Setup
// ----------------------------------------------------------------
// ----------------------------------------------------------------
// Animations
// ----------------------------------------------------------------
// ----------------------------------------------------------------
// Drawing
// ----------------------------------------------------------------
// ----------------------------------------------------------------
// Event Handlers
// ----------------------------------------------------------------
// ----------------------------------------------------------------
// Lifecycle
// ----------------------------------------------------------------
// ----------------------------------------------------------------
// Reactive Blocks
// ----------------------------------------------------------------
Rules:
render -> draw)Use AskUserQuestion to present the proposed changes and ask for approval:
If approved, use the Edit tool to apply the reformatted code.
Run type-check to ensure no errors were introduced:
cd diffusion-explorer && npm run check
Report the result to the user.
useVisibilityHandlersetupTimeline() function should configure the timeline and register onTick$:) should always be at the end of the script