Communitygithub.com

Varnan-Tech/opendirectory

Creates animated looping GIFs from CSS animations (default) or AI image-to-video. 800×800px default, 6 animation types, 4 style presets. Trigger when user says "create an animated gif", "make a looping gif", "animated banner", "CSS animation gif", "social media animation", "make this loop", "animated graphic", or "motion graphic".

What is opendirectory?

opendirectory is a Claude Code agent skill that creates animated looping GIFs from CSS animations (default) or AI image-to-video. 800×800px default, 6 animation types, 4 style presets. Trigger when user says "create an animated gif", "make a looping gif", "animated banner", "CSS animation gif", "social media animation", "make this loop", "animated graphic", or "motion graphic".

Works with✓Claude Code~Codex CLI✓Cursor✓Gemini CLI
npx skills add https://github.com/Varnan-Tech/opendirectory/tree/main/skills/graphic-gif

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

graphic-gif

Generates an animated looping GIF from CSS animations or an AI image-to-video API. Output: animation.gif.

Unlike every other graphic- skill that outputs a static PNG or PDF, this skill outputs an animated .gif. Uses CSS @keyframes animations captured frame-by-frame via Playwright and the Web Animations API (Option A, default), or an AI image-to-video pipeline via Kling (Option B).


Critical Rules (read before every generation)

  1. Default is css-animated. Never use ai-generated unless explicitly requested.
  2. Canvas is 800×800px square. All clamp() values computed at 800px (1vw = 8px).
  3. Single self-contained HTML. All CSS inline in <style>. Font CDN <link> only external dependency.
  4. Never dump HTML in chat. Save to file, show summary only.
  5. Frame capture uses Web Animations API seeking. NOT setTimeout loops, NOT animation-delay tricks.
  6. Exact frame count: Math.floor(duration_seconds * fps) frames. The frame at t=duration_ms MUST NOT be captured — it duplicates t=0 and causes a visible stutter at the loop point.
  7. No placeholder boxes. CSS-generated visuals only. No "image goes here" elements.
  8. Simpler palettes = smaller files. Use: clean-slate, terminal, electric-burst, brutalist.
  9. No animation-delay for stagger. Bake stagger into @keyframes percentages — frame seeking handles timing.
  10. Commit to design direction before writing CSS. Tone, signature element, motion style, unforgettable detail — all decided before first line of code.

Step 1: Intake

Required: prompt (content description AND motion brief)

Optional with defaults:

ParameterDefaultOptions
animation_typecss-animatedcss-animated / ai-generated
duration3.0seconds
fps12frames per second
looptruetrue / false
styleclean-slateclean-slate / terminal / electric-burst / brutalist
dimensions800x800WxH in pixels
optimizationbalancedquality / balanced / filesize

If prompt is missing or lacks motion description, ask exactly:

"What should the GIF show? Describe the content AND the motion (e.g., 'Stats count up: 73% of buyers read 3+ pieces of content before purchase. Typewriter effect, one character at a time. Style: terminal. 3 seconds, 12fps.')

Key settings (all optional, defaults shown):

  • animation_type: css-animated (default) or ai-generated
  • duration: 3.0 seconds
  • fps: 12
  • loop: true
  • style: clean-slate (options: clean-slate / terminal / electric-burst / brutalist)
  • dimensions: 800x800
  • optimization: balanced (options: quality / balanced / filesize)"

If all required info is present → skip directly to Step 2.


Step 2: Internal Architecture (never shown to user)

For css-animated:

  1. Choose animation type from: fade-in, slide-in, typewriter, counter, pulse, loop-scroll
  2. Read references/animation-library.md — find the chosen type's full HTML/CSS spec
  3. Read references/style-presets.md — load the chosen style's CSS token block
  4. Calculate frame count: Math.floor(duration_seconds * fps) — write this number down
  5. Commit to design direction:
DecisionDerive from
ToneEmotional register for audience (mechanical / warm / electric / professional)
Signature elementONE visual device used consistently (cursor blink, ghost number, scan-line overlay, accent border)
Motion styleEase curve philosophy for this type (spring / linear / step / ease-in-out)
Unforgettable detailThe ONE thing a viewer will remember about this GIF

For ai-generated:

  1. Generate base still frame HTML (poster-style layout for the canvas)
  2. Export as PNG using screenshot
  3. Call Kling API: POST https://api.klingai.com/v1/videos/image2video with image_url and prompt describing the motion
  4. Poll for job completion
  5. Download video → convert to GIF with ffmpeg:
    # Two-pass palette for best color quality
    ffmpeg -i input.mp4 -vf "fps=12,scale=800:800:flags=lanczos,palettegen=stats_mode=diff" palette.png
    ffmpeg -i input.mp4 -i palette.png -vf "fps=12,scale=800:800:flags=lanczos,paletteuse=dither=bayer:bayer_scale=5" output.gif
    

