Grille de coordonnées pour overlays Remotion

VérifiéPrudence

Mesurez chaque position d'overlay sur une grille de coordonnées au lieu de l'estimer, puis vérifiez la mise en page sur un rendu griddé.

Spar Skills Guide Bot
DeveloppementIntermédiaire
21/10/2026
Claude Code
#remotion#overlay-layout#coordinate-grid#visual-verification#compositing

Recommandé pour

Synthèse automatique

Cette compétence impose de placer et de vérifier les overlays Remotion en lisant leurs coordonnées sur une grille graduée plutôt qu'en les estimant à l'œil.

Points forts

  • Fournit des commandes concrètes pour produire un still à l'échelle 1, extraire une image de vidéo avec ffmpeg et générer des grilles zonées avec zoom.
  • Normalise les coordonnées en pixels de composition, ce qui permet de reporter directement les mesures dans le code.
  • Couvre les deux cas utiles : alignement d'un graphique sur un élément filmé et contrôle des rendus propres à l'overlay (texte, marges, collisions, centrage).
  • S'appuie sur des erreurs réelles documentées pour montrer pourquoi l'estimation visuelle échoue.

Limites

  • Dépend du script `grid.py` placé dans `.claude/skills/overlay-coordinate-grid/scripts/` et de Python 3 avec Pillow.
  • La normalisation par défaut en 1920x1080 peut nécessiter un ajustement explicite pour les compositions d'autres dimensions.
  • Le contrôle porte sur des images fixes : il ne vérifie pas l'évolution du placement sur plusieurs images ou animations.
Quand l'utiliser

À utiliser dès qu'un overlay Remotion doit s'aligner sur des éléments filmés ou que ses limites, marges et collisions doivent être prouvées par une mesure sur rendu griddé.

Quand l'éviter

À éviter pour une discussion de mise en page purement conceptuelle ou lorsqu'aucun rendu Remotion ni image source exploitable n'est disponible pour vérifier précisément le placement.

Analyse de sécurité

Prudence
Score qualité86/100

The skill describes a legitimate visual-measurement workflow and contains no destructive, exfiltration, obfuscated, or safety-disabling instructions. Risk is limited to running local scripts and media tooling, plus filesystem metadata lookup via mdfind, so it is best rated caution rather than safe.

Points d'attention
  • •Instructs shell execution of local Python scripts, `npx remotion`, and bundled `ffmpeg`; these are legitimate for the stated Remotion workflow but are powerful execution paths.
  • •Uses `mdfind` to locate files by pixel dimensions, which queries local Spotlight metadata and may search the user's filesystem.
  • •No allowed-tools are declared even though the skill requires Bash-level commands, so the execution scope is not explicitly constrained.
  • •Instructs shell execution (npx remotion still/ffmpeg, python3 scripts/grid.py, mdfind) but only for local rendering, frame extraction and image measurement — no destructive, network-exfiltrating or obfuscated operations.
  • •Uses `mdfind` with Spotlight metadata queries to locate user screenshots by pixel dimensions, which searches the local filesystem broadly; benign but worth noting as a mild privacy surface.
  • •Invokes `npx remotion ...`, which could pull/execute npm packages from the network if Remotion is not already installed locally — standard toolchain behaviour, not a red flag.
  • •No declared allowed-tools despite requiring Bash/Python 3 + Pillow; the skill may fail or be blocked under a restrictive tool policy (operational, not security).
Comment cette analyse est faite

Exemples

Measure title bounds
Render frame 90 of IdentityShell at scale=1, grid it, and tell me the exact x-bounds of the RUNNER text so I can move the crack origin to match.
Align an arrow to footage
Extract a frame from this clip, grid the source frame, and give me the coordinates for an arrow overlay pointing at the product in shot.
Check label collision
Grid the UnattachedGate render and verify whether the gate swing arc collides with the JOY label; report exact coordinates and margins.

name: overlay-coordinate-grid description: Place and verify every overlay by reading exact coordinates off a labelled coordinate grid instead of estimating positions. Grid the real footage frame when graphics must line up with something in shot, and grid the overlay's own renders to measure where things actually landed — text bounds, collisions, margins, centring. Use for every overlay composition, whether or not it's tied to footage. metadata: tags: remotion, overlay, layout, measurement, compositing, verification

When to use

Every overlay. Estimating positions is the most common way these compositions go wrong, and a grid replaces the estimate with a measurement. That covers two situations, which often come up in the same build:

  1. Graphics that must line up with something in the footage — a hat on a head, a prop in a hand, an arrow at an object, a label on a product. Grid the footage frame.
  2. Any overlay at all, including ones with no footage — grid your own renders to see where elements really are. Font metrics, letterSpacing, textAnchor, stroke widths and rotations all move things away from where the code suggests.

Real misses from this project that a grid catches immediately:

  • IdentityShell — the word was assumed to start at x≈460. Gridded, RUNNER spans x 330–1597, so the crack origin and bounds were 125px short and the first letter never cracked.
  • UnattachedGate — a gate swing arc drawn from assumed geometry ran straight through the JOY label.

