SEO/GEO content engine. Seed, cluster, roadmap, brief, write, and publish — turning keywords into live articles. Delivers a compounding pipeline of organic traffic and AI-citation-friendly content, month over month.
---
name: postking-getting-started
description: First-run flow for PostKing — authenticate, top up credits, onboard a brand from a URL, connect socials, and ship a first post.
license: MIT-0
compatibility: "Works with any MCP-compatible client connected to postking-mcp (local stdio or hosted at https://mcp.postking.app/mcp); the pking CLI is an optional fast path when a shell is available."
metadata:
icon: https://raw.githubusercontent.com/bitsandtea/postking-skills/main/assets/icons/postking-getting-started.svg
category: marketing
---
# Getting Started
The full zero-to-first-post path: connect, authenticate, fund the balance, onboard a brand from its website, connect socials, and ship a first scheduled post. This is the first skill to run for any new user or freshly-connected agent.
## When to Use
Use this as the very first skill for any new user or freshly-connected agent session: checking auth state, funding credits, onboarding the first brand, connecting social accounts, or shipping the first post. Also use it any time you hit `UNAUTHORIZED`, `INSUFFICIENT_CREDITS`, or `TRIAL_EXPIRED` from another skill and need to route back through auth/billing.
## When NOT to Use
Not for day-to-day content work once a brand is onboarded and funded — hand off to the `postking-social`/`postking` skill for calendar review, posts, blogs, and repurposing. Not for SEO, campaigns, competitor research, Reddit, or voice/quality passes — those are their own skills (`postking-seo`, `postking-storylines`, `postking-competitor-intel`, `postking-reddit`, `postking-brand-voice`).
## Minimal tool subset
This skill needs 17 tools out of PostKing's 200+, grouped by stage:
**Auth**
- `health` — no-auth status check; always call this first.
- `login_start`, `login_complete` — stdio device-flow authentication.
**Credits & billing**
- `get_credits` — check balance and free-tier status.
- `billing_list_packs` — list one-off credit packs.
- `billing_topup` — buy a pack.
- `billing_wallet` — check the unified credit balance.
- `billing_list_tiers` — list subscription tiers.
- `billing_subscribe` — start a subscription.
**Brand onboarding**
- `onboard_brand` — crawl a website, analyze audience, generate themes.
- `create_brand` — manual brand creation without a website crawl.
- `get_onboarding_status` — poll onboarding progress.
- `list_themes` — review generated content themes.
**Socials**
- `check_social_accounts` — see what's connected.
- `generate_connect_link` — get an OAuth link for a platform.
**First post**
- `generate_post` — draft post variations.
- `approve_post` — lock in a variation and schedule.
(`whoami` and `logout` are also available if you need to confirm identity or sign out, but aren't required for this flow.)
## Prerequisites
None — this is the first skill to run when connecting to PostKing.
## Pacing rules
This is a multi-stage flow. Obey these rules throughout:
1. **One stage per turn.** Run the current stage, present the result, then stop and wait for the user. Don't chain into the next stage in the same turn, even on success.
2. **Never reuse remembered values without confirmation.** Brand names, website URLs, social handles, theme choices, and post topics must be reconfirmed in the current conversation — don't pull them from prior sessions or long-term memory without surfacing the value and asking the user to confirm it.
3. **Fail loudly, never silently retry.** If a stage fails, stop, surface the error verbatim, and ask the user how to proceed.
4. **Zero brands means onboarding is required**, not optional — never skip ahead to other work without a brand.
## Procedure
### Step 1 — Check health first
Call `health`. This requires no authentication and tells you whether you're already logged in and what to do next. Always start here.
- **Remote/OAuth transport** (client connected to `https://mcp.postking.app` via an OAuth-aware host): `health` reports that authentication already happened at the connector. Do not call `login_start` — there's no in-session login step.
- **Local stdio transport**: `health` reports whether a token is stored. If not, continue to Step 2.
### Step 2 — Authenticate (stdio only)
Call `login_start`. It returns a URL and a short code and begins polling on its own — the tool call itself waits for the browser approval step and reports success or timeout; you don't need a separate confirmation turn.
Show the URL and code to the user verbatim (no paraphrasing or redaction) and tell them to open it and approve. Use `login_complete` only if your client's flow separates "start" from "poll" — most stdio clients handle both in one `login_start` call.
### Step 3 — Check credits
Call `get_credits` (`detail: "short"` for just the number, `"full"` for complete billing context).
- Healthy balance → continue to Step 5 (brand onboarding).
- `0`, or a later operation returns `INSUFFICIENT_CREDITS` → go to Step 4.
### Step 4 — Fund the balance
Ask the user once which they prefer: a one-off credit pack (agent-native default, instant off-session charge) or a subscription.
**One-off pack:**
1. `billing_list_packs` — SKUs `agent_4`/`agent_5`/`agent_25`/`agent_50` = $4/160cr, $5/220cr, $25/1200cr, $50/2600cr. The $5 pack covers a full demo run (a week of posts + SEO pipeline + a landing page). Show the options and let the user pick — don't guess.
2. `billing_topup({ packSku: "<chosen>" })`:
- **`status: "paid"`** (common case, card on file) — instant off-session charge; response includes the new `balance`. Done immediately, do not poll.
- **`checkoutUrl` returned** (no card on file) — present the URL, have the user complete Stripe Checkout, then poll `billing_wallet` every few seconds (cap ~5 minutes) until `credits` rises by the expected amount. Hosted Checkout sessions expire after ~30 minutes of inactivity — call `billing_topup` again for a fresh URL if that happens.
**Subscription:**
1. `billing_list_tiers` — GROWTH / PRO / ENTERPRISE. Ask which tier.
2. `billing_subscribe({ tier, interval })` (`interval: "month"` or `"year"`) — returns a `checkoutUrl`. Human-completion is the cleanest path: the user completes Checkout, the webhook provisions the account (grants credits, activates the plan).
3. Poll `billing_wallet` (or `get_credits`) every few seconds (cap ~5 minutes) until the subscription is active. The agent spends from the same unified `User.credits` pool either way — there's no separate agent wallet.
### Step 5 — Onboard a brand
- `get_onboarding_status` (or check via `health`/prior context) to see whether a brand already exists. If the user has zero brands, onboarding is required — don't proceed to anything else.
- If zero brands: ask the user two questions in the current conversation, one at a time if the UI supports it — (1) "What's the name of the brand?", (2) "What's the website URL to analyze?" If a plausible value exists from prior context, surface it as a suggestion only ("Last time you mentioned `acme.com` — still right, or different?") and wait for explicit confirmation. Never onboard silently on remembered values.
- `onboard_brand({ websiteUrl, name })` — crawls the site, analyzes audience, generates themes. Typically 30–90s.
- Or `create_brand({ name, description, tone, audience })` for manual setup without a crawl.
- `get_onboarding_status({ brandId })` — poll until analysis/theme generation finishes.
- `list_themes({ brandId })` — surface the generated themes (titles + one-line gloss each) and ask the user whether to keep, edit, or regenerate. Don't proceed silently.
- If the user already has ≥1 brand with none active, don't auto-onboard — ask which existing brand to use, or whether to add a new one.
**Deeper brand & theme editing (optional, outside this skill's minimal subset)** — `get_brand_info` for the full audience/positioning reveal, `edit_theme`/`delete_theme`/`generate_themes` for individual theme edits or regeneration. These are covered in the `postking` skill; use them there once onboarding is complete if the user wants finer control.
### Step 6 — Connect socials
- `check_social_accounts({ brandId })` — see what's connected.
- Ask the user which platform(s) they want connected before running anything — don't pick a default silently.
- `generate_connect_link({ brandId, platform })` — platforms: `linkedin`, `x`, `instagram`, `threads`, `facebook`. Show the URL and ask the user to confirm once they've completed OAuth.
### Step 7 — First post
- Confirm with the user which connected platform and which reviewed theme to use — don't pick silently.
- `generate_post({ brandId, platform, variations: 3 })` — show the variations.
- `approve_post({ postId, variation, schedule })` — locks it in.
- Hand off to the `postking` skill from here for calendar review and everything else day-to-day.
## CLI fast path
If a shell is available, the same flow via `pking` (npm package `postking-cli`):
```
pking me # check auth
pking login-start # print URL+code (device flow)
pking login-finish # complete after user approves
pking user credits # check balance
pking billing packs # list one-off packs
pking billing topup --pack <sku> # buy a pack
pking billing tiers # list subscription tiers
pking billing subscribe --tier <TIER> [--interval year]
pking onboard <websiteUrl> --name "<Name>" # crawl + analyze + themes
pking brand create <name> --description "..." --tone "..." --audience "..." # manual
pking brand themes list # review generated themes
pking social check # see connected accounts
pking social connect-platform --platform <linkedin|x|instagram|threads|facebook>
pking posts generate --platform <p> --variations 3
pking posts approve <postId> --variation <n> --schedule <iso>
```
`pking login` (unsplit) blocks for up to 15 minutes polling — prefer `login-start` / `login-finish` in an agent context to avoid timeouts. For new users without an account yet, `pking register-start --email <email>` / `pking register-finish` runs the equivalent magic-link registration flow.
## Expected Output
- Confirmed auth state (already-authenticated via transport, or freshly authenticated via device flow).
- A funded balance — instant charge, completed Checkout, or active subscription.
- A populated brand profile (tone, audience, reviewed themes).
- 1+ connected social platform.
- At least one scheduled post.
## Pitfalls
- `INSUFFICIENT_CREDITS` (HTTP 402) — balance too low. Run Step 4.
- `RATE_LIMITED` — back off using the `retryAfter` value in the error envelope before retrying.
- `UNAUTHORIZED` — the stored token is invalid or expired. Re-run `login_start` (stdio) or reconnect the connector (remote/OAuth transport).
- `TRIAL_EXPIRED` — upgrade via the `checkoutUrl` returned in the error envelope.
- `VALIDATION` — invalid email format or a missing required field.
- `NOT_FOUND` on the onboarding/audience status — analysis hasn't finished yet; wait briefly and retry once on the user's say-so, don't loop silently.
- Stripe Checkout session expired (~30 min inactivity) — call `billing_topup` or `billing_subscribe` again for a fresh `checkoutUrl`.
## Verification
- `health` should return successfully and report the current auth state before doing anything else.
- After onboarding, `get_onboarding_status({ brandId })` should report a terminal (non-running) state.
- `check_social_accounts({ brandId })` should reflect the platform just connected.
## Next steps
Once authenticated, funded, and onboarded:
- `postking` — day-to-day content: posts, content weeks, repurposing, blogs, landing pages, visuals, trends.
- `postking-seo` — SEO / GEO from seed keywords to published articles.
- `postking-storylines` — multi-channel marketing campaigns (Storylines).
- `postking-competitor-intel` — discover, register, and analyze a brand's competitors.
don't have the plugin yet? install it then click "run inline in claude" again.
extracted implicit decision logic into explicit if-else branches, added comprehensive edge case handling (rate limits, auth expiry, checkout timeouts, empty results, network failures), documented all external connections (Stripe, OAuth) with setup context, clarified pacing rules as a formal constraint, and added verification checks and outcome signals.
zero-to-first-post onboarding for PostKing. covers auth, credit funding, brand onboarding from a website, social account connection, and scheduling your first post. run this once per new user or fresh agent session. if you hit UNAUTHORIZED, INSUFFICIENT_CREDITS, or TRIAL_EXPIRED from any other skill, loop back through the relevant stage here.
external connections
login_start flow generates one.billing_topup and billing_subscribe return checkout URLs. user completes payment in a browser; webhooks provision credits. handle checkout session expiry (30 min inactivity) by re-calling the topup/subscribe tool for a fresh URL.context & parameters
health check)linkedin, x, instagram, threads, facebook)approve_post)Step 1: health check (always first)
call health with no auth required. response tells you:
inputs: none.
outputs: authenticated (bool), credits (int), brand_count (int), next_step (string).
Step 2: authenticate (stdio only; skip if remote OAuth)
call login_start. it returns a device-flow URL and short code, then blocks polling for browser approval (typically up to 15 minutes).
show the user the URL and code verbatim (do not paraphrase or redact). tell them to open the URL in a browser, enter the code if prompted, and approve.
use login_complete only if your client separates the start/poll flow. most stdio clients handle both in a single login_start call.
inputs: none.
outputs: token (JWT), authenticated: true, or timeout error (surface and ask user to retry).
Step 3: check credits
call get_credits with detail: "short" (just the number) or "full" (complete billing context).
inputs: detail (string, default "short").
outputs: credits (int), free_tier (bool), subscription_active (bool), next_renewal (ISO 8601, if applicable).
Step 4: fund the balance (if credits = 0 or insufficient)
ask the user once: one-off pack or subscription?
4a. one-off credit pack (agent-native, instant):
billing_list_packs. response lists SKUs: agent_4 ($4, 160 cr), agent_5 ($5, 220 cr), agent_25 ($25, 1200 cr), agent_50 ($50, 2600 cr). the $5 pack covers a full demo (a week of posts + SEO pipeline + landing page).billing_topup({ packSku: "<chosen>" }).status: "paid" returned (card on file): instant charge; response includes new balance. done immediately, do not poll.checkoutUrl returned (no card on file): present the URL to user. user completes Stripe Checkout. then poll billing_wallet every 2-3 seconds (timeout cap 5 minutes) until credits rises by the expected amount. if Checkout expires (~30 min inactivity), call billing_topup again for a fresh URL.inputs: packSku (string).
outputs: status (string: "paid" or "pending"), balance (int), checkoutUrl (string, conditional).
4b. subscription (recurring billing):
billing_list_tiers. response lists tiers: GROWTH, PRO, ENTERPRISE."month" or "year").billing_subscribe({ tier, interval }). response includes checkoutUrl.billing_wallet or get_credits every 2-3 seconds (timeout cap 5 minutes) until subscription_active: true.inputs: tier (string), interval (string: "month" or "year").
outputs: checkoutUrl (string), subscription_active (bool), next_billing_date (ISO 8601).
Step 5: onboard a brand
call get_onboarding_status or check prior context to see if a brand exists. rule: zero brands means onboarding is mandatory , do not skip ahead.
5a. if zero brands: ask the user two questions in the current conversation (one at a time if UI allows):
if a plausible value exists from prior context, surface it as a suggestion only ("last time you mentioned acme.com , still right, or different?") and wait for explicit confirmation. never onboard silently on remembered values.
then call onboard_brand({ websiteUrl, name }). crawls site, analyzes audience, generates themes. typical runtime 30-90 seconds.
alternatively, call create_brand({ name, description, tone, audience }) for manual setup (no crawl).
inputs: websiteUrl (string), name (string) OR description, tone, audience (strings for manual).
outputs: brandId (string), onboarding_status (string: "running", "complete"), analysis (object with audience insights).
5b. poll onboarding until complete:
call get_onboarding_status({ brandId }) every 5-10 seconds until status is not "running" (should report "complete" or terminal state).
inputs: brandId (string).
outputs: status (string), themes_count (int), analysis_complete (bool).
5c. review themes:
call list_themes({ brandId }). response includes titles and one-line gloss for each theme.
surface the themes to user and ask: keep, edit, or regenerate? do not proceed silently.
for deeper editing (edit individual themes, delete, regenerate), use edit_theme, delete_theme, or generate_themes , those are covered in the main postking skill. stay in this minimal subset unless user asks.
inputs: brandId (string).
outputs: themes (array of objects with id, title, description).
5d. if user already has ≥1 brand (and none active):
ask which existing brand to use, or whether to add a new one. do not auto-onboard.
Step 6: connect social accounts
call check_social_accounts({ brandId }). response lists connected platforms.
ask user which platform(s) they want to connect before running anything , do not pick a default.
for each platform, call generate_connect_link({ brandId, platform }). platforms: linkedin, x, instagram, threads, facebook.
response includes an OAuth URL. show it to user. user completes OAuth in browser and approves access.
after user confirms completion, do not re-call generate_connect_link , the OAuth redirect handles account provisioning. next time you call check_social_accounts, the platform should appear in the connected list.
inputs: brandId (string), platform (string: one of linkedin, x, instagram, threads, facebook).
outputs: connectUrl (string).
Step 7: first post
confirm with user: which connected platform? which theme?
do not pick silently.
call generate_post({ brandId, platform, variations: 3 }). response includes 3 post variations (text, visuals, metadata).
show variations. ask user which one they like.
call approve_post({ postId, variation, schedule }). locks the variation and schedules publish time.
schedule is ISO 8601 (e.g., 2025-01-15T14:00:00Z). ask user what time they want; convert to ISO 8601 before calling.
response confirms the post is scheduled.
hand off to the postking skill for calendar review and day-to-day work after this.
inputs: brandId (string), platform (string), variations (int, default 3).
outputs: postId (string), variations (array of post objects with text, visuals, metadata).
then:
inputs: postId (string), variation (int, 0-indexed), schedule (ISO 8601).
outputs: status (string: "scheduled"), publish_time (ISO 8601), platform (string).
if health reports already authenticated (remote OAuth):
skip Step 2. proceed directly to Step 3 (credit check).
if health reports no token stored (stdio):
run Step 2 (login flow).
if credits = 0 or later call returns INSUFFICIENT_CREDITS (HTTP 402):
run Step 4 (fund balance). after funding, return to the step that failed and retry.
if user has ≥1 existing brand and none is active: ask user to pick an existing brand to use, or start onboarding a new one. do not auto-select.
if onboard_brand returns checkoutUrl for Stripe payment (no card on file):
present URL to user. user completes payment. poll billing_wallet every 2-3 seconds (cap 5 minutes) until credits balance increases. if checkout expires, re-call billing_topup for a fresh URL.
if get_onboarding_status returns NOT_FOUND or analysis is still running:
wait a few seconds and retry once on user's say-so. do not loop silently.
if Stripe Checkout session expires (~30 min inactivity):
call billing_topup or billing_subscribe again to generate a fresh checkout URL.
if login_start times out (no browser approval within 15 min):
surface the timeout error verbatim. ask user to retry.
if generate_connect_link returns an error (platform unavailable, invalid brand):
surface the error. ask user to verify brand ID and platform choice, then retry.
if user confirms no preference for a stage (e.g., which pack to buy, which platform to connect): ask again. do not guess or proceed with a default.
successful first-run completion delivers:
authenticated: true. local token stored (stdio) or OAuth session active (remote).credits > 0. either instant charge, completed Checkout, or active subscription verified.onboarding_status: "complete", populated audience analysis, and ≥1 reviewed theme.check_social_accounts lists the platform(s).approve_post confirms status: "scheduled" and includes publish_time in ISO 8601.files/artifacts:
user knows this skill worked when:
health returns authenticated: true without error.get_credits shows credits > 0 and no warning about insufficient balance.health or any brand query) with onboarding complete and themes visible.check_social_accounts shows the platform they connected (e.g., LinkedIn, X).approve_post returns a scheduled post with a future publish_time and status: "scheduled".postking skill, SEO campaigns in postking-seo).if any step fails, it surfaces the error verbatim. user confirms next action and retry is explicit (no silent loops).
if a shell is available, the same flow via pking (npm package postking-cli):
pking me # check auth and credits
pking login-start # print URL+code (device flow)
pking login-finish # complete after user approves
pking user credits # check balance
pking billing packs # list one-off packs
pking billing topup --pack <sku> # buy a pack
pking billing tiers # list subscription tiers
pking billing subscribe --tier <TIER> [--interval year]
pking onboard <websiteUrl> --name "<Name>" # crawl + analyze + themes
pking brand create <name> --description "..." --tone "..." --audience "..." # manual
pking brand themes list # review generated themes
pking social check # see connected accounts
pking social connect-platform --platform <linkedin|x|instagram|threads|facebook>
pking posts generate --platform <p> --variations 3
pking posts approve <postId> --variation <n> --schedule <iso>
prefer pking login-start / pking login-finish in an agent context to avoid 15-minute block timeouts. for new users without an account yet, pking register-start --email <email> / pking register-finish runs the equivalent magic-link registration flow.
retryAfter value in the error envelope before retrying. do not hammer the endpoint.login_start (stdio) or reconnect the connector (remote/OAuth).checkoutUrl returned in the error envelope.billing_topup or billing_subscribe again for a fresh checkoutUrl.onboard_brand: crawl or analysis is slow. wait 10-15 seconds, then poll get_onboarding_status without re-calling onboard_brand. if timeout persists, ask user whether to skip this brand or retry.list_themes: onboarding may not have generated themes yet. wait a few seconds and retry. if still empty, offer manual theme creation via the postking skill.name and at least one of description or audience are mandatory. surface the validation error and ask user to provide missing fields.before claiming success, run these checks:
health returns successfully and reports current auth state.get_onboarding_status({ brandId }) reports a terminal non-running state (usually "complete").check_social_accounts({ brandId }) reflects the platform(s) just connected (should not be empty).approve_post response includes status: "scheduled" and a future publish_time.billing_wallet or get_credits shows subscription_active: true.once authenticated, funded, and onboarded:
credits: original source clawhub. rewritten to Implexa standards: explicit decision logic, edge case handling, auth/billing detail, one-stage-per-turn pacing rules, and outcome signals.