Agent skill

Magnetic Button

by nexu-io in nexu-io/motion-anything

Make a primary button feel alive by gently pulling it toward the cursor as it approaches, then springing back.

Apache-2.0Auto-check passedFrontend & Design

Install Magnetic Button

skills CLI
$ npx skills add nexu-io/motion-anything --skill magnetic-button -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install nexu-io/motion-anything magnetic-button --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/nexu-io/motion-anything.git skills-src && mkdir -p .claude/skills && cp -r skills-src/recipes/web/magnetic-button .claude/skills/magnetic-button && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
magnetic-button
GitHub stars
849
Token cost
~476 tokens
SKILL.md length
123 words
Files
5
Skills in repo
12
Repo updated
First seen
Licence
Apache-2.0

At a glance

Make a primary button feel alive by gently pulling it toward the cursor as it approaches, then springing back.

  • Works in 3 steps: Copy magnetic-button.css and… → Mark the button → Auto-attaches to .magnetic. Keep…
  • Frontend & Design work in your project
  • SKILL.md covers When to use it, When NOT to use it (restraint), How to apply and Accessibility & performance, plus 1 more section
  • Runs JavaScript scripts from its folder

What it does

Magnetic Button is an agent skill from nexu-io/motion-anything. Make a primary button feel alive by gently pulling it toward the cursor as it approaches, then springing back. Keep it subtle and reserve it for one or two primary actions. Disabled on touch and under prefers-reduced-motion. Do not use it on dense UIs full of buttons.

Its SKILL.md is about 480 tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files (for example `magnetic-button.js` and `recipe.motion.yaml`).

It sits in Frontend & Design. The repository describes itself as: ✨ The agentic motion layer — an open-source, chat-native motion engine. Describe the feeling; your AI ships the animation. The licence is Apache-2.0.

When your agent uses it

  • Frontend & Design work in your project

Example prompts

  • “/magnetic-button”

Requirements

  • Node.js

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Copy magnetic-button.css and magnetic-button.js into the project, and link them.
  2. Mark the button
  3. Auto-attaches to .magnetic. Keep strength small (~0.2–0.4) so the pull stays subtle.

What it can do on your machine

Read from SKILL.md and the folder at commit b016900. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships script files (JavaScript), which the agent can run.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Magnetic Button loads about 476 tokens when it runs. Until then it costs about 71 tokens; SKILL.md has 123 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~71
When it runs · the whole SKILL.md, loaded when a task matches
~476

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from nexu-io/motion-anything at commit b016900, republished under its Apache-2.0 licence (© nexu-io). 123 words, ~476 tokens.

Download SKILL.mdSave it as .claude/skills/magnetic-button/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
magnetic-button
description
Make a primary button feel alive by gently pulling it toward the cursor as it approaches, then springing back. Keep it subtle and reserve it for one or two primary actions. Disabled on touch and under prefers-reduced-motion. Do not use it on dense UIs full of buttons.
triggers
magnetic button, playful hover, button that follows cursor, make this button alive, 磁吸按钮, 活泼
od.mode
prototype
od.surface
web
od.platform
desktop
od.category
animation-motion
od.example_prompt
Use magnetic-button on the hero "Get started" CTA: a subtle pull toward the cursor with a snappy spring back. Only the primary button; disable on touch and…

magnetic-button

A button that leans toward the cursor, then springs back. Part of motion-anything; obeys MOTION-SPEC.md.

When to use it

  • A single primary call-to-action you want to feel alive (hero "Get started" / "Try it").

When NOT to use it (restraint)

  • Dense UIs with many buttons — it becomes chaotic. Reserve for 1–2 primary targets.
  • Touch-only contexts (no cursor). The recipe disables itself there automatically.

How to apply

  1. Copy magnetic-button.css and magnetic-button.js into the project, and link them.
  2. Mark the button:
    html
    <button class="magnetic" data-magnet-strength="0.3">Get started</button>
  3. Auto-attaches to .magnetic. Keep strength small (~0.2–0.4) so the pull stays subtle.

Accessibility & performance

  • Disabled under prefers-reduced-motion and on (hover: none) touch devices.
  • Transform only; resets on pointerleave.

Framework notes

  • React: call attachMagnetic(ref.current) in useEffect, guarded by the same reduced-motion/touch checks.

© nexu-io, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 4 other files in recipes/web/magnetic-button of nexu-io/motion-anything.

  • SKILL.md
  • magnetic-button.css
  • magnetic-button.js
  • preview.html
  • recipe.motion.yaml

Open the folder on GitHubat commit b016900

Compare with similar skills

Magnetic Button next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Magnetic Button compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Magnetic Button this skillnexu-io/motion-anything849—~476Automated safety check: PassApache-2.0
Web Artifacts Builderanthropics/skills180k41 repos~769Automated safety check: PassApache-2.0
React Doctormakeplane/plane61k12 repos~657Automated safety check: PassAGPL-3.0
Impeccablebestofjs/bestofjs3.1k27 repos~2.6kAutomated safety check: PassMIT
Figma Design System Builderwarpdotdev/warp65k2 repos~4.4kAutomated safety check: PassAGPL-3.0
Web Interface Guidelines Reviewervercel-labs/openreview1.7k97 repos~308Automated safety check: PassNone