Pair with remotion-house-style for brand, export settings, folders and naming, and for its propose-first rule. This skill covers where things go and proving it.

The rule

Never estimate a position. Read it off a grid, then prove it on a grid. Images shown in chat are downscaled, and code-level geometry isn't where the pixels end up, so "looks about right" is routinely 50–150px out. Don't report a layout or placement you haven't seen on a gridded render.

Run everything from the Remotion project directory and keep review files in out/checks/<composition>/ (gitignored). Scripts need Python 3 with Pillow.

1. Get a reference image

  • Your own render (always available): render in composition pixels —
    npx remotion still <CompositionId> out/checks/<name>/still-<frame>.png --frame=<frame> --scale=1
    
    --scale=1 matters: the project renders at 2x by default, which would put every coordinate at double.
  • A pasted screenshot of footage. The attachment note gives its original size (e.g. original 2158x1208); find the file by exact dimensions:
    mdfind "kMDItemPixelWidth == 2158 && kMDItemPixelHeight == 1208"
    
    macOS screenshots usually land on the Desktop.
  • A clip. No system ffmpeg here, but Remotion bundles one:
    npx remotion ffmpeg -y -ss <seconds> -i <clip.mp4> -frames:v 1 out/checks/<name>/source.png
    
    It prints a version-mismatch banner first; that's noise, go by the exit code.
  • Footage needed but not available — ask for it. Don't place off the chat image.

2. Grid it

# Whole frame, labelled every 100px:
python3 .claude/skills/overlay-coordinate-grid/scripts/grid.py <image> out/checks/<name>/grid.png

# Zoomed, finer grids on the areas that need precision:
python3 .claude/skills/overlay-coordinate-grid/scripts/grid.py <image> out/checks/<name>/grid.png \
  --region head=720,0,1240,330,25,2 --region hands=420,840,1520,1080,50,1 \
  --save-normalised out/checks/<name>/frame.png
  • Every label is in composition pixels (the image is normalised to --size, default 1920x1080), so numbers go straight into code.
  • A region is NAME=x0,y0,x1,y1[,step[,zoom]]. Grid the whole frame first to find the area, then tighten the box and raise the zoom.
  • Transparent renders are flattened onto --background (dark by default; use light when checking dark elements).
  • --save-normalised keeps a resized copy of a footage frame to composite onto later.
  • It warns when the source aspect ratio is more than 1% off target. For a screenshot that almost always means player chrome or letterboxing — crop it out first or every coordinate is skewed.

What to write down:

  • Bounds of text and shapes — the real left/right/top/bottom, not the x/y you passed in.
  • Anchor points for footage — where a graphic makes contact: crown of the hair, hairline, palm centres, thumb tips, an object's corner.
  • Tilt from a rigid feature pair. For a head, use the eyes, never the eyebrows — a raised brow reads as a 13° tilt on a head tilted 4°.
  • Scale from a known span: head width, distance between hands, an element's width.
  • Clearances between elements that mustn't touch, and to the frame edges.

3. Build with measured numbers

  • Put measured values in named constants at the top of Main.tsx, with a comment saying where they were measured ("calibrated from a render: glyphs span x 335–1590"). Re-fitting to a new shot or a copy change should be a constants edit.
  • Draw each object in its own local coordinates (centred on 0,0, lying along +x) and place it with translate(x y) rotate(angle) scale(s). Geometry stays independent of placement, and entrance animation composes onto the same transform.
  • Rotate about the point of contact, not the object's centre — the bottom of a cap's band, the hand holding a prop — or tilting lifts it off what it rests on.
  • Hand-held props sit over the thumb or palm. An overlay can't go behind a finger, so pick angles where covering the thumb reads as gripping.
  • Say whose left and right. A person facing camera has their left hand on the right of the screen. Describing a screenshot, default to screen sides, say so, and make swapping a one-line change.
  • Check rotated extents stay inside the frame.

4. Verify on a grid, then iterate

Re-render the key phases and lay them out gridded:

# Onto footage:
python3 .claude/skills/overlay-coordinate-grid/scripts/composite.py out/checks/<name>/review.png \
  out/checks/<name>/still-20.png out/checks/<name>/still-100.png \
  --base out/checks/<name>/frame.png --grid 100 --detail x0,y0,x1,y1

# No footage — over dark and light fields:
python3 .claude/skills/overlay-coordinate-grid/scripts/composite.py out/checks/<name>/review.png \
  out/checks/<name>/still-100.png --fields --grid 100
  • --grid labels tiles and detail crops in composition pixels, so a correction is read straight off the sheet rather than guessed again.
  • --detail appends full-resolution crops of the last composite, one per critical area — where you see whether a cap rests on the hair or floats, or whether a line clears a label by 4px or overlaps it.
  • --fields is also the check for white-on-transparent elements, which are invisible against a white preview.

Adjust constants from the measurements and repeat until every critical area is right.

5. For footage-anchored overlays, flag the limitation

