Skool

From mvanhorn/printing-press-library · View interactive version

Skool is an AI agent skill from the GitHub repository mvanhorn/printing-press-library. Every Skool community feature, plus a local SQLite mirror, FTS, and cross-community ops no other Skool tool ships.

How to use this skill

Skill file

Skool — Printing Press CLI

Prerequisites: Install the CLI

This skill drives the skool-pp-cli binary. You must verify the CLI is installed before invoking any command from this skill. If it is missing, install it first:

  1. Install via the Printing Press installer. It defaults binaries to $HOME/.local/bin on macOS/Linux and %LOCALAPPDATA%\Programs\PrintingPress\bin on Windows:

```bash

npx -y @mvanhorn/printing-press-library install skool --cli-only

```

  1. Verify: skool-pp-cli --version
  2. Ensure the reported install directory is on $PATH for the agent/runtime that will invoke this skill.

If the npx install fails (no Node, offline, etc.), fall back to a direct Go install (requires Go 1.26.6 or newer):

go install github.com/mvanhorn/printing-press-library/library/media-and-entertainment/skool/cmd/skool-pp-cli@latest

If --version reports "command not found" after install, the runtime cannot see the binary directory on $PATH. Do not proceed with skill commands until verification succeeds.

When to Use This CLI

Use this CLI when you operate or moderate a Skool community and need analytics, exports, or automation that the native UI cannot do — classroom-to-markdown export, cross-community SQL, or scheduled digests for an agent.

Unique Capabilities

These capabilities aren't available in any other tool for this API.

Local state that compounds

_Pick this for a daily/weekly cron that surfaces the 3-5 most-engaging posts from any community — perfect for catching up without scrolling._

```bash

skool-pp-cli posts top --community earlyaidopters --since 7d --top 5 --by engagement --json

```

_Pick this when an agent needs the current community leaderboard in one call without scraping the page._

```bash

skool-pp-cli leaderboard --community bewarethedefault --top 25 --json

```

_Pick this when an agent needs a single brief of community activity for a daily/weekly cron._

```bash

skool-pp-cli digest since 24h --json

```

_Pick this when an agent needs to compose a query across multiple Skool communities you own or operate._

```bash

skool-pp-cli sql 'SELECT community, COUNT(*) FROM posts GROUP BY community'

```

_Pick this before search or sql — both read the mirror, and until posts and members are hydrated the mirror is empty._

```bash

skool-pp-cli sync --community <community-slug> --resources posts,members

```

Agent-native plumbing

_Pick this when a member wants community events on their personal calendar without manual entry._

```bash

skool-pp-cli calendar export --ics > community.ics

```

_Pick this when an agent needs to ingest a course for offline reference, search, or LLM retrieval._

```bash

skool-pp-cli classroom export <course-slug> --out ./course/

```

_Pick this when an agent needs the classroom's structure rather than a lesson's text — it is the shape classroom push diffs against._

```bash

skool-pp-cli classroom course get reading-the-signals --community <slug> --json

```

_Pick this when a course is authored as markdown in git and the classroom should follow it. Plan-only by default; push never deletes._

```bash

skool-pp-cli classroom push ./lessons --community <slug> --json

```

_Pick this instead of hand-building TipTap nodes; a malformed document is rejected by Skool with no indication of which block was at fault._

```bash

skool-pp-cli posts create --group-id <id> --from-md ./announcement.md

```

HTTP Transport

This CLI uses Chrome-compatible HTTP transport for browser-facing endpoints. It does not require a resident browser process for normal API calls.

Skool splits reads and writes across two hosts, and the CLI routes each request

to the right one automatically:

moderation, notifications). Override with SKOOL_API2_BASE_URL; when

SKOOL_BASE_URL points at a mock server, writes follow it there.

The same auth_token cookie covers both.

Command Reference

calendar — Community calendar events

classroom — Classroom (courses, modules, lessons) for a community

community — Community feed, settings, and metadata

me — Current authenticated user dashboard

members — Community members and moderation

notifications — User notifications

posts — Posts (forum threads) inside a community

Freshness Contract

This printed CLI owns bounded freshness only for registered store-backed read command paths. In --data-source auto mode, those paths check sync_state and may run a bounded refresh before reading local data. --data-source local never refreshes. --data-source live reads the API and does not mutate the local store. Set SKOOL_NO_AUTO_REFRESH=1 to skip the freshness hook without changing source selection.

Covered paths:

When JSON output uses the generated provenance envelope, freshness metadata appears at meta.freshness. Treat it as current-cache freshness for the covered command path, not a guarantee of complete historical backfill or API-specific enrichment.

Finding the right command

When you know what you want to do but not which command does it, ask the CLI directly:

skool-pp-cli which "<capability in your own words>"

