Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/anthonydavidadams/substack-api-reference/substack-api-referencenpx skills add AnthonyDavidAdams/substack-api-reference --skill substack-api-referencegit clone --depth 1 https://github.com/AnthonyDavidAdams/substack-api-referenceWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00068 | $0.01453 |
| Opus 5 | $0.00034 | $0.00727 |
| Sonnet 5 | $0.00014 | $0.00291 |
| Haiku 4.5 | $0.00007 | $0.00145 |
Grade A, and why
substack-api scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
- [`examples/`](examples/) — drop-in curl + TypeScript code How it starts
The opening of the file, as written. The whole thing — 178 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Substack API Skill
You can drive Substack programmatically using their internal cookie-authenticated API. There is no public API key program — auth is the session cookie a normal browser uses.
When to use this skill
Trigger phrases (not exhaustive):
- "post to Substack" / "send via Substack"
- "create a draft in [my Substack]"
- "publish to {publication}.substack.com"
- "import my Substack subscribers"
- "read my Substack posts"
- "schedule a Substack send"
Before you do anything
You need TWO pieces of state from the user:
- Session cookie —
connect.sidvalue (orsubstack.sidon older accounts). SeeAUTH.mdfor how to obtain. - Publication subdomain — e.g.
yournewsletter(NOT the full URL). Get this from/api/v1/user/profile/selfif not supplied.
Always confirm both before making mutating calls. If the user supplied a URL
like https://yournewsletter.substack.com, parse out the subdomain.
Canonical request shape
Cookie: connect.sid=<value>; substack.sid=<value>
User-Agent: Mozilla/5.0
Mozilla/5.0 is enough — default Node/Python User-Agents get 403'd.
The five operations you'll actually do
1. Validate a cookie + discover the user's publications
GET https://substack.com/api/v1/user/profile/self
Returns {id, handle, publicationUsers: [{publication: {id, name, subdomain}, role, is_primary}]}.
- Any 200 = cookie valid
- 401 = cookie expired or wrong
- Pick the publication via subdomain — show user a picker if multiple exist
2. Create a draft (no send)
POST https://{subdomain}.substack.com/api/v1/drafts
Content-Type: application/json
{
"draft_title": "Subject line",
"draft_subtitle": "Optional preheader",
"draft_body": "<p>HTML body</p>",
"type": "newsletter"
}
draft_body accepts HTML. Substack will normalize. Returns the draft object
with id and slug.
3. Update an existing draft (Replace flow)
PUT https://{subdomain}.substack.com/api/v1/drafts/{id}
Content-Type: application/json
{ "draft_title": "...", "draft_subtitle": "...", "draft_body": "..." }
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- yesterday First seen · 178 lines · 68 tokens per session scan A 6120983d3add
substack-api is a skill published in the GitHub repository AnthonyDavidAdams/substack-api-reference (5 stars, last pushed 2mo ago), licensed MIT. It adds 68 tokens to every session and 1,453 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
razbor-servisa
Метод-рефлекс: как превратить ЛЮБОЙ сторонний сервис в CLI-инструмент для агента, когда у сервиса нет удобного «разъёма». Скилл сам определяет ситуацию доступа (есть открытый API / API кривой и неполный / API нет вообще) и ведёт по нужной ветке: собрать по докам API, либо подсмотреть скрытый API прямо в браузере …
horse-websocket
Guidelines and workflows for developing and maintaining WebSocket endpoints and protocol upgrades within the Horse framework.
horse-streaming
Diretrizes e workflows para desenvolvimento e manutenção de transmissões de dados em tempo real (Web Streams e Server-Sent Events - SSE) no framework Horse.
higgsfield-shotlist-director
Turns a brief, script, scene breakdown, treatment, or story idea into ONE connected director's shotlist for Seedance 2.0 — a single editable HTML artifact with a global Style Prefix, an @-asset glossary, and named per-scene prompts (1a, 1b, 2a…) each in Style → Characters → Scene → CUT 1..N form. Use whenever the user…
developing-preact
Specialized Preact development skill for standards-based web applications with native-first architecture and minimal dependency footprint. Use when building Preact projects, particularly those involving data visualization, interactive applications, single-page apps with HTM syntax, Web Components integration, CSV/JSON…
creating-bookmarklets
Creates browser-executable JavaScript bookmarklets with strict formatting requirements. Use when users mention bookmarklets, browser utilities, dragging code to bookmarks bar, or need JavaScript that runs when clicked in the browser toolbar.