Communitygithub.com

thisuxhq/dunsocial-skills

Agent skill for the DunSocial CLI — schedule and publish social posts from coding agents

¿Qué es dunsocial-skills?

dunsocial-skills is a Claude Code agent skill that agent skill for the DunSocial CLI — schedule and publish social posts from coding agents.

Compatible conClaude Code~Codex CLI~Cursor
npx skills add thisuxhq/dunsocial-skills

Preguntar en tu IA favorita

Abre un nuevo chat con esta habilidad de agente ya precargada.

Documentación

DunSocial CLI

Use the dun binary from the npm package dunsocial.

npm install -g dunsocial
npx dunsocial …

Prefer --json on every command so output is machine-parseable.

Remote hosts (ChatGPT web, Claude web) keep using DunSocial MCP. This CLI is for local agents, terminals, and CI.

Env vars override ~/.config/dunsocial/config.json.

Setup

Always: authenticate → select workspace → verify → list accounts → act.

Do not invent social account IDs. Do not treat drafts create as a successful publish.

Interactive auth

Browser approve at app.dunsocial.com/cli/authorize:

dun auth login

Headless auth (CI)

Create a PAT in the app under Settings → CLI (dun_pat_…), then:

export DUN_TOKEN="dun_pat_…"
export DUN_API_URL=https://api.dunsocial.com

DUN_API_URL is optional (defaults to production).

PAT rules:

  • Bound to one workspace; missing scope → exit 3 / forbidden
  • Cannot manage other tokens, billing, or team
  • Prefer PAT over browser session tokens in CI

Workspace

Interactive:

dun workspace list --json
dun workspace use <id-or-slug> --json

Headless (required with PAT):

export DUN_WORKSPACE_ID="…"

Verify

dun auth status --json
dun workspace current --json

Discovery order

  1. dun auth status --json
  2. dun workspace current --json (or list + use)
  3. dun accounts list --json — capture social account ids
  4. Act (schedule / publish / draft / media / memory)

Schedule a post

dun posts schedule \
  --text "Shipped from the DunSocial CLI." \
  --accounts acc_x,acc_li \
  --in 1h \
  --json

Absolute time: --at 2026-06-01T09:00:00Z.

Publish now

dun posts publish --text "Hello from dun" --accounts acc_x --json

Media

Upload first, then attach the returned asset id:

dun media upload ./shot.png --alt "Product screenshot" --json
dun posts schedule --text "…" --accounts acc_x --media <assetId> --in 30m --json

Drafts, memory, threads

dun drafts create --text "WIP" --platforms x,linkedin --json
dun memory collections list --json
dun memory save --collection <id> --text "…" --json
dun memory search --prompt "…" --collections <id> --json

Thread file shape: [{"content":"1"},{"content":"2"}]

dun posts schedule-thread --account acc_x --file ./thread.json --in 2h --json

Destructive ops

Require --yes (or CI=1) for delete.

Exit codes

CodeMeaning
0ok
1usage
2auth
3forbidden / missing scope
4validation
5not found
6rate limited
7network

Failure JSON:

{
  "ok": false,
  "error": {
    "code": "validation",
    "message": "…",
    "details": null
  }
}

Pitfalls

  • Need a workspace: workspace use, --workspace, or DUN_WORKSPACE_ID
  • --accounts expects DunSocial social account ids, not handles
  • Upload local files with media upload before attaching
  • Platform-specific options: --meta '{"reddit":{…}}' when needed
  • MCP OAuth and CLI tokens are different systems

Help

dun --help
dun posts --help

Skills relacionados