Step 3: HTML Generation (css-animated path)

Read references/animation-library.md and references/style-presets.md before generating.

Canvas base — required on every GIF:

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
  width: 800px;
  height: 800px;
  overflow: hidden;
  background: var(--bg);
  font-family: var(--font-body);
}

.canvas {
  width: 800px;
  height: 800px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

Animation rules:

  • animation-fill-mode: forwards (or both) on ALL animated elements
  • Timing functions per type:
    • typewriter → steps(N, end) where N = exact character count
    • counter → linear
    • fade-in → cubic-bezier(0.22, 1, 0.36, 1) (ease-out)
    • slide-in → cubic-bezier(0.34, 1.56, 0.64, 1) (spring overshoot)
    • pulse → ease-in-out with animation-iteration-count: infinite
    • loop-scroll → linear with animation-iteration-count: infinite
  • For one-shot animations (fade-in, slide-in, typewriter, counter): animation-iteration-count: 1 — looping happens at GIF level
  • No animation-delay — stagger is baked into @keyframes percentages

Typewriter N calculation: Count every character including spaces, punctuation, numbers:

  • "73% of buyers" = 14 characters → steps(14, end)
  • "Hello, World!" = 13 characters → steps(13, end)

Counter CSS @property (required for counter type):

@property --num {
  syntax: '<integer>';
  inherits: false;
  initial-value: 0;
}
.counter {
  animation: countUp var(--duration) linear forwards;
  counter-reset: num var(--num);
}
.counter::after { content: counter(num); }
@keyframes countUp {
  from { --num: 0; }
  to   { --num: var(--target); }
}

Loop-scroll: content MUST be duplicated:

<!-- 4 original items + 4 duplicate items -->
<div class="ticker-track" style="--item-count: 4;">
  [item1][item2][item3][item4][item1][item2][item3][item4]
</div>

translateX(0 → -50%) with linear infinite.

Design quality rules (from commit in Step 2):

  • Named signature element MUST be present in CSS/HTML (not just described)
  • Typography: weight contrast minimum 2:1 (e.g., 700 vs 400) between display and supporting text
  • Background: no pure white #fff for dark styles — use the preset's exact --bg value
  • For terminal style: add scan-line overlay ::after with repeating-linear-gradient at opacity: 0.03
  • For brutalist: thick border 4px solid #000 or 4px solid var(--accent) on key element
  • Unforgettable detail: if it requires an extra element — add it now

Step 4: Self-QA (fix every failure before Step 5)

Canvas:

  • body and .canvas exactly 800×800px (or specified dimensions)
  • overflow: hidden on both body and .canvas
  • No elements overflowing the canvas boundary

Animations:

  • NO animation-delay anywhere — stagger is in @keyframes percentages
  • All animations start at t=0 (Web Animations API will seek from there)
  • animation-fill-mode: forwards or both on all animated elements
  • One-shot animations: animation-iteration-count: 1
  • Infinite animations (pulse, loop-scroll): animation-iteration-count: infinite

Type-specific checks:

  • Typewriter: N in steps(N, end) = exact character count of text string
  • Counter: @property --num declared with syntax: '<integer>' and initial-value: 0
  • Counter: counter-reset: num var(--num) and ::after { content: counter(num) }
  • Loop-scroll: content duplicated exactly once in HTML

Design:

  • No placeholder boxes
  • Style preset tokens applied from references/style-presets.md — no free-floating hex colors
  • Signature element named in Step 2 is actually present in the HTML/CSS
  • Unforgettable detail from Step 2 is actually implemented
  • Font CDN <link> present for chosen style's font

Step 5: Export

Determine slug from prompt (kebab-case, ≤30 chars). Create output directory:

mkdir -p [slug]

Save HTML:

[slug]/animation.html

Open in browser for quick visual check:

open [slug]/animation.html

Run export script (replace [skill-root] with the actual path to this skill):

bash [skill-root]/scripts/export-gif.sh \
  [slug]/animation.html \
  [slug]/animation.gif \
  --duration [duration] \
  --fps [fps] \
  [--no-loop if loop=false] \
  --optimization [optimization] \
  --width [W] \
  --height [H]

The script:

  1. Installs gifenc, sharp (or jimp), and playwright in a temp directory
  2. Downloads Chromium if not cached
  3. Runs capture-and-encode.mjs — pauses animations, seeks each frame, screenshots, assembles GIF
  4. Runs gifsicle optimization pass if available
  5. Reports file size and opens result

If export script not found at [skill-root]/scripts/export-gif.sh, check that the skill was installed with its scripts/ folder intact.


Step 6: Output Summary

Show after successful export:

## GIF: [1-line description]
Date: [YYYY-MM-DD] | Style: [style] | Animation: [type] | [duration]s @ [fps]fps
Dimensions: [WxH] | Frames: [N] | Loop: [true/false]

Files
  Source:   [slug]/animation.html
  Output:   [slug]/animation.gif
  Size:     [X] KB

Checklist
- [ ] Preview loops cleanly at start/end point (no stutter)
- [ ] Text legible at intended display size
- [ ] File size appropriate: email <500KB / social <3MB

AI-Generated Path (Option B)

Only use when animation_type: ai-generated is explicitly specified.

Requirements:

  • Kling API key in environment: KLING_API_KEY (66 free credits/day, no credit card for free tier)
  • ffmpeg installed locally for video→GIF conversion

Workflow:

  1. Generate a base still frame HTML matching the prompt (poster/graphic style at specified dimensions)
  2. Export still frame as PNG:
    # Quick screenshot via Playwright
    node -e "
      const { chromium } = require('playwright');
      (async () => {
        const browser = await chromium.launch();
        const page = await browser.newPage({ viewport: { width: W, height: H } });
        await page.goto('file://[slug]/animation.html');
        await page.screenshot({ path: '[slug]/base-frame.png' });
        await browser.close();
      })();
    "
    
  3. Upload to Kling image-to-video endpoint
  4. Convert result to GIF with ffmpeg two-pass palette
  5. Apply gifsicle optimization

When Kling is unavailable: Fall back to css-animated with a note to the user: "AI generation requires a Kling API key (KLING_API_KEY). Falling back to css-animated. Set the key to enable AI generation."


Prompt Tips (show when user asks for guidance)

"Describe motion, not just content. 'Stats count up one by one' beats 'show stats'."

"Keep it simple for file size. 1–3 animated elements and a solid background."

"Think in loops. The animation should flow invisibly from end back to start."

"Specify the animation type explicitly. typewriter and counter are the most effective for social."

✅ Good: "Create an animated GIF, css-animated, typewriter effect. Text: '73% of B2B buyers read 3+ pieces of content before contacting sales.' Each character types out one at a time. Style: terminal. 3 seconds, 12fps, loop=true."

❌ Bad: "make an animated gif of marketing tips"

Individual skills in this repo

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

Varnan-Tech/opendirectory

Use when the user asks to generate a blog cover image, thumbnail, or article header. Automatically uses modern typography, brand logos, and Google Search grounding to create beautiful 16:9 images with Gemini 3.1 Flash Image Preview.

Varnan-Tech/opendirectory

World-class brand strategist and naming expert. Uses an interrogation-led discovery phase to extract your brand's DNA, then applies scientific naming frameworks (Phonosemantics) and automated multi-TLD domain checking.

Varnan-Tech/opendirectory

Use when the user asks to generate or update a project's CLAUDE or AGENTS context file from a codebase scan. Writes a focused file under 100 lines containing only the non-obvious build commands, conventions, and gotchas Claude Code needs.

Varnan-Tech/opendirectory

Use when the user wants to verify cold emails, enrich a lead list, or autonomously guess email addresses from a CSV using ValidEmail.co or the open-source Reacher engine.

Varnan-Tech/opendirectory

Competitive intelligence orchestrator tracking companies across 8+ platforms (GitHub, Twitter, Reddit, HN, PH, YC Jobs) with heat scores and AI briefings.

Varnan-Tech/opendirectory

Give it your product URL or description. It finds your top 5 competitors, runs three-track PR research across all of them (editorial, podcasts, communities), identifies which channels appear most frequently, looks up the journalist or host for each, and returns a tiered outreach list with story angles and ready-to-send cold pitch drafts tailored to your product. Use when asked to find PR opportunities, discover where competitors got featured, build a media outreach list, find which journalists cover my space, or get pitch templates for press coverage.

Varnan-Tech/opendirectory

Generate high-converting, deep-dive growth case studies in MDX format. Use this skill when asked to write a case study or blog post about a company's growth, tech stack, or product-led strategy. It handles the full pipeline (researching the company via Tavily, generating a 16:9 cover image, quality checking the draft, uploading assets to cloud storage, and pushing directly to the target repository).

Varnan-Tech/opendirectory

Scans your project for outdated npm, pip, Cargo, Go, or Ruby packages. Runs a CVE security audit. Fetches changelogs, summarizes breaking changes with Gemini, and opens one PR per risk group (patch, minor, major). Includes Diagnosis Mode for install conflicts. Use when asked to update dependencies, check for outdated packages, open dependency PRs, scan for package updates, audit for CVEs, or flag breaking changes in upgrades. Trigger when a user says "check for outdated packages", "update my dependencies", "open PRs for dependency updates", "scan for CVEs", or "which packages need upgrading".

Varnan-Tech/opendirectory

Generates and updates README.md and API reference docs by reading your codebase's functions, routes, types, schemas, and architecture. Uses graphify to build a knowledge graph first, then writes accurate docs from it. Use when asked to write docs, generate a README, document an API, update stale docs, create an API reference from code, add an architecture section, or document a project in any language. Trigger when a user says their docs are missing, outdated, or wants to document their codebase without writing it manually.

Varnan-Tech/opendirectory

Evaluates expired domain candidates against a target niche, scores them by topical relevance, historical activity level, and history cleanliness, then outputs a ranked shortlist with explainable reasoning and risk flags.

Varnan-Tech/opendirectory

Brutally honest developer-experience audit for a GitHub repo. Scores 10 DX dimensions (time-to-first-success, README clarity, visual proof, install, quick-start, docs, examples, community, trust, marketing), writes a shareable roast in the requested tone (brutal/honest/kind), produces a prioritized action plan ranked by impact × effort, and sketches an ideal README. Trigger when user says "roast my repo", "audit my README", "dx audit", "developer experience review", "score my GitHub project", "before launch checklist", or "make my repo shareable".

Varnan-Tech/opendirectory

Drafts and designs a complete HTML email newsletter from a topic or content brief. Outputs paste-ready HTML for Loops, Mailchimp, Beehiiv, Resend, or any standard email platform. Includes subject line options and plain-text fallback. Trigger when a user says "write a newsletter", "draft an email newsletter", "create an HTML email", "design an email for my subscribers", or "write a newsletter about [topic]".

Varnan-Tech/opendirectory

Takes a GitHub PR URL or the current branch and writes a plain-English explanation of what it does and why, then posts it as a PR comment. Use when asked to explain a PR, summarize a pull request, write a plain-English description of a PR, add a summary comment to a PR, or understand what a PR changes. Trigger when a user says "explain this PR", "summarize this pull request", "what does this PR do", "add a comment explaining the PR", or shares a GitHub PR URL and asks what it does.

Varnan-Tech/opendirectory

Audit how often LLMs recommend your brand vs competitors and generate a GEO action plan.

Varnan-Tech/opendirectory

Takes a competitor's public GitHub repo URL, fetches their open issues via the GitHub REST API, filters noise locally, clusters issues into 6 demand categories, computes a demand score per issue and per cluster, and outputs a ranked demand gap report with a GTM messaging brief. Use when asked to scan a competitor's GitHub issues, find what their users are begging for, turn GitHub complaints into product positioning, identify competitor feature gaps, or generate messaging from real user demand. Trigger when a user says "scan competitor issues", "what are users asking for on X repo", "find demand gaps in Y", "turn GitHub issues into messaging", or "what should I build based on competitor complaints".

Varnan-Tech/opendirectory

Find recurring confusion in your repo's GitHub Discussions, rank it by urgency, and draft the actual docs fixes and content angles — with verbatim community quotes and source links as evidence.

Varnan-Tech/opendirectory

SEO keyword research workflow for blog generation using Google Trends data. Use when writing blog posts, planning content calendars, or optimizing articles for search engines. Finds breakout keywords, builds content structure, and generates SEO-optimized blog outlines targeting tech and developer audiences.

Varnan-Tech/opendirectory

Generates a professionally designed case study PDF for B2B SaaS sales and marketing. Supports 7 page layouts, 9 style presets, 1-4 page output. Trigger when user says "create a case study", "write a customer story", "make a case study PDF", "design a success story", "turn this customer win into a PDF".

Varnan-Tech/opendirectory

Generates data visualization charts (bar, line, area, pie, doughnut, scatter, radar, treemap) as PNG using Apache ECharts v6. 1080×1080px default, 5 style presets, highlight annotations. Trigger when user says "create a chart", "visualize data", "make a bar chart", "line graph", "pie chart", "data visualization", "chart this data", "plot", "graph", or "visualize these numbers".

Varnan-Tech/opendirectory

Fetches low-star App Store and Google Play reviews, clusters them into broken-promise patterns, and generates a ranked copy brief with positioning opportunities.

Related Skills