Skip to content

feat: add flows-diagram skill - #2

Merged
mama-samba-braima merged 1 commit into
mainfrom
feature/flows-diagram
Jul 31, 2026
Merged

feat: add flows-diagram skill#2
mama-samba-braima merged 1 commit into
mainfrom
feature/flows-diagram

Conversation

@mama-samba-braima

Copy link
Copy Markdown
Contributor

Migrates the animated backend flow-diagram pipeline (previously a local-only project in ~/flows) into this repo as a first-class, installable skill.

What landed

skills/flows-diagram/
├── SKILL.md / README.md / install.sh / config.default.json
├── scripts/   make.mjs, gen-vo.mjs, vo-align.mjs, caption-render.mjs, paths.mjs
├── assets/    logo-mark.svg, wordmarks, template/ (animations.jsx + example-scene.jsx)
└── references/ pipeline.md, scene-contract.md, voiceover-captions.md

One scene renders to a 1440x1440 square MP4, a 960x960 looping GIF, and a 1080x1920 branded reel, then optionally an ElevenLabs voiceover with word-by-word captions, caption.txt, and title.txt.

Portability changes over the original local project

  • No hardcoded /Users paths. The purple brand mark used to load from ~/Documents/amigoscode 2.0/logo.svg; it is now bundled at assets/logo-mark.svg.
  • Chrome auto-detected across the usual macOS and Linux locations, with CHROME_PATH to override (was a hardcoded macOS app path in two scripts).
  • React + Babel fetched into .cache/ on first render (pinned react 18.3.1, @babel/standalone@^7) instead of relying on 3 MB of vendored files.
  • Diagrams live in a workspace outside the skill, so updating the skill never touches user work. Resolution order: FLOWS_DIRworkspaceDir in ~/amigoscode-skills/flows-diagram-config.json~/flows (the original location, so existing work keeps rendering) → ~/amigoscode-skills/flows.
  • ELEVEN_LABS resolves from the environment, the skill .env, then ~/.env (was ~/.env only, and it crashed if that file did not exist). Voice id, model, and voice settings now come from config.default.json.
  • Scratch frames now land in $FLOWS/.work/<outBase> rather than inside the skill folder.

Not migrated (deliberately)

The 26 finished diagrams (~100 MB of generated MP4/GIF/MP3) stay out of git. Their tuned CROP_TOP/CROP_BOTTOM render matrix is preserved in references/pipeline.md, and replication-flow ships as the scene template.

Verification

  • bash validate-skills.sh → 8/8 skills valid
  • node .github/scripts/sync-skills.js → README table regenerated
  • Smoke test from the ported skill against a scratch workspace: MODE=check frame renders with correct branding, then a full render produced smoke.mp4 (536 KB), smoke.gif (4.1 MB), and smoke-reel.mp4 (454 KB), with scratch auto-cleaned
  • Key/config/workspace/Chrome resolution verified via paths.mjs (no API call, no key printed)

The voiceover and caption composite steps are unchanged code and were not exercised against the ElevenLabs API in this PR.

🤖 Generated with Claude Code

https://claude.ai/code/session_01KoB1R6ZCYGe5PGG3SHx98r

Migrate the animated backend flow-diagram pipeline into the skills repo as a
first-class, installable skill.

- scripts/: make.mjs (square MP4 + looping GIF + branded reel), gen-vo.mjs,
  vo-align.mjs, caption-render.mjs, plus a shared paths.mjs resolver
- assets/: brand logo mark + wordmarks, and the scene template (animations.jsx
  + example-scene.jsx) copied per diagram
- references/: pipeline contract, scene contract, voiceover/caption docs

Portability changes over the original local project:
- no hardcoded /Users paths; the logo mark is bundled in assets/
- Chrome is auto-detected (macOS + Linux), CHROME_PATH overrides
- React + Babel are fetched into .cache/ on first render instead of vendored
- diagrams are authored in a workspace outside the skill (FLOWS_DIR, then
  config workspaceDir, then ~/flows, then ~/amigoscode-skills/flows), so
  updating the skill never touches user work
- ELEVEN_LABS resolves from env, the skill .env, or ~/.env; voice and voice
  settings come from config.default.json

Registered in README, VERSIONS.md, plugin.json, and marketplace.json.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KoB1R6ZCYGe5PGG3SHx98r
@mama-samba-braima
mama-samba-braima merged commit acf54fc into main Jul 31, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant