Markdown Converter
Agent skill for markdown-converter
**MUST READ** before working on this codebase:
Sign in to like and favorite skills
MUST READ before working on this codebase:
documentation/architecture.md — system overview, components, directory structuredocumentation/commands.md — WhatsApp slash commands referencedocumentation/configuration.md — config schema, CLI mapping, save/loaddocumentation/message-flow.md — message pipeline, Claude queries, permissionsMUST UPDATE documentation when making changes. Keep it terse, accurate, no fluff.
CRITICAL: Before making ANY code changes, start the TypeScript watch process in the background:
bun run tsc:watch &
This is MANDATORY. The watch process catches type errors immediately as you edit. Check the output after each edit to catch errors early. If you see TypeScript errors, fix them before moving on.
Optionally, also run tests in watch mode:
bun test --watch &
After editing code, always run the formatter and linter:
bun run format bun run lint
Both commands are MANDATORY after code changes. Fix any lint errors before proceeding.
All CLI options MUST be configurable via the config file. After adding or modifying CLI options, always verify the corresponding config file property exists in
src/types.ts (ConfigSchema) and is properly merged in src/cli/config.ts.
Default to using Bun instead of Node.js.
bun <file> instead of node <file> or ts-node <file>bun test instead of jest or vitestbun build <file.html|file.ts|file.css> instead of webpack or esbuildbun install instead of npm install or yarn install or pnpm installbun run <script> instead of npm run <script> or yarn run <script> or pnpm run <script>bunx <package> <command> instead of npx <package> <command>Bun.serve() supports WebSockets, HTTPS, and routes. Don't use express.bun:sqlite for SQLite. Don't use better-sqlite3.Bun.redis for Redis. Don't use ioredis.Bun.sql for Postgres. Don't use pg or postgres.js.WebSocket is built-in. Don't use ws.Bun.file over node:fs's readFile/writeFilels instead of execa.Use
bun test to run tests.
import { test, expect } from "bun:test"; test("hello world", () => { expect(1).toBe(1); });
Use HTML imports with
Bun.serve(). Don't use vite. HTML imports fully support React, CSS, Tailwind.
Server:
import index from "./index.html" Bun.serve({ routes: { "/": index, "/api/users/:id": { GET: (req) => { return new Response(JSON.stringify({ id: req.params.id })); }, }, }, // optional websocket support websocket: { open: (ws) => { ws.send("Hello, world!"); }, message: (ws, message) => { ws.send(message); }, close: (ws) => { // handle close } }, development: { hmr: true, console: true, } })
HTML files can import .tsx, .jsx or .js files directly and Bun's bundler will transpile & bundle automatically.
<link> tags can point to stylesheets and Bun's CSS bundler will bundle.
<html> <body> <h1>Hello, world!</h1> <script type="module" src="./frontend.tsx"></script> </body> </html>
With the following
frontend.tsx:
import React from "react"; import { createRoot } from "react-dom/client"; // import .css files directly and it works import './index.css'; const root = createRoot(document.body); export default function Frontend() { return <h1>Hello, world!</h1>; } root.render(<Frontend />);
Then, run index.ts
bun --hot ./index.ts
For more information, read the Bun API docs in
node_modules/bun-types/docs/**.mdx.