agentleFS
devnu11devnu11/claude-skills/render-markdown/SKILL.md

render-markdown

Skill1 starsChanged 20 days agoMITView on GitHub

Show a Markdown file rendered for reading - opened in the browser, as a checked PDF, or printed on paper - instead of improvising a converter. Use when the user says "render this markdown", "preview this markdown", "show me X rendered", "open it in my browser", "make a PDF of", "print this to my printer", "print it on paper" or "send it to my printer". A bare "print this" is not a trigger: it usually means printing a value.

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

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

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

    Where to show it: When the request doesn't say, run open and give the path (a session without a display can still use it).

    line 28
  2. Very specific:

    Run print … --dry-run. It renders, checks, and reports the printer, pages and sides, sending nothing.

    line 32
  3. Distinctive:

    Read the preview PNG it names with the Read tool.

    line 34
  4. Distinctive:

    Ask once: the printer, the page count, and two-sided (the default) unless the request already said.

    line 37
  5. Very specific:

    Run print without --dry-run.

    line 39

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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

render-markdown

One renderer, three outputs. Tables, code, block quotes and Mermaid diagrams render the same in the browser, the PDF and on paper. Every flag, the checks and the exit codes are in reference/protocol.md next to this file.

RM="uv run --frozen --quiet --project ~/.claude/skills/render-markdown/runner render-markdown"

--frozen runs the skill's tested uv.lock as it is; never drop it.

CommandWhat it does
$RM open FILE.mdRender and open in the default browser. Prints the HTML's path.
$RM pdf FILE.md [-o OUT.pdf] [--paper a4|letter]Render to a PDF and check it. Prints the PDF and its page-1 preview PNG.
$RM print FILE.md [--printer NAME] [--sides two|one] [--copies N] [--paper a4|letter] [--send raster|pdf] [--dry-run]Render, check, send, and follow the job until the printer reports pages. --send pdf skips the local raster conversion.

pdf and print need Chrome 112 or later; print needs CUPS (macOS or Linux).

Steps

  1. Where to show it. When the request doesn't say, run open and give the path (a session without a display can still use it). "Make a PDF" means pdf. Print only when the human asked for paper in this request.
  2. Printing:
    1. Run print … --dry-run. It renders, checks, and reports the printer, pages and sides, sending nothing.
    2. Read the preview PNG it names with the Read tool. Stop if page 1 shows raw Markdown, broken tables, a blank or cut-off page, or a diagram as source text.
    3. Ask once: the printer, the page count, and two-sided (the default) unless the request already said.
    4. Run print without --dry-run.
  3. A failed check (exit 1, problem: lines) means the PDF isn't fit to read: report the problems, don't print it, and don't hand-patch the PDF.
  4. Report one line: the path, or printed N pages on PRINTER. Never say a job printed because lp gave a job id: only printed: from the command means paper came out. completed: means CUPS counted pages but the printer can't confirm them: say that, and ask the human to check. Never paste the rendered content into the chat.

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.