Skip to content
salvador logo

Salvador Agent

salvador

Autonomous p5.js visualization agent. It implements, inspects, critiques design/UX, fixes, and launches the result.

mattnigh/skills_collection0installs24stars

SKILL.md

Full skill instructions

Salvador Agent

Use this skill to visualize concepts using p5.js with a focus on high-quality UX, aesthetics, and continuous motion.

Workflow

Follow this strict loop when asked to visualize a concept:

Phase 1: Bootstrap

  1. Check Context: If package.json is missing, run bash .claude/​skills/​salvador/​scripts/​setup.sh.
  2. Scaffold: Ensure index.html and src/​main.js exist.
  3. Read p5.js Reference: Read resources/​p5-missing-knowledge.md for p5.js 2.x API changes before writing any code.

Phase 1.5: Concept Analysis (Before Coding!)

This visualization needs to teach and reflect the concept that I was asked to visualize. Therefore, make sure to include details so the user (who can be a child, adult, expert, or novice) can understand the concept well.

Before writing any code, decompose the concept:

  1. Research the Domain: Look up the actual facts (angles, counts, formulas, rules)

    • Don't guess scientific/​mathematical details
    • Get the real values (e.g., H2O bond angle is 104.5°, not "about 109°")
  2. Break Into Stages: Most concepts can be shown as a progression:

    • What is the "before" state?
    • What are the intermediate transformation steps?
    • What is the "final" state?
    • Aim for 3-5 stages that build understanding
  3. Identify Dynamic Elements: What moves in this system?

    • Do NOT make a visualization of a static snapshot, everything moves in the Universe
    • Even if the concept has "stages," the actors must be alive (e.g., electrons orbiting, atoms vibrating, lists scanning).
    • be DETAILED. for example if certain electrons will be bonding, find out which ones (e.g., certain valence electrons) and highlight them visually. this of course does not just apply to Chemistry, but to any domain (e.g., in sorting algorithms, show which elements are being compared/​swapped at each step)
  4. Identify What Needs Explanation: What text/​labels/​diagrams would help?

    • Key terms to define
    • Quantities to show
    • Relationships to highlight

Phase 1.6: Stage Design Principles

  1. Living Systems: The system must breathe.

    • Idle Animation: Even when waiting for user input, nothing should be perfectly frozen.
    • Continuous Time: Use draw() to animate physics/​logic continuously. noLoop() is forbidden.
  2. Granular Transitions: Never skip the "moment of change"

    • BAD: "state A" → "state B" (viewer misses the transformation)
    • GOOD: "state A" → "approaching change" → "moment of change" → "state B"
    • Rule: if two stages feel like a big jump, add an intermediate stage
    • Examples:
      • Sorting algorithm: show each comparison/​swap, not just "unsorted → sorted"
      • Chemical bond: show atoms approaching before showing them bonded
      • Mathematical proof: show each logical step, not just premise → conclusion
  3. Trackability: When elements transform or move, viewers must follow them

    • Assign distinct colors to individual components at the start
    • Maintain those colors through all stages
    • Link details, configurations, numbers, strings, etc.. visually to their representations
    • Make it obvious which element went where, became what, or combined with whom
    • Examples:
      • In a merge sort: color the two halves differently so viewer tracks them through merges
      • In a state machine: color each state and show transitions with matching colors
      • In molecular bonding: color each atom's electrons to show which ones get shared
  4. Data Cards: Show the underlying facts, not just the visual

    • Include domain notation (formulas, equations, configurations, pseudocode)
    • Display quantities, measurements, and labels using proper terminology
    • Cards can appear/​disappear based on stage relevance
    • Examples:
      • Physics: show F=ma card when demonstrating force
      • Music: show chord notation (Cmaj7) alongside the visual
      • Chemistry: show electron configuration (1s² 2s² 2p⁴)
      • Algorithms: show Big-O complexity or current array state

Phase 2: Autonomous Loop (The "Work")

