Graph Animation (graph)
┌──────────────────────┐
│ Followers │ plain label
│ 100,000 │ counts up with the tip of the line
│ • │
│ / │ smooth line draws itself
│ ___/ │
│ ______---- │
│ Jan Feb ... Sep │
└──────────────────────┘
Setup Check
SKILL_DIR is the directory containing this SKILL.md file (check the path in <skills>).
SKILL_DIR="$(python3 -c 'import os,sys; print(os.path.realpath(sys.argv[1]))' "<directory containing this SKILL.md>")"
KIT="$(python3 -c 'import os,sys; print(os.path.realpath(os.path.join(sys.argv[1], "..", "..", "kit")))' "$SKILL_DIR")"
[ -s "$KIT/vendor/gsap.min.js" ] || bash "$KIT/setup.sh"
Requires ffmpeg, node (18+), and python3 (3.9+).
Steps
- Gather real numbers. Get the data points from the user (or screenshot), oldest first. Never invent factual data; if they only provide a start and end, ask for intermediate points or explicitly state that the curve is illustrative.
- Write the spec. Create
<name>.graph.jsonin the target working folder using the schema below. - Validate first. Run:
Fix any validation errors before rendering.python3 "$SKILL_DIR/build.py" <name>.graph.json --check - Render. Run:
Takes ~10 seconds and outputspython3 "$SKILL_DIR/build.py" <name>.graph.json<name>.graph.mp4(1080x1920, 30 fps) and<name>.graph.sheet.jpg. For a fast single-frame preview first, use--snap 3.5. - Visual QA (Required). Inspect
<name>.graph.sheet.jpgusingread_file:- The big counter fits on a single line without clipping.
- The curve and x-axis labels stay inside the red Instagram safe-area box.
- The final frame displays the exact final value. If anything clips or wraps awkwardly, adjust the spec and re-render.
- Hand over. Return clickable links to the
.mp4and.sheet.jpg.
Spec Schema
{
"label": "Followers",
"values": [1.2, 2.1, 3.4, 5, 9, 24, 51, 78, 100],
"labels": ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep"],
"final": 100000,
"prefix": "",
"suffix": "",
"decimals": 0,
"dark": false
}
values(required): Array of 2+ numbers (>= 0, at least one> 0). The highest value touches the top gridline.labels(optional): One string per point under the x-axis. If more than 12, every second label is displayed.final(optional): Final displayed number. The counter scalesvaluesbyfinal / values[-1]. Omit to count in rawvaluesunits.prefix,suffix,decimals: Formatting such as"$","%"," kg". The font auto-shrinks for long numbers.dark:truefor white line on black background;falsefor black on white.hold(optional): Extra seconds to hold on the final frame.out(optional): Custom output.mp4path.
Taste Rules
- One number, one line. Use a plain noun for
label("Followers", "Monthly revenue"), never a slogan. - No callout badges, no "83x growth!" chips, and no marketing clutter.
- Late-accelerating curves look best visually, but always stay truthful to the real data shape.