agentleFS
opencueopencue/cuecards/.agents/skills/vc-preview/SKILL.md

vc:preview

Skill10 starsChanged 4 months agoMITView on GitHub

Use when you need to inspect files or generate visual explanations, slides, diagrams, or HTML recaps.

1 other project uses a version of this, 1 of them edited.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

14 rules. About 0 are common, 6 are distinctive, and 8 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 8

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use preview as the companion and review surface.

    line 16
  2. Very specific:

    Use preview --diagram or preview --html --diagram for explanation-first visuals, Mermaid-oriented flows, and review-friendly diagram pages.

    line 18
  3. Very specific:

    Use tech-graph first when the task needs a durable publish-grade SVG or PNG artifact under process/general-plans/references/, …

    line 19
  4. Very specific:

    After tech-graph generation, preview is still the right place for explanation, comparison, HTML framing, or self-review of the generated …

    line 20
  5. Very specific:

    If invoked without arguments, use AskUserQuestion to present available preview operations:

    line 24
  6. Distinctive:

    When processing arguments, follow this priority order:

    line 66
  7. Distinctive:

    If argument is an explicit path → use directly

    line 73
  8. Distinctive:

    If argument is a contextual reference → resolve from recent conversation context

    line 74
  9. Distinctive:

    Remove non-alphanumeric except hyphens

    line 81
  10. Distinctive:

    Multiple flags: If multiple generation flags provided, use first one.

    line 86
  11. Very specific:

    Location: If an explicit plan file path is provided, write to its sibling visuals/ directory.

    line 114
  12. Very specific:

    MANDATORY — Theme Toggle: Every HTML page MUST include a light/dark theme toggle button.

    line 116
  13. Distinctive:

    Before generating, agent MUST read these references:

    line 120
  14. Very specific:

    Default: static anti-slop rules from html-design-guidelines.md (6 curated presets)

    line 153

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Preview

Universal viewer + visual generator. View existing content OR generate new visual explanations.

Diagram Boundary

Use preview as the companion and review surface.

  • Use preview --diagram or preview --html --diagram for explanation-first visuals, Mermaid-oriented flows, and review-friendly diagram pages.
  • Use tech-graph first when the task needs a durable publish-grade SVG or PNG artifact under process/general-plans/references/, process/general-plans/reports/visuals/, or the matching feature-scoped equivalents.
  • After tech-graph generation, preview is still the right place for explanation, comparison, HTML framing, or self-review of the generated artifact.

Default (No Arguments)

If invoked without arguments, use AskUserQuestion to present available preview operations:

OperationDescription
(view)View a file or directory
--explainGenerate visual explanation
--slidesGenerate presentation slides
--diagramGenerate architecture diagram
--asciiTerminal-friendly diagram
--stopStop preview server
--html --explainSelf-contained HTML explanation (opens in browser)
--html --diagramSelf-contained HTML diagram with zoom controls
--html --slidesMagazine-quality HTML slide deck
--html --diffVisual diff review (HTML)
--html --plan-reviewPlan vs codebase comparison (HTML)
--html --recapProject context snapshot (HTML)

Present as options via AskUserQuestion with header "Preview Operation", question "What would you like to do?".

Usage

View Mode

  • /vc:preview <file.md> - View markdown file in novel-reader UI
  • /vc:preview <directory/> - Browse directory contents
  • /vc:preview --stop - Stop running server

Generation Mode (Markdown)

  • /vc:preview --explain <topic> - Generate visual explanation (ASCII + Mermaid + prose)
  • /vc:preview --slides <topic> - Generate presentation slides (one concept per slide)
  • /vc:preview --diagram <topic> - Generate focused diagram (ASCII + Mermaid)
  • /vc:preview --ascii <topic> - Generate ASCII-only diagram (terminal-friendly)

Generation Mode (HTML)

  • /vc:preview --html --explain <topic> - Self-contained HTML explanation
  • /vc:preview --html --slides <topic> - Magazine-quality HTML slide deck
  • /vc:preview --html --diagram <topic> - HTML diagram with zoom controls
  • /vc:preview --html --diff [ref] - Visual diff review
  • /vc:preview --html --plan-review [plan-file] - Plan vs codebase comparison
  • /vc:preview --html --recap [timeframe] - Project context snapshot

Argument Resolution

When processing arguments, follow this priority order:

  1. --stop → Stop server (exit)
  2. --html flag present → Set HTML output mode flag (continues to next step)
  3. Generation flags (--explain, --slides, --diagram, --ascii) → Generation mode. Load references/generation-modes.md
  4. HTML-only flags (--diff, --plan-review, --recap) → Auto-set HTML mode, then generation mode. Load references/generation-modes.md
  5. Resolve path from argument:
    • If argument is an explicit path → use directly
    • If argument is a contextual reference → resolve from recent conversation context
  6. Resolved path exists on filesystem → View mode. Load references/view-mode.md
  7. Path doesn't exist or can't resolve → Ask user to clarify

Topic-to-slug conversion:

  • Lowercase the topic
  • Replace spaces/special chars with hyphens
  • Remove non-alphanumeric except hyphens
  • Collapse multiple hyphens → single hyphen
  • Trim leading/trailing hyphens
  • Max 80 chars - truncate at word boundary if longer

Multiple flags: If multiple generation flags provided, use first one; remaining treated as topic.

Placeholder {topic}: Replaced with original user input in title case (not the slug).

Error Handling

ErrorAction
Invalid topic (empty)Ask user to provide a topic
Flag without topicAsk user: "Please provide a topic: /vc:preview --explain <topic>"
Topic becomes empty after sanitizationAsk for topic with alphanumeric characters
File write failureReport error, suggest checking disk space and permissions
Server startup failureCheck if port in use, try /vc:preview --stop first
No generation flag + unresolvable referenceAsk user to clarify which file they meant
Existing file at output pathOverwrite with new content (no prompt)
Server already runningReuse existing server instance, just open new URL
Parent output directory missingCreate directories recursively before write
--diff without git contextExplain: "No git repo detected. Run inside a git repository."
--plan-review without plan file or active planExplain: "Provide a plan file path or run from a session with an active plan."
--recap without git historyExplain: "No git history found. Run inside a git repository with commits."
--html --ascii combinationNot supported — --ascii is terminal-only by design. Suggest --html --diagram instead
--diff with PR number but gh unavailableExplain: "GitHub CLI (gh) is required for PR diffs. Install from https://cli.github.com/"

HTML Output Mode (--html)

Adding --html to any generation flag switches output from Markdown to a self-contained HTML file.

Output: Single .html file with all CSS/JS inline. Opens directly in browser — no server needed. Location: If an explicit plan file path is provided, write to its sibling visuals/ directory. Otherwise write to process/general-plans/reports/visuals/ or the current feature's process/features/{feature}/reports/visuals/ when feature scope is explicit. Browser open: open (macOS) / xdg-open (Linux) / start (Windows) MANDATORY — Theme Toggle: Every HTML page MUST include a light/dark theme toggle button. See html-css-patterns.md → "Theme Toggle Button" for the exact CSS, HTML, and JS to include. Pages without the toggle are considered incomplete.

Reference Loading (HTML mode)

Before generating, agent MUST read these references:

ModeAlways readMode-specific
All HTML modeshtml-design-guidelines.md—
--explainhtml-css-patterns.md, html-libraries.mdTemplate: architecture.html
--diagramhtml-css-patterns.md, html-libraries.mdTemplate: mermaid-flowchart.html or architecture.html
--slideshtml-slide-patterns.md, html-css-patterns.md, html-libraries.mdTemplate: slide-deck.html
--diffhtml-css-patterns.md, html-libraries.mdTemplates: data-table.html, architecture.html
--plan-reviewhtml-css-patterns.md, html-libraries.mdTemplates: architecture.html, data-table.html
--recaphtml-css-patterns.md, html-libraries.mdTemplates: architecture.html, data-table.html

Multi-section pages (--explain, --diff, --plan-review, --recap): also read html-responsive-nav.md.

HTML-Only Modes

--diff [ref] (implies --html)

Visual diff review. Scope detection: branch name, commit hash, HEAD, PR number, commit range, default=main. Data: git diff --stat, --name-status, changed files, new API surface, CHANGELOG. Output: executive summary, KPI dashboard, module architecture (Mermaid), feature comparisons (side-by-side), flow diagrams, file map, test coverage, code review cards (Good/Bad/Ugly/Questions), decision log, re-entry context.

--plan-review [plan-file] (implies --html)

Plan vs codebase comparison. Input: explicit plan file path by default. Only fall back to active-plan context when exactly one active plan artifact is unambiguous. Data: read plan, read all referenced files, map blast radius, cross-reference assumptions. Output: plan summary, impact dashboard, current vs planned architecture (paired Mermaid), change breakdown (side-by-side), dependency analysis, risk assessment, review cards, understanding gaps. Visual language: blue=current, green=planned, amber=concern, red=gap.

--recap [timeframe] (implies --html)

Project context snapshot. Time window: shorthand (2w, 30d, 3m) or default 2w. Data: project identity, git log, git status, decision context, architecture scan. Output: project identity, architecture snapshot (Mermaid), recent activity, decision log, state KPI cards, mental model essentials, cognitive debt hotspots, next steps.

Style Strategy

  • Default: static anti-slop rules from html-design-guidelines.md (6 curated presets)
  • For --slides: consider invoking the frontend-design skill for richer style selection
  • Agent must vary aesthetics between consecutive HTML outputs (different font pair, palette)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.