add-media-mmw
Add images, diagrams, and video embeds to an existing blog post.
What this skill does
<references>
<reference name="media-guide" path="references/media-guide.md" />
</references>
<purpose>
You are adding rich media -- diagrams, images, and video embeds -- to an existing blog post. Analyze the post for visual opportunities, then work through each one with the user.
</purpose>
<steps>
<step id="load-config" number="1">
<description>Load Configuration</description>
<load-config>
<action>Resolve the user's home directory.</action>
<command language="bash" output="home" tool="Bash">echo $HOME</command>
<constraint>Never pass `~` to the Read tool.</constraint>
<read path="<home>/.things/config.json" output="config" />
<if condition="config-missing">Tell the user: "Run `/things:setup-things` first." Then stop.</if>
<read path="<home>/.things/mark-my-words/preferences.json" output="preferences" />
<if condition="preferences-missing">Tell the user: "Run `/setup-mmw` first." Then stop.</if>
</load-config>
<action>Read `platform` from preferences.json (default to `quartz` if not set). Read the platform template from `../../platforms/<platform>.md` (relative to this skill's directory). This template defines the platform's image syntax, diagram support, and video embed conventions. Use it for all media insertion.</action>
<action>Resolve `media_dir`.</action>
<if condition="media-dir-configured">Compute the full path as `<content_root>/<media_dir>` and ensure the directory exists (`mkdir -p`).</if>
<if condition="media-dir-null">
<ask-user-question>
<question>No media directory is configured. You can still add inline content like Mermaid diagrams and video embeds. For images, would you like to:</question>
<option>Provide a one-time media directory path for this session</option>
<option>Continue without image support (diagrams and embeds only)</option>
</ask-user-question>
<if condition="user-provides-path">Use it for this session but don't update the preferences file.</if>
</if>
</step>
<step id="resolve-content-location" number="2">
<description>Resolve Content Location</description>
<if condition="source-type-remote">
<action>Check if the repo is already cloned at `<workdir>` (read `workdir` from preferences.json, default `<home>/.mark-my-words`).</action>
<if condition="not-cloned">
<command language="bash" tool="Bash">git clone --branch <repo_branch> <repo_url> <workdir></command>
</if>
<if condition="already-cloned">Pull latest changes.</if>
The content root is `<workdir>/<content_dir>/`.
</if>
<if condition="source-type-local">The content root is `<local_path>/<content_dir>/`.</if>
</step>
<step id="find-post" number="3">
<description>Find the Post</description>
<if condition="arguments-provided">
<action>Search for matching posts by:</action>
- Filename match (glob for `*<argument>*.md`)
- Title match (grep for the argument in frontmatter `title:` fields)
- Content match if no filename/title hits
</if>
<if condition="no-arguments">List the 10 most recently modified `.md` files in the content directory with their titles and dates.</if>
<if condition="multiple-matches">
<ask-user-question>
<question>Which post?</question>
Show title, date, and filename for each.
</ask-user-question>
</if>
<if condition="no-matches">Tell the user and suggest checking the filename or trying a different search term.</if>
</step>
<step id="analyze-post" number="4">
<description>Analyze the Post</description>
<action>Read the full post content and scan for visual opportunities using the detection patterns from <reference name="media-guide"/>.</action>
<validate name="diagram-candidates">Processes, architectures, workflows, decision logic, state changes, request/response flows, data models (only suggest Mermaid diagrams if the platform template indicates Mermaid support).</validate>
<validate name="image-candidates">UI references, visual concepts, results/screenshots, before/after comparisons.</validate>
<validate name="table-candidates">Comparisons, structured data, feature lists.</validate>
<validate name="video-candidates">References to talks, demos, tutorials, recordings.</validate>
<template name="visual-opportunities-output">
> **Visual opportunities found:**
>
> **"How Authentication Works" (line 24)**
> - Diagram: the login flow described here would work well as a sequence diagram
>
> **"Architecture Overview" (line 45)**
> - Diagram: the three-service architecture could be a flowchart with subgraphs
> - Image: the system diagram mentioned could be a screenshot or architecture image
>
> **"Results" (line 78)**
> - Image: before/after comparison of the dashboard redesign
>
> **"Demo" (line 92)**
> - Video: the conference talk mentioned could be embedded
</template>
<ask-user-question>
<question>What would you like to do?</question>
<option>Accept all suggestions</option>
<option>Pick and choose which ones to add</option>
<option>Add my own images/media instead</option>
<option>Skip specific suggestions</option>
</ask-user-question>
</step>
<step id="process-media" number="5">
<description>Process Media</description>
Work through each selected item one at a time.
<phase name="mermaid-diagrams" number="1">
<constraint>Only available if the platform template indicates Mermaid support (native or plugin-based).</constraint>
<action>Read the relevant section carefully.</action>
<action>Generate Mermaid diagram code following the syntax in <reference name="media-guide"/>.</action>
<action>Show the diagram code to the user for review.</action>
<ask-user-question>
<question>Does this diagram look right?</question>
<option>Looks good</option>
<option>Revise it</option>
<option>Skip this one</option>
</ask-user-question>
<if condition="diagram-approved">Use Edit to insert the diagram after the text that introduces the concept.</if>
<if condition="diagram-revision-requested">Adjust and show again.</if>
</phase>
<phase name="user-provided-images" number="2">
<action>Ask for the file path or URL and a description.</action>
<action>Generate a descriptive kebab-case filename if the original name is generic.</action>
<action>Generate concise alt text from the description.</action>
<if condition="local-file">Copy to media dir with `cp`.</if>
<if condition="remote-url">
<command language="bash" tool="Bash">curl -L -o <media_dir>/<filename> <url></command>
</if>
<action>Insert the image reference using the platform's syntax from the template (e.g., `![[filename|alt text]]` for Quartz, `` for others).</action>
<action>Place it following the placement rules in <reference name="media-guide"/>.</action>
</phase>
<phase name="web-search-images" number="3">
<action>Ask the user for the topic or description of what they're looking for.</action>
<action>Use WebSearch to find relevant images (search `site:unsplash.com <topic>` or `creative commons <topic> photo`).</action>
<action>Present 2-3 options with descriptions.</action>
<action>Download the selected image.</action>
<command language="bash" tool="Bash">curl -L -o <media_dir>/<descriptive-filename> <url></command>
<action>Generate alt text and insert the reference using the platform's image syntax.</action>
<constraint>Always include alt text describing the image content.</constraint>
</phase>
<phase name="ai-generated-images" number="4">
<constraint>Only offer this if `ai_image_generation: true` in preferences.json.</constraint>
<action>Check if image generatiRelated in Image & Video
watch
IncludedWatch a video (URL or local path). Downloads with yt-dlp, extracts auto-scaled frames with ffmpeg, pulls the transcript from captions (or Whisper API fallback), and hands the result to Claude so it can answer questions about what's in the video.
physical-ai-defect-image-generation
IncludedUse when the user wants to orchestrate defect image generation, run associated setup, or handle outputs on OSMO. The Day 0 path handles cold-start with USD-to-ROI, image-edit augmentation, and AnomalyGen to create initial PCBA datasets. The Day 1 path performs inference and labeling on real images. This skill helps with first-time asset setup, creation of finetuning checkpoints, and configuring deployment. Trigger keywords: defect image generation, dig workflow, dig pipeline, defect image detection workflow, aoi pipeline, aoi anomalygen, usd2roi anomalygen, day 0 pcba, day 1 pcba, day 1 real-photo alignment, day 1 manual roi, metal surface anomaly, glass defect, anomalygen finetune, setup_pcb, setup_metal, setup_glass, setup_pretrained, dig setup, dig datasets, dig pretrained checkpoint, dig image-edit endpoint.
accelint-react-best-practices
IncludedReact performance optimization and best practices. ALWAYS use this skill when working with any React code - writing components, hooks, JSX; refactoring; optimizing re-renders, memoization, state management; reviewing for performance; fixing hydration mismatches; debugging infinite re-renders, stale closures, input focus loss, animations restarting; preventing remounting; implementing transitions, lazy initialization, effect dependencies. Even simple React tasks benefit from these patterns. Covers React 19+ (useEffectEvent, Activity, ref props). Triggers - useEffect, useState, useMemo, useCallback, memo, inline components, nested components, components inside components, re-render, performance, hydration, SSR, Next.js, useDeferredValue, combined hooks.
elevenlabs-agents
IncludedBuild conversational AI voice agents with ElevenLabs Platform using React, JavaScript, React Native, or Swift SDKs. Configure agents, tools (client/server/MCP), RAG knowledge bases, multi-voice, and Scribe real-time STT. Use when: building voice chat interfaces, implementing AI phone agents with Twilio, configuring agent workflows or tools, adding RAG knowledge bases, testing with CLI "agents as code", or troubleshooting deprecated @11labs packages, Android audio cutoff, CSP violations, dynamic variables, or WebRTC config. Keywords: ElevenLabs Agents, ElevenLabs voice agents, AI voice agents, conversational AI, @elevenlabs/react, @elevenlabs/client, @elevenlabs/react-native, @elevenlabs/elevenlabs-js, @elevenlabs/agents-cli, elevenlabs SDK, voice AI, TTS, text-to-speech, ASR, speech recognition, turn-taking model, WebRTC voice, WebSocket voice, ElevenLabs conversation, agent system prompt, agent tools, agent knowledge base, RAG voice agents, multi-voice agents, pronunciation dictionary, voice speed control, elevenlabs scribe, @11labs deprecated, Android audio cutoff, CSP violation elevenlabs, dynamic variables elevenlabs, case-sensitive tool names, webhook authentication
humanizer
IncludedHumanize AI-generated text by detecting and removing patterns typical of LLM output. Rewrites text to sound natural, specific, and human. Uses 28 pattern detectors, 560+ AI vocabulary terms across 3 tiers, and statistical analysis (burstiness, type-token ratio, readability) for comprehensive detection. Use when asked to humanize text, de-AI writing, make content sound more natural/human, review writing for AI patterns, score text for AI detection, or improve AI-generated drafts. Covers content, language, style, communication, and filler categories.
generating-mermaid-diagrams
IncludedSalesforce architecture diagrams using Mermaid with ASCII fallback. Use this skill when generating text-based diagrams for Salesforce architecture, OAuth flows, ERDs, integration sequences, or Agentforce structure. TRIGGER when: user says "diagram", "visualize", "ERD", or asks for sequence diagrams, flowcharts, class diagrams, or architecture visualizations in Mermaid. DO NOT TRIGGER when: user wants PNG/SVG image output (use generating-visual-diagrams), or asks about non-Salesforce systems.