Placement is static: it lines up only while the subject stays near the measured pose, and people move — hands most. Say so every time and offer:

  1. One overlay per anchor (head, each hand) so each can be motion-tracked independently in the edit.
  2. Keyframed anchors — extract frames across the clip, grid each, interpolate the constants over time.

Worked examples

  • src/remotion/GraduationLesson/Main.tsx — footage-anchored: a mortarboard placed from a gridded screenshot, tilted from the eye line, rotating about the band's contact point.
  • src/remotion/IdentityShell/Main.tsx — no footage: the crack field's bounding box and impact corner are measured from a gridded render of the word, not from its font size.

Du fichier au premier essai

Le téléchargement contient exactement le contenu affiché sur cette fiche. Cette copie peut différer de la dernière version du dépôt source.

Consulter la source et ses fichiers annexes

Ce téléchargement contient uniquement SKILL.md. Les scripts, références, modèles et dépendances éventuels ne sont pas inclus. Récupérez les fichiers nécessaires depuis la source en conservant leur arborescence avant de poursuivre.

1. Télécharger le fichier

Télécharger SKILL.md

Depuis la racine d’un projet de test, enregistrez le fichier sous .skill-downloads/coordinate-grid-for-remotion-overlays-mvda8745/SKILL.md, ou utilisez la commande suivante. Ce dossier sert à examiner la skill avant son installation.

Commande pour macOS/Linux ou WSL : un shell POSIX et curl sont nécessaires. Sous Windows sans WSL, utilisez le bouton de téléchargement et créez le dossier manuellement.

mkdir -p '.skill-downloads/coordinate-grid-for-remotion-overlays-mvda8745' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/coordinate-grid-for-remotion-overlays-mvda8745/download' --output '.skill-downloads/coordinate-grid-for-remotion-overlays-mvda8745/SKILL.md.part' && mv '.skill-downloads/coordinate-grid-for-remotion-overlays-mvda8745/SKILL.md.part' '.skill-downloads/coordinate-grid-for-remotion-overlays-mvda8745/SKILL.md'

2. Vérifier les prérequis

Lisez SKILL.md avant de l’utiliser. Si le fichier cite des scripts ou services externes, examinez-les et préparez les accès nécessaires dans votre environnement de test.

Aucune section de prérequis reconnue dans ce fichier. Cela ne signifie pas qu’il est autonome : les bibliothèques, outils et accès peuvent être cités ailleurs dans le contenu ou dans le dépôt source.

Les plateformes de la fiche sont des indications du catalogue. Les chemins ci-dessous suivent la documentation des outils ; ils ne prouvent pas que cette skill y a été exécutée. Aucune version minimale de ces outils n’est attestée pour cette fiche.

3. Charger la skill

Après vérification, copiez le dossier complet dans le projet avec l’une des commandes ci-dessous, puis ouvrez une nouvelle session de l’outil. La commande s’arrête si un dossier du même nom existe déjà : comparez les fichiers avant de le remplacer.

Claude Code
test -f '.skill-downloads/coordinate-grid-for-remotion-overlays-mvda8745/SKILL.md' && test -s '.skill-downloads/coordinate-grid-for-remotion-overlays-mvda8745/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/overlay-coordinate-grid' && cp -R '.skill-downloads/coordinate-grid-for-remotion-overlays-mvda8745' '.claude/skills/overlay-coordinate-grid'

OpenSkills

OpenSkills doit déjà être installé. La procédure locale install/read est contrôlée avec OpenSkills 1.5.0, qui exige Node.js ≥ 20.6.0. Aucun slug du catalogue n’est résolu automatiquement.

Installation officielle d’OpenSkills
openskills install './.skill-downloads/coordinate-grid-for-remotion-overlays-mvda8745'

openskills read 'coordinate-grid-for-remotion-overlays-mvda8745'

La lecture doit afficher le contenu du fichier installé et son dossier de base. Elle ne lance ni la skill ni ses dépendances.

Pour un agent qui lit AGENTS.md, synchronisez ensuite l’index. Cette commande modifie AGENTS.md : relisez le diff avant de l’utiliser.

openskills sync

Mode manuel ou autre outil : joignez SKILL.md à une conversation, ou ouvrez-le dans un agent capable de lire les fichiers. Ajoutez les ressources annexes nécessaires. Il n’existe pas de dossier universel reconnu par tous les outils.

4. Faire un premier essai

Utilisez une entrée courte et fictive : un endpoint d’API, un petit document ou un brief d’interface. Dans une nouvelle conversation, joignez le fichier ou donnez son chemin à l’agent, puis adaptez cette demande :

Lis .skill-downloads/coordinate-grid-for-remotion-overlays-mvda8745/SKILL.md et applique ses instructions à cet exemple : [décrire une entrée de test]. Indique les fichiers, dépendances ou accès qui manquent. Produis le résultat demandé par la skill sans inventer de données ni exécuter de script non examiné.

Résultat attendu : une sortie correspondant aux instructions de la skill, ou une liste précise des prérequis manquants. Une simple confirmation de lecture ne valide pas le premier usage. Si une ressource externe est indisponible, ce parcours reste à tester.

Skills similaires