Skip to content
rmnr
DocsTourSlicesBest PracticeAgentsInstall

Command Palette

Search for a command to run...

New

Slice · AI prompt

Markdown — page container with CRUD tabs + diagrams

Framework-parity Markdown: Read / Write / Review, shared grammar/comments, Mermaid + KaTeX, React Recharts or native Svelte SVG charts.

Resource detail View source
Copy this prompt into Claude / Codex / Cursor
markdown.prompt.mdmarkdown
# Install `markdown` — Markdown — page container with CRUD tabs + diagrams

> Framework-parity Markdown: Read / Write / Review, shared grammar/comments, Mermaid + KaTeX, React Recharts or native Svelte SVG charts.

📚 Knowledge base : https://resource.rahmanef.com/llms.txt
📦 Slice detail   : https://resource.rahmanef.com/slices/markdown
🧠 JSON catalog   : https://resource.rahmanef.com/api/knowledge?slice=markdown
🔗 Source         : https://github.com/rahmanef63/resource-site/tree/main/frontend/slices/markdown

## 1. Install

```bash
npx rahman-resources add markdown
# alias: npx rr add markdown
```

The CLI copies `frontend/slices/markdown/` into your project + augments `.env.example` + installs npm deps automatically. Run it from your project root.

## 2. What it ships

- npm: `katex`, `mermaid`, `recharts`, `lucide-react`
- shadcn primitives: `button`, `tabs`, `textarea`

## 3. Wire it up

Run `npx rr add markdown` for React/default or `npx rr add markdown --framework sveltekit`. Read-only: MarkdownReader. Full surface: MarkdownPage with read/write/review plus optional content/comment callbacks; omit callbacks for standalone local state. Mermaid and KaTeX lazy-load in both; chart fences use lazy Recharts in React and native SVG in Svelte. The notion blocksToMarkdown/markdownToBlocks bridge speaks the same grammar.

## Rules of engagement

- shadcn-only UI primitives. No raw `<button>` / `<dialog>` / native date or file inputs.
- 200-line hard cap per source file (extract neighbours when over).
- All Convex queries hit an index (`.withIndex(...)`); never bare `.collect()`.
- Public mutations/queries declare `args:` validators + authz.
- Full ruleset: https://resource.rahmanef.com/best-practice

The agent will fetch /llms.txt for the full ruleset and use /api/knowledge for the JSON catalog.