Repeat this cycle until the visualization is High Quality:

  1. Implement/​Refine: Write src/​main.js.
    • Constraint: Use a modern color palette (avoid default pure RGB).
    • Constraint: For conceptual visualizations, use progressive revelation:
      • Build an interactive stepper (← →) through stages
      • Show info panels/​cards explaining each stage
      • Critical: Animate transitions between states (slide/​flow/​morph)
    • Constraint: Continuous Motion: Ensure draw() runs continuously. Even in a "Step 1" static state, show micro-movements (vibration, orbit, pulse).
    • Constraint: Include educational elements:
      • Labels for key components
      • Brief text descriptions of what's happening
      • Visual indicators (badges, diagrams) for important values
    • Constraint: Use domain-accurate values, not approximations
    • Constraint: Ensure text is readable and has high contrast.
    • Constraint: Support interactions (mouse drag, click, or keyboard shortcuts).
    • Constraint: Canvas sizing: Use 850x540 or smaller to fit without scrolling
    • Constraint: Keyboard handling: Use window.addEventListener('keydown') for arrow keys (and map 'G' to saveGif).
    • Constraint: Track elements visually: Color-code components that transform and maintain those colors throughout all stages.
  2. Inspect: Run node inspect.js
  3. Critique:
    • Logs: Are there errors?
    • Visuals: Open snapshot.png and strictly evaluate:
      • Life Check: Is it moving? (Reject if it looks like a static slide).
      • Composition: Is the content centered? Is it cut off?
      • Legibility: Is there text overlap? Is the font size appropriate?
      • Aesthetics: Does it look "engineered" or "designed"? (Aim for designed).
      • UX: Did I implement user controls (e.g., "Press 'R' to reset")?
  4. Decide:
    • Errors? -> Fix code -> Repeat.
    • Static/​Boring? -> Add Micro-Movement (vibration, orbits) -> Repeat.
    • Physics/​Logic Broken? (e.g. Gravity creates energy, sorting fails) -> Fix Simulation Logic -> Repeat.
    • Missing Educational Context? -> Add Labels/​Data Cards -> Repeat.
    • Amazing, Dynamic & Physically Accurate? -> Proceed to Phase 3.

Phase 3: Presentation (The "Reveal")

Once the loop is complete and the visualization is polished:

  1. Launch: Run npx vite --open.
  2. Notify: Tell the user "Visualization is ready. Controls: [List controls here]."

More skills from mattnigh

spring-framework-patterns logo
mattnigh/skills_collection

spring-framework-patterns

Comprehensive Spring Framework and Spring Boot best practices including dependency injection patterns, bean lifecycle and scopes, REST API development, Spring Data JPA, service layer design, Spring Security, testing strategies, caching, AOP, async processing, error handling, and common anti-patte...

24 0
View

TypeScript厳格モードによる型安全性設計を専門とするスキル。 📖 参照書籍: - 『Effective TypeScript』(Dan Vanderkam): 型設計 📚 リソース参照: - `resources/Level1_basics.md`: レベル1の基礎ガイド - `resources/Level2_intermediate.md`: レベル2の実務ガイド - `resources/Level3_advanced.md`: レベル3の応用ガイド - `resources/Level4_expert.md`: レベル4の専門ガイド - `resources/di...

24 0
View
deploying-cloud-k8s logo
mattnigh/skills_collection

deploying-cloud-k8s

Deploys applications to cloud Kubernetes (AKS/GKE/DOKS) with CI/CD pipelines. Use when deploying to production, setting up GitHub Actions, troubleshooting deployments. Covers build-time vs runtime vars, architecture matching, and battle-tested debugging.

24 0
View
moai-alfred-agent-guide logo
mattnigh/skills_collection

moai-alfred-agent-guide

19-agent team structure, decision trees for agent selection, Haiku vs Sonnet model selection, and agent collaboration principles. Use when deciding which sub-agent to invoke, understanding team responsibilities, or learning multi-agent orchestration.

24 0
View
mermaid-diagram-generator logo
mattnigh/skills_collection

mermaid-diagram-generator

Converts architecture descriptions, module specs, or workflow docs into Mermaid diagrams. Use when visualizing brick module relationships, workflows (DDD, investigation), or system architecture. Supports: flowcharts, sequence diagrams, class diagrams, state machines, entity relationship diagrams,...

24 0
View
pre-flight-check logo
mattnigh/skills_collection

pre-flight-check

INVOKE FIRST before any code work. Validates git workflow (branch, issue, worklog) and checks approach. Use at START of every task and END before completing. Prevents skipped steps.

24 0
View
browser-dev-tools logo
mattnigh/skills_collection

browser-dev-tools

This skill should be used when working with browser-rendered artifacts (i.e. Bun, React/React Native) to proactively validate that development work on localhost is being built appropriately and to support debugging browser-rendered content. Use this skill after making frontend changes to verify t...

24 0
View
lead-dev logo
mattnigh/skills_collection

lead-dev

Lead Développeur - Coordination technique opérationnelle, code review, mentoring et livraison. Pair de web-dev-process au niveau OPÉRATIONS.

24 0
View
worker-monitor logo
mattnigh/skills_collection

worker-monitor

Monitor Docker workers, RQ queue health, and auto-scale workers (max 4). Use when: checking job progress, monitoring queue depth, scaling workers up/down, diagnosing slow processing, or waiting for jobs to complete. Referenced by data-quality skill during reprocessing.

24 0
View
quality-advisor logo
mattnigh/skills_collection

quality-advisor

Proactive quality guidance system that monitors artifact creation and provides real-time feedback on documentation quality

24 0
View
bump-version logo
mattnigh/skills_collection

bump-version

This skill should be used when the user wants to bump the version number in the workspace. It updates versions across all pyproject.toml files (root, tde, and tda packages) and the CHANGELOG.md to keep them synchronized.

24 0
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View