linkedin-post
Use this skill for LinkedIn feed posts.
Prerequisites:
- OpenClaw CLI is installed
- OpenClaw browser automation is enabled
- the chosen browser profile is already logged into LinkedIn
- a gateway token is available either through
OPENCLAW_GATEWAY_TOKENor anopenclaw.jsonconfig file
Keep the workflow strict:
- Confirm the user wants a feed post, not an article.
- Finalize the post copy first.
- Prepare the composer and fill the content.
- Only click Post after explicit user approval.
Workflow
1. Finalize the copy
Do not open the composer until the copy is settled enough to paste.
If the user is still iterating on tone or structure, finish that first.
2. Prepare the browser session
Use OpenClaw browser CLI, not manual shell hacks.
The environment may need the gateway token even when browser support is enabled.
The helper script reads the token in this order:
OPENCLAW_GATEWAY_TOKEN- the file passed with
--config ~/.openclaw/openclaw.json
If browser commands fail unexpectedly, check:
- the browser profile is correct and already logged into LinkedIn
- a gateway token is present
openclaw browser status --profile <profile>succeeds
3. Use the helper script
Use scripts/linkedin_post.py for the normal workflow. It:
- starts the browser profile if needed
- opens the LinkedIn feed share modal
- finds the composer textbox from the snapshot
- fills the content
- optionally clicks Post
Prepare only
python3 scripts/linkedin_post.py --content-file /tmp/linkedin_post.txt
or
cat /tmp/linkedin_post.txt | python3 scripts/linkedin_post.py
If the token is not already exported, pass a config file explicitly:
python3 scripts/linkedin_post.py --content-file /tmp/linkedin_post.txt --config ~/.openclaw/openclaw.json
This fills the post body and stops before publishing.
Publish after approval
python3 scripts/linkedin_post.py --content-file /tmp/linkedin_post.txt --publish
Only run --publish after the user clearly says to post it.
Safety rule
Preparing the composer is reversible. Publishing is external side effect.
Before --publish, make sure the user has already approved:
- the exact body text
- any link included in the post
- that this should go to LinkedIn now
If approval is ambiguous, stop at prepare-only mode and ask.
Notes
- This skill is for
https://www.linkedin.com/feed/?shareActive=true, not LinkedIn article publishing. - LinkedIn article pages such as
/post/new/or/article/new/are different flows. Do not confuse them with feed posting. - The skill depends on the
openclawCLI binary and browser subcommands being available on the host. - The skill assumes LinkedIn authentication already exists in the selected browser profile. It does not perform account login or two-factor setup.
- After filling the body, re-snapshot if needed to confirm link unfurl and that the Post button is enabled.
- If refs change, re-run snapshot and let the helper script rediscover them instead of hardcoding stale refs.