Logo: Telegraph Publisher

Telegraph Publisher

Communautéit
artwist-polyakov
telegraph-publisher

Publish and manage Telegraph pages with media, page-view statistics, and auto-split for long articles. ALWAYS read SKILL.md before first use.

Iwwersiicht

Editeurartwist-polyakov
Repositorypolyakov-claude-skills
Skill-Nummtelegraph-publisher
Stären
218
Forks
55
Matgeliwwert Dateien
21
LizenzMIT
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 21 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    artwist-polyakov huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Telegraph Publisher an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/artwist-polyakov/polyakov-claude-skills/tree/main/plugins/telegraph-publisher/skills/telegraph-publisher
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/artwist-polyakov/polyakov-claude-skills.git /tmp/polyakov-claude-skills
mkdir -p .claude/skills
cp -r /tmp/polyakov-claude-skills/plugins/telegraph-publisher/skills/telegraph-publisher .claude/skills/telegraph-publisher
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Telegraph Publisher an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Telegraph Publisher automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Telegraph Publisher net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

telegraph-publisher

Publish content to Telegraph via API with media support. Best for: articles, research reports, documentation, illustrated content.

STOP — Read Before Acting

  • DO NOT pass raw markdown — convert to HTML fragment first (Telegraph API accepts Node JSON, the converter accepts HTML)
  • DO NOT pass content larger than 64KB without using auto-split — the script handles this automatically
  • DO NOT hardcode access tokens — use config/.env
  • DO NOT skip account setup before publishing, editing, listing pages, or reading account details — page-view lookup is public

Quick Start

No token?     → sh scripts/create_account.sh --name "Name"
Have token?   → Save to config/.env
Publish page? → sh scripts/create_page.sh --title "Title" --html "<p>Content</p>"
Edit page?    → sh scripts/edit_page.sh --path "Path-03-09" --title "Title" --html "<p>New</p>"
List pages?   → sh scripts/list_pages.sh
Page views?   → sh scripts/page_views.sh --path "Page-Title-03-09"
Account info? → sh scripts/account_info.sh
Permanent media? → sh scripts/github_upload.sh --file hero.webp --page-path page-path

Account & Ownership

Telegraph accounts are API-only (no password/email). Key concepts:

  1. create_account.sh generates access_token + one-time auth_url
  2. Open auth_url in browser to bind API account to browser session
  3. Pages belong to the account whose token was used in createPage
  4. After browser binding: pages visible at telegra.ph, editable both via browser and API
  5. Use --revoke to rotate token if compromised

See config/README.md for full ownership model.

Compatibility

Scripts are POSIX sh compatible — work in cloud sandboxes (/bin/sh) and locally. Python scripts use stdlib only (html.parser, json, sys).

Config

create_page.sh, edit_page.sh, list_pages.sh, and account_info.sh require TELEGRAPH_ACCESS_TOKEN in config/.env or environment. Creating an account and reading public page-view statistics do not require an existing Telegraph token.

Optional TELEGRAPH_AUTHOR_NAME and TELEGRAPH_AUTHOR_URL in config/.env or the environment provide author defaults. Explicit flags override each field, including empty strings, in create_page.sh and edit_page.sh. With neither a setting nor a flag, these scripts omit the field. These defaults also apply to edits: do not replace a page's different author unintentionally; pass the intended author explicitly. See config/README.md for precedence and account naming.

