telegraph
Publish articles to Telegra.ph (Telegraph) using the createPage API via curl. Use when: user asks to publish, post, or create a page on Telegraph/Telegra.ph, or when a cron/task needs to publish formatted content to a Telegraph page. Also triggers for article publishing, blog posting to Telegraph, or generating readable web pages from content.
Best use case
telegraph is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Publish articles to Telegra.ph (Telegraph) using the createPage API via curl. Use when: user asks to publish, post, or create a page on Telegraph/Telegra.ph, or when a cron/task needs to publish formatted content to a Telegraph page. Also triggers for article publishing, blog posting to Telegraph, or generating readable web pages from content.
Teams using telegraph should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/telegraph/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How telegraph Compares
| Feature / Agent | telegraph | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Publish articles to Telegra.ph (Telegraph) using the createPage API via curl. Use when: user asks to publish, post, or create a page on Telegraph/Telegra.ph, or when a cron/task needs to publish formatted content to a Telegraph page. Also triggers for article publishing, blog posting to Telegraph, or generating readable web pages from content.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Telegraph Publishing Skill
Publish formatted articles to [Telegra.ph](https://telegra.ph) using the API.
## When to Use
✅ **USE this skill when:**
- Publishing content to Telegra.ph (news reviews, summaries, reports)
- Creating a readable web page from compiled content
- A cron job needs to publish and share a link
- "Publie ça sur Telegraph" / "Create a Telegraph page"
❌ **DON'T use this skill when:**
- Reading or scraping existing Telegraph pages (just use `curl` directly)
- Managing a Telegraph account (editing, revoking tokens)
## Authentication
The Telegraph access token is a plain-text file. Read it with `read_file` before calling the API.
Common token locations (check agent workspace or secrets directory):
- `secrets/telegraph.txt`
- `workspace/telegraph-token.txt`
## Publishing a Page
### API Call
```bash
curl -s -X POST "https://api.telegra.ph/createPage" \
-H "Content-Type: application/json" \
-d '{
"access_token": "TOKEN",
"title": "Your Page Title",
"author_name": "Sclaw",
"content": CONTENT_JSON,
"return_content": false
}'
```
### Response
```json
{
"ok": true,
"result": {
"path": "Your-Page-Title-03-09",
"url": "https://telegra.ph/Your-Page-Title-03-09",
"title": "Your Page Title",
"author_name": "Sclaw",
"views": 0
}
}
```
The published URL is in `result.url`.
## Content Format
The `content` field is a JSON array of node objects. Each node has a `tag` and `children`.
### Available Tags
| Tag | Usage |
|-----|-------|
| `h3` | Section heading |
| `h4` | Sub-heading |
| `p` | Paragraph |
| `strong` | Bold text |
| `em` | Italic text |
| `a` | Link (`href` attribute) |
| `blockquote` | Quote block |
| `ul`, `li` | Bullet list |
| `br` | Line break |
| `figure`, `img` | Image |
### Node Structure
```json
{"tag": "p", "children": ["Plain text content"]}
```
Nested elements:
```json
{"tag": "p", "children": [{"tag": "strong", "children": ["Bold"]}, " then normal"]}
```
Links:
```json
{"tag": "p", "children": [{"tag": "a", "attrs": {"href": "https://example.com"}, "children": ["Click here"]}]}
```
### Example: Article with Sections
```json
[
{"tag": "p", "children": ["Introduction paragraph."]},
{"tag": "h3", "children": ["🌍 Section Title"]},
{"tag": "p", "children": ["Section content with details."]},
{"tag": "h3", "children": ["💻 Another Section"]},
{"tag": "p", "children": ["More content here."]},
{"tag": "p", "children": [{"tag": "em", "children": ["Footer — Source attribution — Date"]}]}
]
```
## Critical Rules for JSON Content
Telegraph content is sent as JSON inside a JSON body. This creates escaping challenges:
1. **No curly/typographic quotes** (`'` `'` `"` `"`) — use straight ASCII quotes only
2. **No unescaped apostrophes in French text** — replace `l'article` with `l article` or rephrase (`la suite de l article` → `cet article`)
3. **Escape inner double quotes** — use `\"` inside JSON strings
4. **Write the JSON to a temp file** if the content is long, then use `curl -d @/tmp/telegraph.json` to avoid shell escaping issues
### Recommended Pattern for Long Content
Instead of fighting shell escaping, write the request body to a file:
```bash
# 1. Build the JSON body and write to file (via write_file tool)
# 2. POST from file
curl -s -X POST "https://api.telegra.ph/createPage" \
-H "Content-Type: application/json" \
-d @/tmp/telegraph-request.json
```
This avoids all shell escaping problems.
## Complete Workflow Example
Here's the typical flow for publishing a compiled article:
1. **Gather content** — fetch sources, compile topics
2. **Read token** — `read_file secrets/telegraph.txt`
3. **Build request body** — construct the JSON with title, author, and content nodes
4. **Write to temp file** — `write_file /tmp/telegraph-request.json` with the full request body
5. **Publish** — `exec curl -s -X POST "https://api.telegra.ph/createPage" -H "Content-Type: application/json" -d @/tmp/telegraph-request.json`
6. **Extract URL** — parse `result.url` from the response
7. **Share** — include the URL in the final message or notificationRelated Skills
weather
Get current weather and forecasts via wttr.in or Open-Meteo. Use when: user asks about weather, temperature, or forecasts for any location. NOT for: historical weather data, severe weather alerts, or detailed meteorological analysis. No API key needed.
trello
Manage Trello boards, lists, and cards via the Trello REST API.
tmux
Remote-control tmux sessions for interactive CLIs by sending keystrokes and scraping pane output.
obsidian
Work with Obsidian vaults (plain Markdown notes) and automate via obsidian-cli.
gog
Google Workspace CLI for Gmail, Calendar, Drive, Contacts, Sheets, and Docs.
github
GitHub operations via `gh` CLI: issues, PRs, CI runs, code review, API queries. Use when: (1) checking PR status or CI, (2) creating/commenting on issues, (3) listing/filtering PRs or issues, (4) viewing run logs. NOT for: complex web UI interactions requiring manual browser flows (use browser tooling when available), bulk operations across many repos (script with gh api), or when gh auth is not configured.
coding-agent
Delegate coding tasks to Codex, Claude Code, or Pi agents via background process. Use when: (1) building/creating new features or apps, (2) reviewing PRs (spawn in temp dir), (3) refactoring large codebases, (4) iterative coding that needs file exploration. NOT for: simple one-liner fixes (just edit), reading code (use read tool), thread-bound ACP harness requests in chat (for example spawn/run Codex or Claude Code in a Discord thread; use sessions_spawn with runtime:"acp"), or any work in ~/clawd workspace (never spawn agents here). Requires a bash tool that supports pty:true.
canvas
Display HTML content on connected OpenClaw nodes (Mac app, iOS, Android).
blogwatcher
Monitor blogs and RSS/Atom feeds for updates using the blogwatcher CLI.
bear-notes
Create, search, and manage Bear notes via grizzly CLI.
apple-reminders
Manage Apple Reminders via remindctl CLI (list, add, edit, complete, delete). Supports lists, date filters, and JSON/plain output.
apple-notes
Manage Apple Notes via the `memo` CLI on macOS (create, view, edit, delete, search, move, and export notes). Use when a user asks OpenClaw to add a note, list notes, search notes, or manage note folders.