which resolves a natural-language capability query to the best matching command from this CLI's curated feature index. Exit code 0 means at least one match; exit code 2 means no confident match — fall back to --help or use a narrower query.

Recipes

Author a course in markdown, then plan the push

skool-pp-cli classroom push ./lessons --community <community-slug> --json

One markdown file per lesson, with frontmatter naming the course and the order:

---
course: "2. Reading the Signals"
course_order: 2
lesson: "2.1 Why the trend beats the day"
order: 1
access: open
---
The **trend** is the signal, not the day.

1. Load first
2. Then intensity

push parses the whole bundle before it touches the network, reads the live

classroom, and prints the ordered create/update plan. Courses and lessons are

matched by title (case- and whitespace-insensitively), so pushing the same

bundle twice updates the same pages instead of creating duplicates. It is

plan-only unless --apply is passed, it rate-limits itself to ~1 request per

second, it never deletes, and it refuses to send any request outside the

classroom surface. A live page the bundle does not mention is reported as an

orphan and left alone, as is a whole live course that no lesson in the bundle

names (listed once at course level, not page by page). If two live courses, or

two pages in one course, share a title the bundle targets, push stops and

asks you to rename one rather than guess which to update. --dry-run validates

the bundle and stops before reading the live classroom, so it prints no plan.

access accepts open, level:<n>, or private.

--apply is not live yet. Skool's classroom write endpoints are not in

this CLI's spec: only POST https://api2.skool.com/courses is confirmed to

exist, and its request body plus the folder-create, page-create, page-update,

reorder, and delete calls are still undiscovered. --apply fails closed with

the capture recipe. Do live smoke tests against a throwaway course only.

Read the classroom as a tree

skool-pp-cli classroom courses list --community <community-slug> --json
skool-pp-cli classroom course get reading-the-signals --community <community-slug> --json

courses list returns id, slug, title, order, and access per course. `course

get` returns the three-level tree (course → folders → pages) — the same shape

push diffs against. Add --raw to course get for the untouched Next.js

payload.

Post markdown without hand-writing TipTap

skool-pp-cli posts create --group-id <group-id> --from-md ./announcement.md
skool-pp-cli posts comment <post-id> --md 'Nice **work** — see [the thread](https://example.com/t).'

Skool stores post, comment, and lesson bodies as TipTap JSON. --md takes

markdown inline, --from-md reads it from a file (- for stdin), and both

convert to TipTap covering paragraphs, bold, ordered lists, bullet lists,

links, and headings clamped to H3 — the subset Skool's own editor round-trips.

Anything outside it is carried through as literal text rather than guessed at.

Pair with --dry-run to inspect the exact payload before sending.

Daily digest cron

skool-pp-cli sync --community <community-slug> && skool-pp-cli digest since 24h --community <community-slug> --json --select new_posts,new_members,top_comments

One sync + one query. Pipes cleanly to a scheduled agent that drafts a Slack/email digest.

Export a course to markdown

skool-pp-cli classroom export ai-foundations --out ./ai-foundations/

Recursive walk: modules → lessons → attachments + Mux URLs. One folder per course, ready for LLM ingestion.

Hydrate the local mirror, then search it

skool-pp-cli sync --community <community-slug> --resources posts,members
skool-pp-cli search "onboarding" --limit 10

sync walks the community page, unwraps pageProps.postTrees[].post for posts and the members array for members, and upserts both into SQLite. FTS search and sql read that mirror, so this is the step that makes them useful. Failures are reported per resource as {"event":"sync_error","resource":...,"error":...} under --agent.

Cross-community engagement SQL

skool-pp-cli sql 'SELECT community, COUNT(*) AS posts_30d FROM posts WHERE created_at > date("now","-30 days") GROUP BY community ORDER BY posts_30d DESC'

Read-only SQL over the local store. Works across every community you have synced.

Top 10 leaderboard

skool-pp-cli leaderboard --community bewarethedefault --top 10 --json

Current 30-day leaderboard. Members with rank, points, level, bio fields.

Multi-community use

The CLI supports any Skool community you're a member of — the auth_token cookie covers all communities you're logged into globally. Switch communities via the --community <slug> flag on any command, or change the default in ~/.config/skool-pp-cli/config.toml under [template_vars].

# Default community from config
skool-pp-cli digest since 24h

# Override per call
skool-pp-cli digest since 24h --community early-ai-adopters --json
skool-pp-cli leaderboard --community some-other-community --top 10

# Sync multiple communities into one local store (each row gets a community tag)
skool-pp-cli sync --community bewarethedefault
skool-pp-cli sync --community early-ai-adopters

# Cross-community SQL once both are synced
skool-pp-cli sql "SELECT community, resource_type, COUNT(*) FROM resources GROUP BY community, resource_type"

