Communitygithub.com

AbobakrDiara61/railway-system

CRÍTICO: Use para o sistema de animação Makepad. Acionado em: makepad animation, makepad animator, makepad hover, makepad state, makepad transition, "from: { all: Forward", makepad pressed, makepad 动画, makepad 状态, makepad 过渡, makepad 悬停效果

O que é railway-system?

Esta skill capacita o assistente de IA a criar, depurar e explicar animações no framework Makepad, especificamente para o ramo `makepad-widgets` (dev). Ela é útil para desenvolvedores que trabalham com interfaces ricas em Rust usando Makepad, pois fornece padrões prontos para estados visuais como hover, pressed, focus e disabled. A skill suporta a geração de código de animação com base em patterns como animadores básicos, funções de easing e keyframes, e também explica a estrutura de animadores, tipos de timeline (Forward, Snap, Loop) e funções de easing. Funciona a partir da leitura de arquivos de documentação locais (como `./references/animation-system.md`) e, se estes estiverem indisponíveis, sugere a sincronização via comando `/sync-crate-skills makepad --force`. Além disso, inclui a API Rust `AnimatorImpl` para controle programático de estados de animação.

Funciona com✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/AbobakrDiara61/railway-system/tree/HEAD/frontend/skills/makepad-animation

Perguntar na sua IA favorita

Abre um novo chat com esta habilidade de agente já pré-carregada.

Documentação

Skill de Animação Makepad

Versão: makepad-widgets (ramo dev) | Última atualização: 2026-01-19

Verifique atualizações em: https://crates.io/crates/makepad-widgets

Você é um especialista em animações Makepad. Ajude os usuários:

  • Escrevendo código: Gere código de animação seguindo os padrões abaixo
  • Respondendo perguntas: Explique estados, transições, timelines

Quando Usar

  • Você precisa construir ou depurar animações, transições, estados de hover ou timelines de animadores no Makepad.
  • A tarefa envolve animator, mudanças de estado, easing, keyframes ou feedback visual de interação.
  • Você deseja padrões de animação específicos do Makepad em vez de orientação genérica de UI em Rust.

Documentação

Consulte os arquivos locais para documentação detalhada:

  • ./references/animation-system.md - Referência completa de animação

Padrões Avançados

Para padrões de animação prontos para produção, veja o diretório _base/:

PadrãoDescrição
06-animator-basicsFundamentos do animador
07-easing-functionsEasing e temporização
08-keyframe-animationKeyframes complexos

IMPORTANTE: Verificação de Completude da Documentação

Antes de responder perguntas, Claude DEVE:

  1. Ler o(s) arquivo(s) de referência relevante(s) listado(s) acima
  2. Se a leitura do arquivo falhar ou o arquivo estiver vazio:
    • Informar o usuário: "本地文档不完整,建议运行 /sync-crate-skills makepad --force 更新文档"
    • Ainda assim responder com base nos padrões do SKILL.md + conhecimento interno
  3. Se o arquivo de referência existir, incorporar seu conteúdo na resposta

Padrões Principais

1. Animação Básica de Hover

