agentleFS
MasihMoafiMasihMoafi/skills/artifact/SKILL.md

artifact

Skill8 starsChanged 9 days agoMITView on GitHub

Handling rules for visual and document artifacts: PDFs, HTML reports, dashboards, slides and formula rendering. Load when creating, editing, verifying, or opening any of these artifact types.

8 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use shadcn and skill-creator.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • DatabricksSkill

    shadcn

    Manages shadcn components and projects — adding, searching, fixing, debugging, styling, and composing UI. Provides project context, component docs, and usage examples. Applies when working with shadcn/ui, component registries, presets, --preset codes, or any project with a components.json file. Also triggers for "shadcn init", "create an app with --preset", or "switch to --preset".

    Also in 3 projects that use this

  • SentrySkill

    skill-creator

    Create new agent skills following the Agent Skills specification. Use when asked to "create a skill", "add a new skill", "write a skill", "make a skill", "build a skill", or scaffold a new skill with SKILL.md. Guides through requirements, writing, registration, and verification.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 6 edited versions we read keep these.

  • 5

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Keep a short inventory: page count, text-extraction result and what the pages contain.

    line 17
  2. Distinctive:

    After creating or editing a PDF the user will inspect, render a page to check it, then open it for the user with the environment's opener …

    line 19
  3. Distinctive:

    After creating or materially editing a user-facing HTML artifact, open it for the user unless they say not to.

    line 23
  4. Distinctive:

    Check layout by rendering the PDF pages, not by reading extracted text: spot-check the most layout-sensitive pages and make a contact sheet …

    line 31
  5. Distinctive:

    Before delivery, confirm the formulas became MathML with no raw delimiters left, then open the page and check they render as math:

    line 56

“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “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

Artifact

Rules for producing, checking and opening PDFs, HTML reports, slides and formulas. Check every artifact visually before showing it: text visible and legible, consistent, inside its borders.

Visual design check

Before showing a diagram, chart, slide or report: the primary takeaway is apparent at a glance to its audience; every accent colour carries information; every size or colour difference means something; elements sit on one grid and text aligns to its reading direction (right for Persian); steps and containers have room to breathe.

PDFs

  • For a scanned PDF: run pdfinfo, then one pdftotext -layout check; if it is empty, render pages with pdftoppm to tmp/pdfs/ and inspect the PNGs at original detail.
  • Keep a short inventory: page count, text-extraction result and what the pages contain.
  • Stay local; use no online OCR or upload unless the user asks.
  • After creating or editing a PDF the user will inspect, render a page to check it, then open it for the user with the environment's opener and confirm the viewer started.

HTML reports

  • After creating or materially editing a user-facing HTML artifact, open it for the user unless they say not to. A screenshot or headless render verifies it; it does not replace opening it.
  • Open HTML in Chromium. For a site folder, especially one with assets, scripts or maps, serve it locally: setsid python3 -m http.server <port> --directory <site-dir> >/tmp/<task>-server.log 2>&1 &, then open http://127.0.0.1:<port>/.... Use file:// only for a simple standalone page; if Chromium keeps loading, switch to the local server before saying it is open.
  • Browser automation and screenshots are costly. Use cheaper local checks unless the UI, formulas or charts are new or materially changed; then do one visual pass before opening.
  • Make alternative designs switchable in the HTML rather than describing them in chat.

Slides and print layout

  • For browser-printed HTML slides, do not rely on .active styles: print mode often forces every .slide to display:flex, so put flex-direction, justify-content and gap on the base .slide class.
  • Check layout by rendering the PDF pages, not by reading extracted text: spot-check the most layout-sensitive pages and make a contact sheet for the whole deck.
  • In RTL decks with image and text split layouts, a grid inherits direction: rtl and reverses its columns. Set the split container to direction:ltr and the text area back to direction:rtl.
  • For mixed Persian and English slide text, prefer Persian-led phrasing and isolate short English terms; long English-led bullets often render in broken order in PDF.

Formulas in HTML

  • Browsers show raw TeX delimiters (\(...\), \[...\], $$...$$) as text unless a renderer or MathML is present.
  • In handwritten HTML, write native MathML; Chromium and Firefox render it offline without JavaScript:
<div class="math-display">
  <math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
    <msub><mi>s</mi><mi>k</mi></msub><mo>=</mo>
    <munderover><mo>&#x2211;</mo><mrow><mi>j</mi><mo>=</mo><mn>0</mn></mrow><mi>k</mi></munderover>
    <msub><mi>p</mi><mi>r</mi></msub><mo>(</mo><msub><mi>r</mi><mi>j</mi></msub><mo>)</mo>
  </math>
</div>

Give .math-display direction: ltr and overflow: auto so wide formulas scroll inside RTL pages.

  • From Markdown, or when hand-written MathML is too slow for a large document, convert with Pandoc and keep the .md beside the .html: pandoc input.md -s --mathml -c style.css -o output.html.
  • MathJax or KaTeX is acceptable only when its script and CSS are included and verified; avoid CDN renderers unless network use is acceptable.
  • A plain-text formula is acceptable only when the user does not need typeset math; explain ambiguous notation in words, for example that G_inverse(s_k) means the inverse CDF.
  • Before delivery, confirm the formulas became MathML with no raw delimiters left, then open the page and check they render as math:
rg -n '<math' output.html | head
rg -n '\[|\]|\$\$' output.html | head

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.