golink CLI
Use golink as the source of truth for LinkedIn automation. Prefer CLI commands
over editing local state files directly. Default to non-destructive inspection
and dry-runs until the user explicitly asks to publish, delete, approve, or run a
queued mutation.
For command examples and troubleshooting, read references/cli-reference.md.
Operating Rules
- Verify the binary first:
golink version.
- Prefer
--json for single results and --output=jsonl for streams.
- Run
golink doctor before diagnosing auth, scope, redirect, or API support issues.
- Use
--dry-run for mutating commands unless the user clearly wants live LinkedIn changes.
- Use
--require-approval for agent-driven publishing workflows.
- Use
--idempotency-key for retryable mutations.
- Never print or store access tokens, refresh tokens, client secrets, PKCE codes, or OAuth callback URLs containing
code=.
- Never edit keyring, audit, approval, idempotency, schedule, or cassette files by hand unless the user explicitly asks for repair.
- Treat
unsupported as an expected LinkedIn entitlement/scope result, not necessarily a CLI bug.
Setup Workflow
- Check local readiness:
golink version
golink doctor
- If unauthenticated, confirm required env vars without revealing values:
test -n "$GOLINK_CLIENT_ID" && echo GOLINK_CLIENT_ID=set || echo GOLINK_CLIENT_ID=missing
test -n "$GOLINK_REDIRECT_PORT" && echo GOLINK_REDIRECT_PORT=set || echo GOLINK_REDIRECT_PORT=missing
- Authenticate only when user expects an interactive browser flow:
golink auth login
golink --json auth status
golink doctor
- If the user needs LinkedIn app setup instructions, point them to
LINKEDIN_SETUP.md in this repo.
Mutation Workflow
- Inspect state:
golink --json auth status and golink doctor.
- Build the command with explicit flags; do not rely on prompts in agent mode.
- Dry-run:
golink --json --dry-run post create --text "..." --visibility PUBLIC
- For reviewable work, create a plan or approval entry:
golink --json plan post create --text "..." --visibility PUBLIC > plan.json
golink --json execute plan.json --dry-run
- Execute live only after user confirmation or an existing approved plan:
golink --json execute plan.json
Agent-Specific Guidance
- Codex: use this skill normally; run shell commands in the repo root or the user's requested working directory.
- OpenClaw: use the same command contract; prefer JSON output and approval gates because the agent may not preserve long interactive context.
- Hermes: keep commands deterministic and idempotent; include
--json, explicit flags, and stable idempotency keys for live mutations.
All agents should summarize command outcomes without exposing sensitive env vars
or OAuth/token material.
Common Commands
Read references/cli-reference.md for examples covering auth, posting, org
posting, comments, reactions, scheduling, approval, plan/execute, output modes,
and record/replay.
1---2name: golink-cli3description: Use this skill when an agent needs to operate the golink LinkedIn CLI: setup verification, auth login/status/refresh/logout, dry-runs, JSON/JSONL output, creating/editing/deleting/resharing posts, comments, reactions, organization posting, scheduled posts, approval gates, plan/execute workflows, record/ replay, privacy-safe automation, or troubleshooting LinkedIn app scopes and redirect configuration. Applies to Codex, OpenClaw, Hermes, and other CLI- capable agents.4---56# golink CLI78Use `golink` as the source of truth for LinkedIn automation. Prefer CLI commands9over editing local state files directly. Default to non-destructive inspection10and dry-runs until the user explicitly asks to publish, delete, approve, or run a11queued mutation.1213For command examples and troubleshooting, read `references/cli-reference.md`.1415## Operating Rules1617- Verify the binary first: `golink version`.18- Prefer `--json` for single results and `--output=jsonl` for streams.19- Run `golink doctor` before diagnosing auth, scope, redirect, or API support issues.20- Use `--dry-run` for mutating commands unless the user clearly wants live LinkedIn changes.21- Use `--require-approval` for agent-driven publishing workflows.22- Use `--idempotency-key` for retryable mutations.23- Never print or store access tokens, refresh tokens, client secrets, PKCE codes, or OAuth callback URLs containing `code=`.24- Never edit keyring, audit, approval, idempotency, schedule, or cassette files by hand unless the user explicitly asks for repair.25- Treat `unsupported` as an expected LinkedIn entitlement/scope result, not necessarily a CLI bug.2627## Setup Workflow28291. Check local readiness:30 ```sh31 golink version32 golink doctor33 ```342. If unauthenticated, confirm required env vars without revealing values:35 ```sh36 test -n "$GOLINK_CLIENT_ID" && echo GOLINK_CLIENT_ID=set || echo GOLINK_CLIENT_ID=missing37 test -n "$GOLINK_REDIRECT_PORT" && echo GOLINK_REDIRECT_PORT=set || echo GOLINK_REDIRECT_PORT=missing38 ```393. Authenticate only when user expects an interactive browser flow:40 ```sh41 golink auth login42 golink --json auth status43 golink doctor44 ```454. If the user needs LinkedIn app setup instructions, point them to46 `LINKEDIN_SETUP.md` in this repo.4748## Mutation Workflow49501. Inspect state: `golink --json auth status` and `golink doctor`.512. Build the command with explicit flags; do not rely on prompts in agent mode.523. Dry-run:53 ```sh54 golink --json --dry-run post create --text "..." --visibility PUBLIC55 ```564. For reviewable work, create a plan or approval entry:57 ```sh58 golink --json plan post create --text "..." --visibility PUBLIC > plan.json59 golink --json execute plan.json --dry-run60 ```615. Execute live only after user confirmation or an existing approved plan:62 ```sh63 golink --json execute plan.json64 ```6566## Agent-Specific Guidance6768- **Codex**: use this skill normally; run shell commands in the repo root or the user's requested working directory.69- **OpenClaw**: use the same command contract; prefer JSON output and approval gates because the agent may not preserve long interactive context.70- **Hermes**: keep commands deterministic and idempotent; include `--json`, explicit flags, and stable idempotency keys for live mutations.7172All agents should summarize command outcomes without exposing sensitive env vars73or OAuth/token material.7475## Common Commands7677Read `references/cli-reference.md` for examples covering auth, posting, org78posting, comments, reactions, scheduling, approval, plan/execute, output modes,79and record/replay.