# Bash one-liner: daily digest across N communities
for c in bewarethedefault early-ai-adopters another-community; do
  skool-pp-cli digest since 24h --community "$c" --json --select community,new_post_count,new_posts >> ~/skool-daily-digest.jsonl
done

The community-tagged store is the foundation for the v0.3 cross-community analytics commands (at-risk members, churn cohort, engagement profile across communities).

Top posts by engagement (signal in the noise)

skool-pp-cli posts top --community earlyaidopters --since 7d --top 5 --by engagement --json
skool-pp-cli posts top --community bewarethedefault --since 24h --top 3 --by upvotes

The headline daily/weekly command. Walks paginated community feed, dedups, filters to window, ranks by upvotes / comments / engagement / newest, returns full post body so the agent has everything it needs in one call.

Auth Setup

Skool has no public API. Authenticate with the auth_token JWT cookie from your logged-in browser session: skool-pp-cli auth login (writes ~/.config/skool-pp-cli/config.toml). Add --chrome to read the cookie straight out of a logged-in Chrome profile. The auth surface is auth login, auth logout, and auth status — there is no auth set-token. Same cookie covers reads and writes; CloudFront requires a realistic User-Agent which the CLI sets automatically.

Run skool-pp-cli doctor to verify setup.

Agent Mode

Add --agent to any command. Expands to: --json --compact --no-input --no-color --yes.

```bash

skool-pp-cli calendar mock-value --community example-value --agent --select id,name,status

```

Response envelope

Commands that read from the local store or the API wrap output in a provenance envelope:

{
  "meta": {"source": "live" | "local", "synced_at": "...", "reason": "..."},
  "results": <data>
}

Parse .results for data and .meta.source to know whether it's live or local. A human-readable N results (live) summary is printed to stderr only when stdout is a terminal — piped/agent consumers get pure JSON on stdout.

Agent Feedback

When you (or the agent) notice something off about this CLI, record it:

skool-pp-cli feedback "the --since flag is inclusive but docs say exclusive"
skool-pp-cli feedback --stdin < notes.txt
skool-pp-cli feedback list --json --limit 10

Entries are stored locally at ~/.skool-pp-cli/feedback.jsonl. They are never POSTed unless SKOOL_FEEDBACK_ENDPOINT is set AND either --send is passed or SKOOL_FEEDBACK_AUTO_SEND=true. Default behavior is local-only.

Write what surprised you, not a bug report. Short, specific, one line: that is the part that compounds.

Output Delivery

Every command accepts --deliver <sink>. The output goes to the named sink in addition to (or instead of) stdout, so agents can route command results without hand-piping. Three sinks are supported:

| Sink | Effect |

|------|--------|

| stdout | Default; write to stdout only |

| file:<path> | Atomically write output to <path> (tmp + rename) |

| webhook:<url> | POST the output body to the URL (application/json or application/x-ndjson when --compact) |

Unknown schemes are refused with a structured error naming the supported set. Webhook failures return non-zero and log the URL + HTTP status on stderr.

Named Profiles

A profile is a saved set of flag values, reused across invocations. Use it when a scheduled agent calls the same command every run with the same configuration - HeyGen's "Beacon" pattern.

skool-pp-cli profile save briefing --json
skool-pp-cli --profile briefing calendar mock-value --community example-value
skool-pp-cli profile list --json
skool-pp-cli profile show briefing
skool-pp-cli profile delete briefing --yes

Explicit flags always win over profile values; profile values win over defaults. agent-context lists all available profiles under available_profiles so introspecting agents discover them at runtime.

Exit Codes

| Code | Meaning |

|------|---------|

| 0 | Success |

| 2 | Usage error (wrong arguments) |

| 3 | Resource not found |

| 4 | Authentication required |

| 5 | API error (upstream issue) |

| 7 | Rate limited (wait and retry) |

| 10 | Config error |

Argument Parsing

Parse $ARGUMENTS:

  1. Empty, help, or --help → show skool-pp-cli --help output
  2. Starts with install → ends with mcp → MCP installation; otherwise → see Prerequisites above
  3. Anything else → Direct Use (execute as CLI command with --agent)

MCP Server Installation

  1. Install the MCP server:

```bash

go install github.com/mvanhorn/printing-press-library/library/other/skool/cmd/skool-pp-mcp@latest

```

  1. Register with Claude Code:

```bash

claude mcp add skool-pp-mcp -- skool-pp-mcp

```

  1. Verify: claude mcp list

Direct Use

  1. Check if installed: which skool-pp-cli

If not found, offer to install (see Prerequisites at the top of this skill).

  1. Match the user query to the best command from the Unique Capabilities and Command Reference above.
  2. Execute with the --agent flag:

```bash

skool-pp-cli <command> [subcommand] [args] --agent

```

  1. If ambiguous, drill into subcommand help: skool-pp-cli <command> --help.
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.