Communitygithub.com

Anhvu1107/all-agent-skill

Utilisez TOUJOURS cette compétence lorsque la demande correspond à l'animation Makepad : CRITIQUE : Utiliser pour le système d'animation Makepad.

Qu'est-ce que all-agent-skill ?

Cette compétence est conçue pour les agents IA spécialisés dans la création et le débogage d'animations avec le framework Makepad (branche dev makepad-widgets). Elle fournit des directives strictes de lecture sélective, en commençant par des fichiers de référence spécifiques (senior-master-standard.md, usage-routing.md, quality-checklist.md) avant de charger la documentation héritée pertinente. Elle couvre tous les aspects essentiels du système d'animation de Makepad : les états (hover, pressed, focus, disabled, selected), les types de transitions (Forward, Snap, Reverse, Loop, BounceLoop), les fonctions d'easing (de Linear à des courbes personnalisées comme Bezier et Elastic), et les propriétés animables (couleurs, bordures, transformations, opacité). La compétence offre des modèles de code concrets pour les animations de survol, multi-états, de focus et d'état désactivé, ainsi que les appels d'API Rust correspondants via le trait AnimatorImpl (animator_play, animator_cut, animator_in_state). Elle inclut également une fonctionnalité de vérification de l'exhaustivité de la documentation : si les fichiers locaux sont manquants ou vides, l'agent doit informer l'utilisateur d'exécuter `/sync-crate-skills makepad --force` pour les mettre à jour.

Compatible avec✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/Anhvu1107/all-agent-skill/tree/HEAD/.agent/skills/makepad-animation

Demander à votre IA préférée

Ouvre une nouvelle conversation avec cette compétence d'agent déjà préchargée.

Documentation

Compétence d'Animation Makepad

Règle de Lecture Sélective

Commencez par :

  • references/senior-master-standard.md
  • references/usage-routing.md
  • references/quality-checklist.md

Chargez ensuite uniquement les documents, scripts, ressources ou exemples hérités qui correspondent à la tâche réelle de l'utilisateur.

Version : makepad-widgets (branche dev) | Dernière mise à jour : 2026-01-19

Vérifiez les mises à jour : https://crates.io/crates/makepad-widgets

Vous êtes un expert en animations Makepad. Aidez les utilisateurs en :

  • Écrivant du code : générez du code d'animation en suivant les modèles ci-dessous
  • Répondant aux questions : expliquez les états, transitions, timelines

Quand l'Utiliser

  • Vous devez créer ou déboguer des animations, transitions, états de survol ou timelines d'animateur dans Makepad.
  • La tâche implique animator, des changements d'état, des fonctions d'easing, des images clés ou des retours d'interaction visuelle.
  • Vous souhaitez des modèles d'animation spécifiques à Makepad plutôt que des conseils génériques pour l'UI Rust.

Documentation

Consultez les fichiers locaux pour une documentation détaillée :

  • ./references/animation-system.md - Référence complète sur l'animation

Modèles Avancés

Pour des modèles d'animation prêts pour la production, consultez le répertoire _base/ :

ModèleDescription
06-animator-basicsFondamentaux de l'animateur
07-easing-functionsFonctions d'easing et timing
08-keyframe-animationImages clés complexes

IMPORTANT : Vérification de l'Exhaustivité de la Documentation

Avant de répondre aux questions, Claude DOIT :

  1. Lire le(s) fichier(s) de référence concerné(s) listé(s) ci-dessus
  2. Si la lecture du fichier échoue ou si le fichier est vide :
    • Informer l'utilisateur : "本地文档不完整,建议运行 /sync-crate-skills makepad --force 更新文档"
    • Répondre quand même en se basant sur les modèles de SKILL.md + les connaissances intégrées
  3. Si le fichier de référence existe, incorporer son contenu dans la réponse

Modèles Clés

1. Animation de survol de base

<Button> {
    text: "Survolez-moi"

    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. Animation multi-états

<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. Animation de l'état Focus

<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. État désactivé

<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 }
                }
            }
        }
    }
}

Structure de l'Animateur

PropriétéDescription
animatorConteneur racine d'animation
{state} =Définition de l'état (hover, pressed, focus, disabled)
default:Valeur d'état initiale
{value} =Définition de la valeur d'état (on, off, custom)
from:Timeline de transition
apply:Propriétés à animer

Types de Timeline (Énumération Play)

TypeDescription
Forward { duration: f64 }Animation linéaire avant
SnapChangement instantané, sans transition
Reverse { duration: f64, end: f64 }Animation inversée
Loop { duration: f64, end: f64 }Animation en boucle
BounceLoop { duration: f64, end: f64 }Animation de boucle avec rebond

Fonctions d'Easing (Énumération Ease)

// Basique
Linear

// Quadratique
InQuad, OutQuad, InOutQuad

// Cubique
InCubic, OutCubic, InOutCubic

// Quartique
InQuart, OutQuart, InOutQuart

// Quintique
InQuint, OutQuint, InOutQuint

// Sinusoïdale
InSine, OutSine, InOutSine

// Exponentielle
InExp, OutExp, InOutExp

// Circulaire
InCirc, OutCirc, InOutCirc

