Skip to content

Commit bcb44ec

Browse files
committed
Add agent skill for skills.sh, clean up AGENTS.md
- Add skills/markpdf/SKILL.md following the agentskills.io spec (name, description, license, compatibility, allowed-tools) - CLAUDE.md symlinked to AGENTS.md (no duplication) - README leads with npx skills add for agent users - Trim AGENTS.md to essentials only Made-with: Cursor
1 parent 5d37018 commit bcb44ec

4 files changed

Lines changed: 65 additions & 53 deletions

File tree

Agents.md

Lines changed: 13 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,19 @@
1-
# Agent Development Guidelines
1+
# markpdf
22

3-
## Quick Start
3+
Markdown to PDF converter. `uv tool install git+https://github.com/araa47/markpdf`
44

5-
```bash
6-
uv sync --all-extras --dev # Install deps
7-
uv run pytest # Run tests
8-
uv run markpdf input.md # Run locally
9-
```
10-
11-
## Project Structure
5+
## Dev
126

13-
```
14-
src/markpdf/
15-
__init__.py # Version
16-
cli.py # CLI entry point + async orchestration
17-
parser.py # Markdown tokenizer
18-
renderer.py # reportlab PDF builder
19-
themes.py # Light/dark theme tokens
20-
tests/
21-
fixtures/ # Test markdown files + images
22-
test_markpdf.py
7+
```bash
8+
uv sync --all-extras --dev
9+
uv run pytest
10+
uv run markpdf input.md
2311
```
2412

25-
## Conventions
13+
## Layout
2614

27-
- **Use `uv` for all dependency management** (`uv add`, not `pip install`)
28-
- **Type annotations** on all functions
29-
- **Run `uv run pytest`** before committing
30-
- **Run pre-commit hooks**: `prek run --all-files`
15+
- `src/markpdf/cli.py` — typer CLI
16+
- `src/markpdf/parser.py` — markdown tokenizer
17+
- `src/markpdf/renderer.py` — reportlab PDF builder
18+
- `src/markpdf/themes.py` — light/dark tokens
19+
- `skills/markpdf/SKILL.md` — agent skill

CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
AGENTS.md

README.md

Lines changed: 21 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,47 +2,39 @@
22

33
Agent-friendly markdown to PDF. Beautiful documents from the terminal.
44

5-
Perfect for AI agents that need to send humans formatted documents in chat where markdown rendering isn't supported (most messaging apps, email, Slack threads, etc).
5+
## Install as Agent Skill
66

7-
## Install
7+
```bash
8+
npx skills add araa47/markpdf
9+
```
10+
11+
Or install the CLI directly:
812

913
```bash
10-
# Install from GitHub
1114
uv tool install git+https://github.com/araa47/markpdf
12-
13-
# With uvloop for faster async (Linux/macOS)
14-
uv tool install "markpdf[fast]" --from git+https://github.com/araa47/markpdf
1515
```
1616

1717
## Usage
1818

1919
```bash
20-
markpdf report.md # Light mode, creates report.pdf
21-
markpdf report.md --dark # Dark mode
22-
markpdf report.md -o final.pdf # Custom output path
23-
markpdf report.md --keep-together # Keep sections on same page
24-
markpdf report.md --dark -k -o out.pdf # All options combined
25-
markpdf --help # Full docs
20+
markpdf report.md # creates report.pdf
21+
markpdf report.md --dark # dark mode
22+
markpdf report.md -o final.pdf # custom output path
23+
markpdf report.md --keep-together # keep sections on same page
24+
markpdf --help # full docs
2625
```
2726

27+
## Why
28+
29+
Most messaging apps (Slack, Discord, Teams, WhatsApp, email) don't render markdown. When an AI agent needs to send a human a formatted document, it can convert markdown to a polished PDF and attach it instead.
30+
2831
## Features
2932

30-
- **Beautiful output** — shadcn/ui-inspired zinc palette, clean typography
31-
- **Dark mode**`--dark` flag for dark-themed PDFs
32-
- **Keep-together**`--keep-together` tries to keep each section on one page
33-
- **Images** — local + remote (fetched concurrently via aiohttp)
33+
- **Beautiful output** — shadcn/ui zinc palette, clean typography
34+
- **Dark mode**`--dark` for dark-themed PDFs
35+
- **Keep-together**`-k` tries to keep each section on one page
36+
- **Images** — local + remote (fetched concurrently)
3437
- **Full markdown** — headers, bold, italic, code blocks, tables, lists, blockquotes, links, images, task lists, horizontal rules
3538
- **Extended syntax**`==highlight==`, `^superscript^`, `~subscript~`, `~~strikethrough~~`
36-
- **Fast** — async I/O with optional uvloop acceleration
37-
- **Zero config** — just point at a `.md` file
38-
- **Rich CLI** — typer-powered `--help` with usage examples
39-
40-
## For AI Agents
41-
42-
Add to your agent's toolbox. One command, no config:
43-
44-
```bash
45-
markpdf report.md -o report.pdf
46-
```
47-
48-
Then attach `report.pdf` to the chat.
39+
- **Fast** — async I/O with optional uvloop
40+
- **Rich CLI** — typer-powered `--help`

skills/markpdf/SKILL.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
name: markpdf
3+
description: Convert markdown to beautiful, styled PDFs with light/dark themes. Use when the user needs to send a formatted document in chat, email, or messaging where markdown rendering isn't supported. Converts .md files to .pdf with headers, code blocks, tables, images, and more.
4+
license: MIT
5+
compatibility:
6+
- Claude Code
7+
- Cursor
8+
- Codex
9+
- Gemini CLI
10+
allowed-tools: Bash(markpdf:*) Read Write
11+
---
12+
13+
# markpdf
14+
15+
Convert markdown files to styled PDFs.
16+
17+
## Setup
18+
19+
```bash
20+
uv tool install git+https://github.com/araa47/markpdf
21+
```
22+
23+
## Usage
24+
25+
```bash
26+
markpdf input.md # creates input.pdf
27+
markpdf input.md -o report.pdf # custom output
28+
markpdf input.md --dark # dark mode
29+
markpdf input.md -k # keep sections on same page
30+
```

0 commit comments

Comments
 (0)