/caddis-extras:word-cloudfrom caddis-extras
Generate static or animated word clouds from any text source (PDF, DOCX, XLSX, PPTX, HTML, CSV, TXT), with theming, sentiment coloring and shape masks.
Ships in caddis-extras. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
This skill works with any AI coding assistant — Claude, GitHub Copilot (via Copilot Chat), Cursor, Windsurf, ChatGPT, Gemini Code Assist, etc.
To activate it, paste this prompt into your AI agent:
Read the file word-cloud-skill/SKILL.md and follow its instructions to generate a word cloud.
My input: [paste text OR file path]
My target stack: [react / html / python / streamlit]
For GitHub Copilot specifically:
SKILL.md file into the chat, or use #file:word-cloud-skill/SKILL.mdFor Cursor:
word-cloud-skill/SKILL.md to Cursor's context with @file.cursorrulesFor any other agent:
SKILL.md as a system prompt or context blockGenerates premium, visually stunning word clouds from any text source. The output is always a production-ready frontend component — not a placeholder or demo. Think editorial design meets data visualization: luxurious typography, intentional color, and satisfying motion.
Input source? → See §1 (Text Extraction)
Target stack? → See §2 (Stack Selection)
Want animation? → See §3 (Animation Modes)
Sentiment/POS? → See §4 (NLP Highlighting)
Shape/layout? → See §5 (Shape Masking)
Dark/light? → See §6 (Theming)
Agentic use? → See §7 (Agent Interface)
Extract raw text first, then proceed to rendering. Use the appropriate method per file type.
Use directly — strip HTML tags with a regex or DOMParser if needed.
Read /mnt/skills/public/pdf-reading/SKILL.md for extraction strategy.
Preferred: pdfplumber (Python) or pdf-parse (Node).
Read /mnt/skills/public/docx/SKILL.md.
Preferred: python-docx (Python) or mammoth (JS/browser).
Read /mnt/skills/public/xlsx/SKILL.md.
Concatenate all cell text values from all sheets. For CSV: join all rows.
Read /mnt/skills/public/pptx/SKILL.md.
Extract text from all slide shapes and notes.
references/stopwords.md)| Stack | Primary Renderer | Notes |
|---|---|---|
| React (browser) | D3-cloud + SVG | Most flexible, best animations |
| Plain HTML | wordcloud2.js (canvas) | Zero-dependency drop-in |
| Streamlit | Python wordcloud + matplotlib OR st.components with D3 | Server-side generation or embedded HTML |
| Vue / Svelte | D3-cloud | Same as React pattern |
| Next.js / SSR | D3-cloud client-side only (dynamic import) | use client + typeof window !== 'undefined' guard |
| Static export / PNG | Python wordcloud lib | Best for server-side image export |
Default: When target stack is unspecified or ambiguous → generate a self-contained HTML file (works everywhere, zero deps from CDN).
Read the relevant reference file for your stack:
references/react.mdreferences/html.mdreferences/python.mdNo animation. Words are placed and stay. Best for exports, print, or performance-sensitive contexts.
Words fade/scale/fly in on load. Stagger by frequency: most-frequent words appear first.
@keyframes wordEntrance {
from { opacity: 0; transform: scale(0.4) rotate(var(--r)); }
to { opacity: 1; transform: scale(1) rotate(var(--r)); }
}
Apply animation-delay proportional to word rank.
Subtle sinusoidal translation on each word, offset by word index. Creates a living, breathing feel.
@keyframes float {
0%, 100% { transform: translateY(0px) rotate(var(--r)); }
50% { transform: translateY(-4px) rotate(var(--r)); }
}
Combine entrance + idle + hover. Add a radial gradient pulse behind the cloud on load. Use sparingly.
Color-code words by semantic category. Choose the right approach for the stack:
Use bundled lists in references/nlp-keywords.md:
Use compromise.js (CDN: https://unpkg.com/compromise) for POS tagging.
import nlp from 'compromise'
const doc = nlp(text)
const verbs = new Set(doc.verbs().out('array'))
const nouns = new Set(doc.nouns().out('array'))
Then assign color by category when building the word list.
import nltk
from nltk.sentiment import SentimentIntensityAnalyzer
sia = SentimentIntensityAnalyzer()
# score each word, assign to positive/negative/neutral bucket
Or use spaCy for POS tagging.
Positive sentiment → var(--cloud-positive) # e.g. #4ade80 / #22c55e
Negative sentiment → var(--cloud-negative) # e.g. #f87171 / #ef4444
Strong verbs → var(--cloud-verb) # e.g. #a78bfa / #8b5cf6
Nouns (default) → var(--cloud-noun) # base palette gradient
Neutral / other → var(--cloud-neutral) # muted version of base
Shape masking confines word placement to a silhouette.
See references/shapes.md for SVG path data:
D3-cloud uses a pixel-mask approach. For complex shapes, rasterize the SVG to a canvas, read pixel data, and pass as the mask to the layout engine. See references/react.md §Shape Masking.
from PIL import Image
import numpy as np
mask = np.array(Image.open("shape.png"))
wc = WordCloud(mask=mask, background_color=None, mode="RGBA")
Always implement both light and dark modes using CSS custom properties.
:root {
/* Light theme */
--cloud-bg: #fafaf9;
--cloud-surface: #ffffff;
--cloud-text: #1c1917;
--cloud-positive: #16a34a;
--cloud-negative: #dc2626;
--cloud-verb: #7c3aed;
--cloud-noun: #0369a1;
--cloud-neutral: #78716c;
--cloud-shadow: rgba(0,0,0,0.08);
}
[data-theme="dark"], .dark {
--cloud-bg: #0c0a09;
--cloud-surface: #1c1917;
--cloud-text: #fafaf9;
--cloud-positive: #4ade80;
--cloud-negative: #f87171;
--cloud-verb: #c4b5fd;
--cloud-noun: #7dd3fc;
--cloud-neutral: #a8a29e;
--cloud-shadow: rgba(0,0,0,0.4);
}
Use prefers-color-scheme media query as default, with a manual toggle override.
See references/palettes.md for 8 curated color schemes:
When used in an agentic pipeline (agents.md workflow), accept and return structured data:
{
"text": "string | null",
"file_path": "string | null",
"options": {
"max_words": 150,
"shape": "circle | star | speech_bubble | heart | diamond | custom",
"custom_shape_svg": "string | null",
"animation": "none | entrance | float | cinematic",
"highlight": ["sentiment", "verbs", "nouns", "custom"],
"custom_highlight_words": ["array", "of", "words"],
"theme": "auto | light | dark",
"palette": "obsidian | ivory | aurora | parchment | midnight_ocean | neon_noir | botanical | rose_gold",
"stack": "react | html | python | streamlit",
"width": 800,
"height": 500,
"font_family": "string | null"
}
}
{
"component_code": "string",
"word_frequencies": [{"word": "string", "count": 42, "category": "positive|negative|verb|noun|neutral"}],
"stack": "react | html | python",
"theme_vars": { "--cloud-bg": "#...", "...": "..." },
"preview_notes": "string"
}
When invoked by an orchestrator agent, read the input JSON from the task context, execute §1 extraction if file_path is provided, then generate the component per the stack option. Return the output JSON. Do not ask clarifying questions in agentic mode — use defaults for missing options.
These are non-negotiable for premium output:
Typography first — word size encoding must feel intentional, not mechanical. Use a range of at least 4–6 size steps (e.g. 12px → 72px). Choose a distinctive font — never default system fonts. Good defaults: Playfair Display, Syne, Space Grotesk, DM Serif Display, Archivo Black.
Density — aim for 60–150 words. Too sparse feels empty; too dense is unreadable. Scale max_words based on canvas size.
Rotation — use sparingly. Max ±30° for most words, with only a few at ±90°. Pure horizontal reads faster; slight rotation adds energy.
Padding — minimum 2px between words. 4–6px for luxury feel.
Background — never pure white or pure black. Use off-tones: #fafaf9, #0c0a09. Add a subtle radial gradient or noise texture for depth.
Responsive — the container must be responsive. Use viewBox for SVG, or ResizeObserver + re-layout for canvas.
Accessibility — include a hidden <ul> list of words for screen readers. Provide aria-label on the cloud container.
Before delivering, verify:
<ul> present| File | When to read |
|---|---|
references/react.md | Building React component (D3-cloud) |
references/html.md | Building standalone HTML (wordcloud2.js) |
references/python.md | Python / Streamlit output |
references/palettes.md | Color scheme details & CSS vars |
references/shapes.md | SVG shape paths & masking code |
references/nlp-keywords.md | Bundled sentiment & verb word lists |
references/stopwords.md | Stopword list to filter before counting |
agents/agent-interface.md (opens in a new tab)references/html.md (opens in a new tab)references/nlp-keywords.md (opens in a new tab)references/palettes.md (opens in a new tab)references/python.md (opens in a new tab)references/react.md (opens in a new tab)references/shapes.md (opens in a new tab)references/stopwords.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub saajunaid/caddis-plugin --plugin caddis-extras81 skills in this plugin
/adopt-rbacPointer to the org's RBAC adoption skill. Use for "add RBAC to this app" or "adopt rbac-kit"./agent-md-refactorRefactor bloated agent instruction files (AGENTS.md, .cursorrules, .github/ files) into linked, progressively disclosed docs./agent-orchestrationBlueprint for orchestrating the agent pipeline from spec to planning, implementation, testing and debugging, plus when a second model is worth it, the intent→model map and cost guardrails./algorithmic-artGenerative and algorithmic art with p5.js: flow fields, particle systems, animations, WebGL, audio-reactive visuals; exports HTML, PNG, GIF, MP4, SVG. Use for creative coding or any p5.js visual./anchor-reviewSingle-model adversarial review technique — 3-lens analysis with confidence scoring and self-challenge/api-client-patternsTyped client-side API consumption: fetch wrappers, zod validation, auth injection, TanStack Query (useQuery, useMutation, optimistic updates), tRPC, OpenAPI codegen, pagination. Use when consuming REST or tRPC APIs.