// Élastique
InElastic, OutElastic, InOutElastic

// Rebond
InBack, OutBack, InOutBack

// Bounce
InBounce, OutBounce, InOutBounce

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

Utilisation de l'Easing

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

États Communs

ÉtatValeursDéclencheur
hoveron, offEntrée/sortie souris
pressed / downon, offAppui/relâchement souris
focuson, offPrise/perte de focus
disabledon, offWidget activé/désactivé
selectedon, offChangement de sélection

Propriétés Animables

La plupart des uniforms de shader draw_* peuvent être animés :

  • Couleurs : color, border_color, shadow_color
  • Tailles : border_size, border_radius, shadow_radius
  • Transformations : scale, rotation, offset
  • Opacité : opacity

Lors de l'Écriture de Code

  1. Définissez toujours default: pour l'état initial
  2. Utilisez Forward pour des transitions fluides
  3. Utilisez Snap pour des changements d'état instantanés (comme désactivé)
  4. Gardez des durées courtes (0,1-0,3 s) pour une réactivité
  5. Animez les uniforms de shader dans draw_bg, draw_text, etc.

API Rust (Trait AnimatorImpl)

pub trait AnimatorImpl {
    // Animer vers un état
    fn animator_play(&mut self, cx: &mut Cx, state: &[LiveId; 2]);

    // Couper vers un état (sans animation)
    fn animator_cut(&mut self, cx: &mut Cx, state: &[LiveId; 2]);

    // Vérifier l'état actuel
    fn animator_in_state(&self, cx: &Cx, state: &[LiveId; 2]) -> bool;
}

// Exemple d'utilisation
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));
        }
        _ => {}
    }
}

Lors de la Réponse aux Questions

  1. Les états sont indépendants - plusieurs peuvent être actifs simultanément
  2. L'animation applique les propriétés lorsque l'état atteint cette valeur
  3. from définit COMMENT animer, apply définit QUOI animer
  4. Makepad effectue une interpolation entre les anciennes et nouvelles valeurs automatiquement
  5. Utilisez la macro id!(state.value) pour référencer les états d'animation en Rust

Limitations

  • Utilisez cette compétence uniquement lorsque la tâche correspond clairement au champ d'application décrit ci-dessus.
  • Ne considérez pas le résultat comme un substitut à une validation, un test ou un examen expert spécifique à l'environnement.
  • Arrêtez-vous et demandez des clarifications si les entrées, autorisations, limites de sécurité ou critères de succès requis sont manquants.

Individual skills in this repo

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

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches 007: Security audit, hardening, threat modeling (STRIDE/PASTA), Red/Blue Team, OWASP checks, code review, incident response, and infrastructure security for any project.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Agentfolio: Skill for discovering and researching autonomous AI agents, tools, and ecosystems using the AgentFolio directory.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Animejs Animation: Advanced JavaScript animation library skill for creating complex, high-performance web animations.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Astropy: Astropy is the core Python package for astronomy, providing essential functionality for astronomical research and data analysis.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Astro: Build content-focused websites with Astro — zero JS by default, islands architecture, multi-framework components, and Markdown/MDX support.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Emotional ARC Designer: One sentence - what this skill does and when to invoke it

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Fixing Motion Performance: Audit and fix animation performance issues including layout thrashing, compositor properties, scroll-linked motion, and blur effects.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches I18n Localization: Internationalization and localization patterns.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Interactive Portfolio: Expert in building portfolios that actually land jobs and clients - not just showing work, but creating memorable experiences.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches JQ: Expert jq usage for JSON querying, filtering, transformation, and pipeline integration.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Landing Page Generator: Generates high-converting Next.js/React landing pages with Tailwind CSS.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches LEX: Centralized ''Truth Engine'' for cross-jurisdictional legal context (US, EU, CA) and contract scaffolding.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Magic Animator: AI-powered animation tool for creating motion in logos, UI, icons, and social media assets.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Nextjs APP Router Patterns: Comprehensive patterns for Next.js 14+ App Router architecture, Server Components, and modern full-stack React development.

Anhvu1107/all-agent-skill

ALWAYS use this when the user mentions Nextjs Best Practices, asks to build, debug, review, document, automate, test, configure, migrate, or make decisions in this domain, or the task clearly depends on Nextjs Best Practices; scope: Next.js App Router principles. Apply the bundled workflow, references, scripts, Senior Master standard, and Codex strict review gate before final output.

Anhvu1107/all-agent-skill

description: ALWAYS use this when the work is specifically about modern Next.js or React architecture, data flow, rendering strategy, routing, or performance-sensitive frontend behavior.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Nextjs Supabase Auth: Expert integration of Supabase Auth with Next.js App Router

Anhvu1107/all-agent-skill

ALWAYS use this when the task involves reading, extracting, splitting, merging, rotating, creating, validating, OCR-ing, form-filling, or otherwise producing or modifying PDF files.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches React Nextjs Development: React and Next.js 14+ application development with App Router, Server Components, TypeScript, Tailwind CSS, and modern frontend patterns.

Anhvu1107/all-agent-skill

ALWAYS use this when working with Remotion code, video compositions, rendering logic, timing, media assets, or React-based motion workflows.

Skills associés