Similar skills

  • Web Artifacts Builder

    anthropics/skills

    Official

    Builds multi-component claude.ai HTML artifacts as a small React, TypeScript and Tailwind project, then bundles it into one shareable HTML file.

    180k GitHub starsUsed in 41 repos~769 tokens
    Frontend & DesignAuto-check passed
  • React Doctor

    makeplane/plane

    Scans React code for lint, accessibility, bundle size and architecture issues, reports a health score and checks that changes do not lower it.

    61k GitHub starsUsed in 12 repos~657 tokens
    Frontend & DesignAuto-check passed
  • Impeccable

    bestofjs/bestofjs

    A skill your agent uses when the user wants to design, redesign, shape, critique, audit, polish, clarify, distill, harden, optimize, adapt, animate, colorize, extract, or otherwise improve a…

    3.1k GitHub starsUsed in 27 repos~2.6k tokens
    Frontend & DesignAuto-check passed
  • Builds or updates a design system in Figma from a codebase in ordered phases: discovery, variables and tokens, components, theming and documentation, with checkpoints.

    65k GitHub starsUsed in 2 repos~4.4k tokens
    Frontend & DesignAuto-check passed
  • Web Interface Guidelines Reviewer

    vercel-labs/openreview

    Official

    Review UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "check accessibility", "audit design", "review UX", or "check my…

    1.7k GitHub starsUsed in 97 repos~308 tokens
    Frontend & DesignAuto-check passed
  • Tailwindcss Development

    anonaddy/anonaddy

    Always invoke when the user's message includes 'tailwind' in any form.

    4.9k GitHub starsUsed in 10 repos~865 tokens
    Frontend & DesignAuto-check passed

More from nexu-io/motion-anything

All 12 skills in this repo
  • Like Burst

    nexu-io/motion-anything

    Add a celebratory particle burst to a like / favorite / reaction button.

    849 GitHub stars~612 tokensUpdated 3 mo ago
    Auto-check passed
  • Border Beam

    nexu-io/motion-anything

    Give one card or CTA a lively accent: a small bright comet of light travels around its border.

    849 GitHub stars~461 tokensUpdated 3 mo ago
    Auto-check passed
  • Scroll Reveal

    nexu-io/motion-anything

    Reveal content as it scrolls into view — a gentle rise + fade, once per element.

    849 GitHub stars~483 tokensUpdated 3 mo ago
    Auto-check passed
  • Web Shader Extractor

    nexu-io/motion-anything

    Extract a real WebGL / WebGPU / Canvas / shader effect from a live webpage (e.g.

    849 GitHub stars~541 tokensUpdated 3 mo ago
    Auto-check passed
  • Web To Design Md

    nexu-io/motion-anything

    Extract a real website's design tokens — colors, typography, spacing, CSS, and motion — into a structured design.md an AI can consume.

    849 GitHub stars~447 tokensUpdated 3 mo ago
    Auto-check passed
  • Count Up

    nexu-io/motion-anything

    Animate a number counting up to its target as it scrolls into view, once.

    849 GitHub stars~382 tokensUpdated 3 mo ago
    Auto-check passed

Questions about Magnetic Button

What does Magnetic Button do?

Make a primary button feel alive by gently pulling it toward the cursor as it approaches, then springing back. Magnetic Button is an agent skill from nexu-io/motion-anything. Make a primary button feel alive by gently pulling it toward the cursor as it approaches, then springing back.

When should I use Magnetic Button?

Magnetic Button fits situations like: frontend & Design work in your project.

How do I install Magnetic Button in Claude Code?

Run `npx skills add nexu-io/motion-anything --skill magnetic-button -a claude-code`. Or copy the skill folder (recipes/web/magnetic-button in nexu-io/motion-anything) into .claude/skills/magnetic-button in your project. Claude Code loads it when a task matches its description.

How do I install Magnetic Button in Codex?

Run `npx skills add nexu-io/motion-anything --skill magnetic-button -a codex`. Or copy the skill folder (recipes/web/magnetic-button in nexu-io/motion-anything) into .agents/skills/magnetic-button in your project. Codex loads it when a task matches its description.

Can I use Magnetic Button in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add nexu-io/motion-anything --skill magnetic-button -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/magnetic-button, .gemini/skills/magnetic-button, .github/skills/magnetic-button and .opencode/skills/magnetic-button in your project.

What does Magnetic Button need to run?

Going by SKILL.md and its folder, Magnetic Button needs JavaScript for the scripts in its folder. Our summary lists: Node.js.

Does Magnetic Button access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Magnetic Button safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Magnetic Button use?

Magnetic Button is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Magnetic Button use?

About 476 tokens (SKILL.md is roughly 1.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Magnetic Button?

Skills that share tags, products or a category with Magnetic Button: Web Artifacts Builder (anthropics/skills, 180k stars), React Doctor (makeplane/plane, 61k stars), Impeccable (bestofjs/bestofjs, 3.1k stars) and Figma Design System Builder (warpdotdev/warp, 65k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Magnetic Button?

nexu-io (a GitHub organization) maintains it in nexu-io/motion-anything, which has 849 GitHub stars. The repository holds 12 skills in this directory. The repository was last updated on July 7, 2026.

Source: nexu-io/motion-anything on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.