Kami AGENTS.md

Repository instructions for tw93/Kami, a system that generates documents such as PDFs, presentations, and PNG images from reusable HTML templates. They describe the project layout, build rules, design references, and release process.

In plain words
What is it for?
Locating project files, following document and design specifications, diagnosing render failures, checking design tokens, and preparing releases.
Why use it?
They help an agent change the document-generation system without breaking its templates, visual standards, rendering checks, or packaged skill.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/tw93/kami/agents-md
Clone the repo
git clone --depth 1 https://github.com/tw93/Kami

Made for: Codex, OpenCode.

Per session 5,574 This file is loaded in full into every session.
When invoked 5,574 The same file — it is already loaded in full.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.05574 $0.05574
Opus 5 $0.02787 $0.02787
Sonnet 5 $0.01115 $0.01115
Haiku 4.5 $0.00557 $0.00557

Measured 2d ago against content hash 6bdf8f957c49, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

Kami AGENTS.md scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

deploy: verify them with `curl -sI` against the preview URL, never locally.
AGENTS.md · 354 lines

How it starts

The opening of the file, as written. The whole thing — 354 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Kami Agent Guide

Project

Kami is a document-generation skill and template system: self-contained editorial HTML templates rendered to PDF / PPTX / PNG, plus reference specs, demo assets, and a packaged skill archive. SKILL.md is the runtime manual for producing a document. This file is the maintenance guide for changing the repository itself, and it records the traps that a fresh read of the code does not reveal.

Repository Map

Only the entries whose role is not obvious from the filename:

  • SKILL.md - skill routing plus the document-side build and verify commands. CHEATSHEET.md - quick design reference. Both ship inside the package.
  • references/design.md, writing.md, production.md, diagrams.md - full specs. production.md Part 4 is the single source of truth for render failures, their verified causes, and their fixes; add pitfalls there, not here. docs/release.md - release notes, release flow, demo screenshot regeneration. anti-patterns.md, resume-writing.md, mermaid.md, deck-preflight.md, brand-profile.md and brand.example.md - scoped guides.
  • references/tokens.json (color tokens, drift-checked by scripts/tokens.py), references/mermaid-theme.json (Kami to beautiful-mermaid theme, kept in sync with tokens.json), references/checks_thresholds.json (rhythm / density / orphan / visual thresholds read by checks.py and visual.py). These are live inputs to gates: editing a number changes what passes.
  • references/schemas/ - one JSON Schema subset per document type. The $comment fields carry the per-field quality bar distilled from writing.md, so schema edits and writing.md edits move together.
  • scripts/shared.py - the canonical registries (HTML_TEMPLATES, SCREEN_TEMPLATES, PPTX_TEMPLATES, MARP_TEMPLATES, DIAGRAM_TEMPLATES) and each template's build_max_pages. build.py derives its internal build targets from them; Marp stays discovery-only because it uses an external CLI. Add or remove a template or diagram here, never in a per-script dict.
  • scripts/render.py - the single render entry (render_pdf, build_slides, PDF metadata stamping). build.py, verify.py, and mcp_server.py all call it; never open a second WeasyPrint call site.
  • scripts/mermaid_normalize.py - re-themes a beautiful-mermaid SVG to the Kami palette and makes it WeasyPrint-safe. Pure Python, no Node, ships in the package.
  • scripts/mcp_server.py - zero-dependency MCP stdio server exposing kami_templates / kami_doctor / kami_render / kami_check / kami_screenshot, so an MCP-capable agent can diagnose, render, and verify without reading SKILL.md. Register with claude mcp add kami -- python3 <checkout>/scripts/mcp_server.py.
  • scripts/site_facts.py - public-site fact drift checks (install commands, version, template and diagram counts across index*.html, README.md, llms.txt), wired into build.py --check.
  • scripts/check-update.sh - quiet daily update check invoked from SKILL.md; writes a local cache marker, then resolves the latest published GitHub Release at most once per day. It uploads no user document or task content and stays silent on failure.
  • assets/showcase/ - README and public-site screenshots only. assets/demos/ - README showcase demos. scripts/package-skill.sh excludes both from the ZIP.
  • assets/diagrams/src/*.mmd - Mermaid source of the sequence / class / er diagrams. assets/templates/marp/ - the Markdown-first Marp deck variant.
  • dist/kami.zip - tracked release archive, committed with release changes.
  • plugins/kami/, .claude-plugin/marketplace.json, and .agents/plugins/marketplace.json are generated; see Generated Mirrors below.
  • Public site surface: index.html plus index-zh|en|ja|ko|tw.html, the English-only prose pages developers|about|contact|privacy.html, styles.css, llms.txt, robots.txt, sitemap.xml, vercel.json. styles.css is Kami's own site shell (language switcher, gallery, responsive behavior, .hero.doc / .prose for the prose pages); generic template rules never belong there.
  • Agent-facing site surface: index.md (Markdown twin of the homepage; vercel.json redirects / here for Accept: text/markdown and /?mode=agent, because Vercel applies rewrites only after the filesystem and / always matches index.html), developers|about|contact|privacy.md, developers/llms.txt, and the generated .well-known/agent-skills/index.json, .well-known/mcp/server-card.json, feeds/catalog.jsonld, schemamap.xml. Every new prose page needs its .md twin, a rewrites entry for the extensionless URL, and a sitemap.xml row. The has-conditioned redirects and the Link headers are only observable on a deploy: verify them with curl -sI against the preview URL, never locally.
  • .github/workflows/check.yml (PR/push CI) and release.yml (tag-triggered build and asset upload).

Read the full file on GitHub · 354 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 354 lines · 5,574 tokens per session scan A 6bdf8f957c49

Subscribe to this mod's changes

Kami AGENTS.md is an instructions file published in the GitHub repository tw93/Kami (11,071 stars, last pushed today), licensed MIT. It adds 5,574 tokens to every session, about $0.0279 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other instructions, from other repositories

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,182 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

next.js AGENTS.md

Instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,345 tokens