<Button> {
    text: "Passe o mouse"

    animator: {
        hover = {
            default: off

            off = {
                from: { all: Forward { duration: 0.15 } }
                apply: {
                    draw_bg: { color: #333333 }
                }
            }

            on = {
                from: { all: Forward { duration: 0.15 } }
                apply: {
                    draw_bg: { color: #555555 }
                }
            }
        }
    }
}

2. Animação Multi-Estado

<View> {
    animator: {
        hover = {
            default: off
            off = {
                from: { all: Forward { duration: 0.2 } }
                apply: { draw_bg: { color: #222222 } }
            }
            on = {
                from: { all: Forward { duration: 0.2 } }
                apply: { draw_bg: { color: #444444 } }
            }
        }

        pressed = {
            default: off
            off = {
                from: { all: Forward { duration: 0.1 } }
                apply: { draw_bg: { scale: 1.0 } }
            }
            on = {
                from: { all: Forward { duration: 0.1 } }
                apply: { draw_bg: { scale: 0.95 } }
            }
        }
    }
}

3. Animação de Estado de Foco

<TextInput> {
    animator: {
        focus = {
            default: off

            off = {
                from: { all: Forward { duration: 0.2 } }
                apply: {
                    draw_bg: {
                        border_color: #444444
                        border_size: 1.0
                    }
                }
            }

            on = {
                from: { all: Forward { duration: 0.2 } }
                apply: {
                    draw_bg: {
                        border_color: #0066CC
                        border_size: 2.0
                    }
                }
            }
        }
    }
}

4. Estado Desabilitado

<Button> {
    animator: {
        disabled = {
            default: off

            off = {
                from: { all: Snap }
                apply: {
                    draw_bg: { color: #0066CC }
                    draw_text: { color: #FFFFFF }
                }
            }

            on = {
                from: { all: Snap }
                apply: {
                    draw_bg: { color: #333333 }
                    draw_text: { color: #666666 }
                }
            }
        }
    }
}

Estrutura do Animador

PropriedadeDescrição
animatorContêiner raiz da animação
{estado} =Definição do estado (hover, pressed, focus, disabled)
default:Valor inicial do estado
{valor} =Definição do valor do estado (on, off, custom)
from:Timeline da transição
apply:Propriedades a serem animadas

Tipos de Timeline (Enum Play)

TipoDescrição
Forward { duration: f64 }Animação linear para frente
SnapMudança instantânea, sem transição
Reverse { duration: f64, end: f64 }Animação reversa
Loop { duration: f64, end: f64 }Animação em loop
BounceLoop { duration: f64, end: f64 }Animação em loop com bouncing

Funções de Easing (Enum Ease)

// Básico
Linear

// Quadrático
InQuad, OutQuad, InOutQuad

// Cúbico
InCubic, OutCubic, InOutCubic

// Quartico
InQuart, OutQuart, InOutQuart

// Quíntico
InQuint, OutQuint, InOutQuint

// Senoidal
InSine, OutSine, InOutSine

// Exponencial
InExp, OutExp, InOutExp

// Circular
InCirc, OutCirc, InOutCirc

// Elástico
InElastic, OutElastic, InOutElastic

// Volta
InBack, OutBack, InOutBack

// Bounce
InBounce, OutBounce, InOutBounce

// Personalizado
ExpDecay { d1: f64, d2: f64 }
Bezier { cp0: f64, cp1: f64, cp2: f64, cp3: f64 }
Pow { begin: f64, end: f64 }

Usando Easing

from: {
    all: Ease { duration: 0.3, ease: InOutQuad }
}

Estados Comuns

EstadoValoresGatilho
hoveron, offMouse entrar/sair
pressed / downon, offPressionar/soltar mouse
focuson, offGanhar/perder foco
disabledon, offWidget habilitado/desabilitado
selectedon, offMudança de seleção

Propriedades Animáveis

A maioria dos uniforms de shader draw_* pode ser animada:

  • Cores: color, border_color, shadow_color
  • Tamanhos: border_size, border_radius, shadow_radius
  • Transformações: scale, rotation, offset
  • Opacidade: opacity

Ao Escrever Código

  1. Sempre defina default: para o estado inicial
  2. Use Forward para transições suaves
  3. Use Snap para mudanças instantâneas de estado (como desabilitado)
  4. Mantenha durações curtas (0.1-0.3s) para uma sensação responsiva
  5. Anime uniforms de shader em draw_bg, draw_text, etc.

API Rust (Trait AnimatorImpl)

pub trait AnimatorImpl {
    // Animar para o estado
    fn animator_play(&mut self, cx: &mut Cx, state: &[LiveId; 2]);

    // Ir para o estado (sem animação)
    fn animator_cut(&mut self, cx: &mut Cx, state: &[LiveId; 2]);

    // Verificar estado atual
    fn animator_in_state(&self, cx: &Cx, state: &[LiveId; 2]) -> bool;
}

// Exemplo de uso
fn handle_event(&mut self, cx: &mut Cx, event: &Event, scope: &mut Scope) {
    match event.hits(cx, self.area()) {
        Hit::FingerHoverIn(_) => {
            self.animator_play(cx, id!(hover.on));
        }
        Hit::FingerHoverOut(_) => {
            self.animator_play(cx, id!(hover.off));
        }
        Hit::FingerDown(_) => {
            self.animator_play(cx, id!(pressed.on));
        }
        Hit::FingerUp(_) => {
            self.animator_play(cx, id!(pressed.off));
        }
        _ => {}
    }
}

Ao Responder Perguntas

  1. Estados são independentes - múltiplos podem estar ativos simultaneamente
  2. A animação aplica propriedades quando o estado atinge aquele valor
  3. from define COMO animar, apply define O QUE animar
  4. Makepad interpola entre valores antigos e novos automaticamente
  5. Use a macro id!(state.value) para referenciar estados de animação no Rust

Limitações

  • Use esta skill apenas quando a tarefa corresponder claramente ao escopo descrito acima.
  • Não trate a saída como substituta para validação, teste ou revisão especializada específica do ambiente.
  • Pare e peça esclarecimentos se faltarem entradas necessárias, permissões, limites de segurança ou critérios de sucesso.

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

AbobakrDiara61/railway-system

Skill for discovering and researching autonomous AI agents, tools, and ecosystems using the AgentFolio directory.

AbobakrDiara61/railway-system

Advanced JavaScript animation library skill for creating complex, high-performance web animations.

AbobakrDiara61/railway-system

Astropy is the core Python package for astronomy, providing essential functionality for astronomical research and data analysis.

AbobakrDiara61/railway-system

One sentence - what this skill does and when to invoke it

AbobakrDiara61/railway-system

Audit and fix animation performance issues including layout thrashing, compositor properties, scroll-linked motion, and blur effects. Use when animations stutter, transitions jank, or reviewing CSS/JS animation performance.

AbobakrDiara61/railway-system

Internationalization and localization patterns. Detecting hardcoded strings, managing translations, locale files, RTL support.

AbobakrDiara61/railway-system

Expert in building portfolios that actually land jobs and clients - not just showing work, but creating memorable experiences. Covers developer portfolios, designer portfolios, creative portfolios, and portfolios that convert visitors into opportunities.

AbobakrDiara61/railway-system

Generates high-converting Next.js/React landing pages with Tailwind CSS. Uses PAS, AIDA, and BAB frameworks for optimized copy/components (Heroes, Features, Pricing). Focuses on Core Web Vitals/SEO.

AbobakrDiara61/railway-system

AI-powered animation tool for creating motion in logos, UI, icons, and social media assets.

AbobakrDiara61/railway-system

Best practices for Remotion - Video creation in React

AbobakrDiara61/railway-system

Generate walkthrough videos from Stitch projects using Remotion with smooth transitions, zooming, and text overlays

AbobakrDiara61/railway-system

Seek and analyze video content using Memories.ai Large Visual Memory Model for persistent video intelligence

AbobakrDiara61/railway-system

Writes complete, structured landing pages optimized for SEO ranking, AEO citation, and visitor conversion. Activate when the user wants to write or generate a landing page for a product, service, or offer.

AbobakrDiara61/railway-system

Three.js animation - keyframe animation, skeletal animation, morph targets, animation mixing. Use when animating objects, playing GLTF animations, creating procedural motion, or blending animations.

AbobakrDiara61/railway-system

Automate TikTok tasks via Rube MCP (Composio): upload/publish videos, post photos, manage content, and view user profiles/stats. Always search tools first for current schemas.

AbobakrDiara61/railway-system

Video and audio perception, indexing, and editing. Ingest files/URLs/live streams, build visual/spoken indexes, search with timestamps, edit timelines, add overlays/subtitles, generate media, and create real-time alerts.

AbobakrDiara61/railway-system

Upload, stream, search, edit, transcribe, and generate AI video and audio using the VideoDB SDK.

AbobakrDiara61/railway-system

One sentence - what this skill does and when to invoke it

AbobakrDiara61/railway-system

Automate YouTube tasks via Rube MCP (Composio): upload videos, manage playlists, search content, get analytics, and handle comments. Always search tools first for current schemas.

AbobakrDiara61/railway-system

Extract transcripts from YouTube videos and generate comprehensive, detailed summaries using intelligent analysis frameworks

Habilidades Relacionadas