What This Does
Automatically generates a working table of contents for your Substack articles with proper anchor linking, sequential numbering, and professional formatting.
Key Features:
- ✅ Extracts headings automatically
- ✅ Creates properly formatted anchor links
- ✅ Adds sequential numbering to sections
- ✅ Inserts visual separators between sections
- ✅ Optional: Python auto-extraction of POST_ID
- ✅ Optional: Learns your TOC formatting style through RCI
- ✅ HC-compliant output for future reference
Why Use This: Substack doesn't auto-generate TOCs. Manual creation is tedious and error-prone. This skill does it perfectly in 2 minutes.
How to Use
Quick Start (3 Steps)
- Launch: Click a button below to open in your preferred LLM
- Provide: Your Substack domain, POST_ID, and article content
- Get: Formatted article with working TOC - ready to paste into Substack
Launch Links
With Neural Registry (Advanced)
For consistent formatting across all your TOCs:
- Create your Neural Registry: 5-minute setup
- First use: Provide your registry URL when prompted
- Subsequent uses: Skill references your past TOC formatting
- Result: Consistent style through Recursive Context Injection (RCI)
💡 Pro Tip: With Neural Registry enabled, this skill learns your formatting preferences and applies them automatically to future TOCs.
Requirements
Essential Inputs
- Substack Domain: Your subdomain (e.g., "yourname.substack.com")
- POST_ID: Unique identifier for your article (auto-extracted if Python available)
- Article Content: Full text with headings (markdown format)
System Requirements
- LLM: Claude, ChatGPT, or Gemini (any with web_fetch capability)
- Optional: Code Execution (for auto POST_ID extraction)
- Optional: Neural Registry (for RCI/personalization)
Finding Your POST_ID
⚠️ Critical for TOC links to work:
- From URL: Visible in browser after publishing
- From Page Source: Look for data-post-id attribute
- Auto-extraction: If Code Execution available, provide article URL and skill extracts automatically
Examples
Example 1: Basic 5-Section Article
Input:
Domain: example.substack.com
POST_ID: 123456789
Content:
## Introduction
...content...
## Main Point One
...content...
## Main Point Two
...content...
## Main Point Three
...content...
## Conclusion
...content...
Output:
## Table of Contents
1. [Introduction](#introduction)
2. [Main Point One](#main-point-one)
3. [Main Point Two](#main-point-two)
4. [Main Point Three](#main-point-three)
5. [Conclusion](#conclusion)
---
## 1. Introduction
...content...
---
## 2. Main Point One
...content...
[etc...]
Example 2: Complex Headings with Special Characters
Input Heading:
## What's Next? (Important Steps)
Converted Anchor:
#whats-next-important-steps
In TOC:
1. [What's Next? (Important Steps)](#whats-next-important-steps)
Note: Original heading text preserved exactly; anchor properly sanitized for URLs.
Example 3: With Neural Registry (RCI)
Context: User has created 5 previous Substack TOCs with this skill
What Changes:
- Skill references past TOC formatting patterns
- Maintains consistent spacing preferences
- Applies any custom voice to instructional text
- Saves this TOC as 6th artifact for future reference
Result:
All TOCs have consistent formatting. Quality compounds through RCI.
Integration Guide
First Time Use (No Neural Registry)
- Click launch link above
- LLM asks: "Load Neural Registry?" → Choose "no" for now
- Provide domain, POST_ID, article content
- Copy generated output
- Paste into Substack editor
- Publish article
- TOC links work!
With Neural Registry (Recommended)
- Setup (once): Create registry at skills.masterymade.com/setup
- First use: Provide registry URL when skill asks
- Generate TOC: Skill creates formatted article
- Save artifact: Add output to your registry
- Next time: Skill references this TOC for formatting consistency
- Compound effect: Quality improves with each use
Team Use
Scenario: Multiple team members write for same Substack
- Create shared Neural Registry (team's formatting standards)
- All team members reference same registry URL
- Result: Consistent TOC formatting across all authors
- Benefit: Professional cohesive brand experience
Automation Setup (Advanced)
For power users who create TOCs frequently:
- Set up n8n workflow (guide: automation docs)
- Workflow: Receives article → Generates TOC → Saves to registry → Returns formatted output
- Result: Say "Deploy this" and entire process automated
- Time: 30 seconds vs. 3 minutes manual
Troubleshooting
TOC Links Don't Work
Most Common Issue: POST_ID doesn't match published article
Solution:
- Publish your article first
- Copy POST_ID from published URL
- Re-run skill with correct POST_ID
- Update article with new TOC
Python Auto-Extraction Failed
Cause: Code Execution not available or network issue
Solution: Skill automatically falls back to manual input. Just provide POST_ID manually.
Can't Find POST_ID
Step-by-step:
- Publish article to draft or live
- Open article in browser
- Right-click → "View Page Source"
- Search for "post_id" or "data-post-id"
- Copy the alphanumeric value
Or: Provide full article URL to skill and let Python extract it
Neural Registry Won't Load
Checklist:
- □ Is registry URL publicly accessible?
- □ Does dashboard.html have proper structure?
- □ Can you open URL in browser?
- □ Is
<script id="artifact-registry"> present?
Quick test: Open registry URL in browser. Should see HTML page with your artifacts listed.
Formatting Looks Wrong in Substack
Check:
- Are you pasting into markdown editor (not visual)?
- Did horizontal rules (---) paste correctly?
- Are heading levels preserved (##)?
Fix: Switch to markdown mode in Substack editor before pasting
Skill Won't Execute
Possible causes:
- LLM lacks web_fetch: Verify your LLM can fetch URLs
- URL incorrect: Check skill URL is exact
- Network issue: Try again or paste skill URL directly
Technical Details
How Anchor Links Work
Substack uses anchor format:
https://yourdomain.substack.com/p/POST_ID#anchor-slug
Example:
- Heading: "Introduction to Growth"
- Anchor:
#introduction-to-growth
- Full link:
https://example.substack.com/p/123456789#introduction-to-growth
Kebab-Case Conversion Rules
- Convert to lowercase
- Replace spaces with hyphens
- Remove special characters (keep: a-z, 0-9, hyphens)
- Remove consecutive hyphens
- Trim leading/trailing hyphens
HC Standard Compliance
This skill follows HyperContext Standard v1.0:
- ✅ Valid HTML5 structure
- ✅ JSON-LD metadata for discovery
- ✅ YAML frontmatter for classification
- ✅ Embedded Python helpers (optional)
- ✅ Hidden LLM instructions
- ✅ Human-readable documentation
- ✅ Neural Registry integration
- ✅ RCI-enabled outputs
- ✅ Quality gates enforced
Output Format
All artifacts include HC-compliant YAML frontmatter:
- Unique artifact_id
- ISO 8601 timestamps
- Semantic tags
- Parent/related artifact links
- 50-100 token summary (for lazy loading)
- Provenance tracking
Purpose: Makes artifacts referenceable by future skills through Neural Registry