$ show tw93/Kami
Kami is a locally installed AI-agent skill and plugin for professional document generation, aimed at Claude Code, Codex, Cursor, and MCP-capable agents. It is not a hosted service: agents invoke it through natural language, and the skill orchestrates a deterministic pipeline that validates structured content, fills self-contained HTML templates, renders PDFs via WeasyPrint, optionally exports PPTX or Marp slides, and runs a battery of quality gates before declaring a document deliverable. The repo also ships a zero-dependency MCP stdio server exposing tools such as kami_templates, kami_render, kami_check, and kami_screenshot.
The LLM identified 5 files worth highlighting for reuse:
Converts beautiful-mermaid SVG output into a static, WeasyPrint-safe SVG by resolving CSS var() and color-mix() values, re-theming to the Kami palette, and stripping web fonts. It is a self-contained, zero-dependency Python script reusable by any pipeline that needs to embed Mermaid diagrams in print-oriented HTML.
A bounded static analyzer that extracts visible text and resource attributes from authored HTML without a browser. It parses stylesheets, resolves custom-property var() chains, accounts for hidden-element CSS properties, handles SVG viewport positioning, and fails closed on ambiguity. This is directly reusable for any content-coverage or accessibility audit that must verify what a user actually sees in rendered output.
Strictly converts LaTeX delimiters into standalone MathJax SVG using a locked runtime, with formula-count limits, safety parsing, and atomic file replacement. The pattern is reusable for deterministic server-side math rendering that must not depend on a browser or live network access.
Provides MissingDepError and doctor_report() so commands can degrade gracefully when WeasyPrint, PyMuPDF, pypdf, python-pptx, or other optional packages are absent. This is a clean, portable pattern for tooling that must run in minimal agent sandboxes while still producing actionable diagnostics when dependencies are missing.
Annotation-based validation of SVG diagram topologyβnode overlap, edge attachment, and label placementβperformed without a browser or rendering engine. It can be extracted and reused in any document pipeline that generates SVG diagrams and needs deterministic geometric verification.