If the user supplies an author as [Channel Name](https://t.me/channel), pass Channel Name and https://t.me/channel as separate name and URL values. Scripts accept plain values, not Markdown author links.

For permanent media hosting, prefer a separate public GitHub repo + jsDelivr CDN. Reason: Telegraph's unofficial upload endpoint is unstable and should not be the default publishing path.

GitHub Setup (recommended)

The agent should assume this is the default permanent media backend.

Required GitHub config:

bash
GITHUB_TOKEN=ghp_...
GITHUB_ASSETS_REPO=owner/repo
GITHUB_ASSETS_BRANCH=main
GITHUB_ASSETS_BASE_DIR=pages
GITHUB_MANIFESTS_DIR=manifests

Recommended setup:

  1. Create a separate public GitHub repo only for Telegraph media
  2. Create a fine-grained PAT only for that repo
  3. Grant only:
    • Contents: Read and write
  4. Save token and repo to config/.env

Why this matters:

  • permanent asset URLs via jsDelivr
  • lower blast radius if token leaks
  • no dependency on Telegraph's glitchy upload endpoint
  • deterministic cleanup through page manifests

Agent rule:

  • if local images/diagrams need permanent hosting and GitHub config exists, use GitHub-backed media workflow by default
  • use upload.sh only as a legacy fallback

Content Format

Telegraph API accepts an array of Node objects. This skill converts HTML fragments to Node JSON automatically.

Supported HTML tags (Telegraph API whitelist): a, aside, b, blockquote, br, code, em, figcaption, figure, h3, h4, hr, i, iframe, img, li, ol, p, pre, s, strong, u, ul, video

Only href and src attributes are preserved. Unsupported tags are stripped (children kept).

Special case:

  • input HTML tables (table, thead, tr, th, td) are converted into a monospace pre block
  • use this for compact comparisons, domain spend breakdowns, KPI matrices, and similar tabular fragments
  • do not force small tables into diagrams unless the user explicitly wants a visual chart instead of exact values

See references/CONTENT_FORMAT.md for Node format details.

Scripts

create_account.sh

bash
sh scripts/create_account.sh --name "Author Name" [--author-url "https://..."]
sh scripts/create_account.sh --revoke  # rotate token

With a nonempty TELEGRAPH_AUTHOR_NAME configured, --name is optional. The public author name is kept in full; the private account label uses its first 32 Unicode characters.

account_info.sh

bash
sh scripts/account_info.sh
sh scripts/account_info.sh --with-auth-url  # include auth_url in output

create_page.sh

bash
# From HTML string
sh scripts/create_page.sh --title "Article" --html "<h3>Hello</h3><p>World</p>"

# From HTML file
sh scripts/create_page.sh --title "Article" --html-file article.html

# From pre-built Node JSON
sh scripts/create_page.sh --title "Article" --content-file nodes.json

# With author info
sh scripts/create_page.sh --title "Article" --html-file a.html --author-name "Name"
ParamRequiredDescription
--titleyesPage title (1-256 chars)
--htmlone of threeInline HTML string
--html-fileone of threePath to HTML file
--content-fileone of threePath to Node JSON file
--author-namenoAuthor name (0-128 chars); overrides configured default
--author-urlnoAuthor profile URL; overrides configured default

Auto-split: If content exceeds 60KB, automatically splits into multiple pages with an index page linking to parts.

edit_page.sh

bash
sh scripts/edit_page.sh --path "Page-Title-03-09" --title "Updated Title" --html "<p>New content</p>"
ParamRequiredDescription
--pathyesPage path (from URL or create output)
--titleyesPage title
--html / --html-file / --content-fileyesNew content
--author-namenoAuthor name; overrides configured default
--author-urlnoAuthor URL; overrides configured default

list_pages.sh

bash
sh scripts/list_pages.sh
sh scripts/list_pages.sh --offset 0 --limit 20

page_views.sh

Get total views or one calendar-period total for any public Telegraph page. No access token is required.

bash
# All-time views
sh scripts/page_views.sh --path "Page-Title-03-09"

# Views for a year, month, day, or hour
sh scripts/page_views.sh --path "Page-Title-03-09" --year 2026
sh scripts/page_views.sh --path "Page-Title-03-09" --year 2026 --month 3
sh scripts/page_views.sh --path "Page-Title-03-09" --year 2026 --month 3 --day 9
sh scripts/page_views.sh --path "Page-Title-03-09" --year 2026 --month 3 --day 9 --hour 12

Period filters are hierarchical: month requires year, day requires month, and hour requires day. The command returns one view count for the selected period, not a time series. Telegraph does not document the timezone used for day and hour filters. Use hours 0-23; the live API rejects 24 despite listing it in the API documentation.

github_upload.sh

Upload local media to the GitHub assets repo and update page manifest:

bash
sh scripts/github_upload.sh --file ./hero.webp --page-path my-page-path
sh scripts/github_upload.sh --file ./diagram.png --page-path my-page-path --name diagram-01.png
ParamRequiredDescription
--fileyesLocal asset file
--page-pathyesTelegraph page path used as manifest/asset key
--namenoOverride stored filename in GitHub

Output: commit-pinned jsDelivr URL.

Manifest behavior:

  • assets go under pages/<telegraph_path>/...
  • manifest goes under manifests/<telegraph_path>.json
  • manifest stores asset paths and SHAs for later cleanup

github_delete_page_assets.sh

Delete all GitHub-backed assets for a page using its manifest:

bash
sh scripts/github_delete_page_assets.sh --page-path my-page-path
ParamRequiredDescription
--page-pathyesTelegraph page path

Cleanup rule:

  • delete by manifest, not by title guessing
  • use Telegraph path as the stable page identifier

upload.sh

Legacy fallback for local image/video upload to Telegraph:

bash
# Best-effort only
URL=$(sh scripts/upload.sh --file /path/to/photo.jpg)

# Use in HTML
echo "<figure><img src=\"$URL\"><figcaption>My photo</figcaption></figure>"
ParamRequiredDescription
--fileyesPath to image/video (jpg, png, gif, webp, mp4; max 5MB)
--insecurenoSkip SSL verification (for HTTPS-intercepting proxies/VPNs)

Note: Uses unofficial telegra.ph/upload endpoint. Do not treat it as the primary workflow. Best-effort only — may fail behind corporate proxies/VPNs or without any obvious reason.

render_diagram.sh

Render PlantUML/Mermaid diagrams via public servers:

bash
# Get render URL (image on public server)
sh scripts/render_diagram.sh --type plantuml --file arch.puml

# Render + upload to GitHub-backed permanent media
sh scripts/render_diagram.sh --type mermaid --file flow.mmd --github-page-path my-page-path --github-name cohort.png

# Legacy fallback: render + upload via Telegraph upload
sh scripts/render_diagram.sh --type mermaid --file flow.mmd --upload
ParamRequiredDescription
--typeyesplantuml or mermaid
--fileyesPath to diagram source file
--github-page-pathnoUpload rendered file to GitHub assets under this Telegraph path
--github-namenoOverride GitHub filename for rendered asset
--uploadnoLegacy fallback: download rendered PNG and upload to Telegraph

Privacy: Diagram source is sent to plantuml.com / mermaid.ink. Do not use for confidential content.

content_converter.py (internal)

bash
# HTML → Node JSON
echo '<p>Hello <b>world</b></p>' | python3 scripts/content_converter.py

# Check serialized size (bytes)
cat nodes.json | python3 scripts/content_converter.py --check-size

# Split large content
cat nodes.json | python3 scripts/content_converter.py --split --output-dir /tmp/parts

Media Support

Images

Preferred workflow: upload local files to a dedicated public GitHub assets repo and serve them via jsDelivr.

Why GitHub is worth connecting:

  • stable permanent URLs for Telegraph pages
  • no dependency on Telegraph's glitchy unofficial upload endpoint
  • predictable asset structure for cleanup
  • easy separation between article content and media storage

Fallback workflow: use upload.sh only when GitHub-backed hosting is unavailable.

Recommended asset lifecycle:

  1. If a page contains local media, first create a draft/stub Telegraph page to get its final path
  2. Upload images/diagrams to GitHub under pages/<telegraph_path>/... via github_upload.sh
  3. Publish final content with jsDelivr URLs
  4. Store a manifest for that page with uploaded asset paths and GitHub blob SHAs
  5. On page cleanup/removal, run github_delete_page_assets.sh --page-path <telegraph_path>

Agent decision rule:

  • if the user wants permanent images, diagrams, or hero art, prefer GitHub-backed media
  • if the page is temporary and the user explicitly accepts risk, upload.sh can be used as fallback
  • if the page is being deleted or rebuilt, clean up assets through github_delete_page_assets.sh

Do not key cleanup only by page title. Titles can change. Use Telegraph path as the primary page identifier.

If a two-pass draft flow is not available, use a temporary page key and persist a manifest mapping: telegraph_path -> github asset paths.

Legacy fallback: upload local files or use public URLs:

bash
# Local file → Telegraph URL
URL=$(sh scripts/upload.sh --file photo.jpg)

Then embed in HTML:

html
<figure>
  <img src="https://telegra.ph/file/abc123.jpg">
  <figcaption>Photo caption</figcaption>
</figure>

See references/IMAGE_WORKFLOWS.md for workflows.

YouTube Embeds

YouTube URLs are automatically normalized to embed format:

html
<figure>
  <iframe src="https://www.youtube.com/watch?v=VIDEO_ID"></iframe>
</figure>

The converter transforms watch?v= and youtu.be/ URLs to /embed/ format.

See references/YOUTUBE_EMBEDS.md for details.

Diagrams

Preferred workflow: render PlantUML/Mermaid, store the image in GitHub assets, then publish jsDelivr URL.

Legacy fallback: render PlantUML/Mermaid to image and upload:

bash
# Preferred: render + GitHub upload
URL=$(sh scripts/render_diagram.sh --type plantuml --file arch.puml --github-page-path my-page-path --github-name arch.png)

# Legacy fallback
URL=$(sh scripts/render_diagram.sh --type plantuml --file arch.puml --upload)

See references/DIAGRAMS.md for details and privacy considerations.

Tables

Telegraph does not support real HTML tables as native nodes. This skill handles that by converting input HTML tables into a readable monospace pre block.

Use tables when:

  • exact values matter more than visual storytelling
  • the user needs a compact spend/domain breakdown
  • the content should stay copyable and stable in Telegraph

Use diagrams when:

  • you need trends, shares, flow, cohorts, or process explanation
  • the user benefits from visual comparison more than exact cell-by-cell reading

Mobile-first rule:

  • do not use pre tables for wide tables with 3+ dense columns or long labels
  • on mobile, wide monospace tables wrap badly and become unreadable
  • for mobile-sensitive reports, prefer one of these:
    • bar/pie/cohort diagram plus a short numeric summary
    • bullet list or mini-cards: one metric/domain per row
    • a narrow 2-column table only if the content still fits comfortably

Example input:

html
<table>
  <thead>
    <tr><th>Домен</th><th>Расход, руб.</th></tr>
  </thead>
  <tbody>
    <tr><td>metallik.ru</td><td>82 900</td></tr>
    <tr><td>mir-shtaketnika.ru</td><td>38 367</td></tr>
  </tbody>
</table>

This will be published as a boxed monospace table inside a pre block.

Optional: Illustrations with fal-ai-image

If the fal-ai-image skill is installed, you can generate illustrations before publishing:

  1. Read fal-ai-image SKILL.md first
  2. Confirm budget with user before generating (from $0.15/image)
  3. Generate images, save URLs
  4. Include URLs in HTML as <figure><img src="URL"></figure>
  5. Publish via create_page.sh

See references/FAL_AI_INTEGRATION.md for house style guide and prompt examples.

Important: telegraph-publisher works fully without fal-ai-image. This is an optional enhancement.

Limitations (v1)

  • Input: HTML fragments only (no markdown conversion)
  • No caching of API responses
  • Auto-split boundary: if a single HTML element exceeds 60KB, manual splitting required
  • upload.sh uses unofficial Telegraph endpoint and should be treated as legacy fallback only
  • Diagram rendering sends source to public servers (privacy consideration)

Matgeliwwert Dateien

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill Telegraph Publisher?

Publish and manage Telegraph pages with media, page-view statistics, and auto-split for long articles. ALWAYS read SKILL.md before first use.

Firwat Telegraph Publisher op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Telegraph Publisher besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Telegraph Publisher an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/artwist-polyakov/polyakov-claude-skills/tree/main/plugins/telegraph-publisher/skills/telegraph-publisher an. TypingMind liest d'Datei SKILL.md, bëndelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Telegraph Publisher benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Telegraph Publisher benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Telegraph Publisher domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Telegraph Publisher gratis?

Jo. artwist-polyakov huet de Skill ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