Skip to content
Skills Library
Marketing & content · Tool integration

linkedin

/linkedin

Publish text / link posts to your LinkedIn personal feed via the LinkedIn Posts API. Use when the user mentions LinkedIn, sharing or posting an update to LinkedIn, or cross-posting an article / link to their LinkedIn feed.

Repository
Skills ↗
Licence
Apache-2.0
Last repository change
25.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
4
Deprecation

No signals detected. Repository changed on 25.10.2026, without references to retired models or APIs.

Licence

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

What it does and when to use it

Publish text / link posts to your LinkedIn personal feed via the LinkedIn Posts API. Use when the user mentions LinkedIn, sharing or posting an update to LinkedIn, or cross-posting an article / link to their LinkedIn feed.

Original author description

Publish text / link posts to your LinkedIn personal feed via the LinkedIn Posts API. Use when the user mentions LinkedIn, sharing or posting an update to LinkedIn, or cross-posting an article / link to their LinkedIn feed.

How it works

  1. Publish a post (Posts API)
  2. Fallback: legacy ugcPosts
  3. Gotchas
  4. Record the output
Original SKILL.md headings · 73 lines, 405 words
SKILL.md preview
---
name: linkedin
description: Publish text / link posts to your LinkedIn personal feed via the LinkedIn Posts API. Use when the user mentions LinkedIn, sharing or posting an update to LinkedIn, or cross-posting an article / link to their LinkedIn feed.
when_to_use: |
  Trigger when the user wants to publish a text or link share to their
  own LinkedIn feed. Posting is public on their profile — confirm the
  text (and link, if any) before publishing. Requires the
  w_member_social scope (granted by the connector at install).
connections: [linkedin]
allowed_tools: [Bash]
license: Apache-2.0
metadata:
  author: acedatacloud
  version: "1.0"
---

Call the **LinkedIn API** with `curl + jq`. The user's bearer token is in
`$LINKEDIN_TOKEN`; every call needs `Authorization: Bearer $LINKEDIN_TOKEN`.

LinkedIn posts must be authored by the member's URN. Get the member id from the
OpenID userinfo endpoint, then build `urn:li:person:{sub}`.

```bash
SUB=$(curl -sS -H "Authorization: Bearer $LINKEDIN_TOKEN" \
  "https://api.linkedin.com/v2/userinfo" | jq -r .sub)
AUTHOR="urn:li:person:$SUB"
echo "$AUTHOR"
```

Errors are JSON with `message` / `serviceErrorCode` — show them verbatim.
`401` → token expired (tokens last ~60 days), re-connect the LinkedIn connector.

## Publish a post (Posts API)

**Confirm the text with the user first.** Use the versioned Posts API; set the
`LinkedIn-Version` header to a recent `YYYYMM` (LinkedIn requires a valid recent
version — if you get `426`/version errors, bump to the current month).

```bash
jq -n --arg a "$AUTHOR" --arg t "My update text. Check out https://studio.acedata.cloud" \
  '{author:$a, commentary:$t, visibility:"PUBLIC",
    distribution:{feedDistribution:"MAIN_FEED", targetEntities:[], thirdPartyDistributionChannels:[]},
    lifecycleState:"PUBLISHED", isReshareDisabledByAuthor:false}' \
| curl -sS -X POST "https://api.linkedin.com/rest/posts" \
    -H "Authorization: Bearer $LINKEDIN_TOKEN" \
    -H "Content-Type: application/json" \
    -H "LinkedIn-Version: 202401" \
    -H "X-Restli-Protocol-Version: 2.0.0" \
    -d @- -D - -o /dev/null | tr -d '\r' | awk '/^[Xx]-[Rr]estli-[Ii]d:|^[Ll]ocation:/{print}'
```

A successful create returns `201` with the post URN in the `x-restli-id`
(or `Location`) response header — report that URN / the resulting post URL.

> Link posts: put the URL inline in `commentary` (LinkedIn auto-unfurls it).
> Rich article attachments need the assets/images API — out of scope for a
> simple text/link share; keep links inline.

## Fallback: legacy ugcPosts

If the versioned endpoint is unavailable for the app, the older
`POST https://api.linkedin.com/v2/ugcPosts` with a
`specificContent."com.linkedin.ugc.ShareContent"` body also works with
`w_member_social`. Prefer `/rest/posts` above.

## Gotchas

- **Author URN** must match the token's member (`urn:li:person:{sub}`) — you
  can't post as someone else.
- `w_member_social` only allows posting to the **member's own feed**; company
  Page posts need `w_organization_social` + an admin role (not in this connector).
- The `LinkedIn-Version` header is mandatory for `/rest/*`; a stale value
  returns a version error — bump to the current `YYYYMM`.


## Record the output

After you successfully publish and obtain the live result URL, call the built-in
`publish_artifact` tool ONCE so the user can track this deliverable in **My Outputs**:

```
publish_artifact(kind="article", channel="linkedin", title="<title>", url="<the REAL returned URL>", status="delivered")
```

Use the real returned URL — never fabricate one. Call it once per published item,
only after delivery is confirmed; skip it (or use `status="failed"`) if publishing failed.
See `_shared/artifacts.md`.

Versions

RepositoryScoreLicence
This page · AceDataCloud/Skills100Apache-2.0
seaworld008/commonly-used-high-value-skills100MIT
dreamlab-ai/agentbox100AGPL-3.0
kokasexton/koka-sexton-gtm-skills100MIT
hyperfx-ai/marketing-skills100MIT
KernelPanic92/linkedin-skills100MIT
naveedharri/benai-skills100MIT
manojbajaj95/claude-gtm-plugin100MIT
YangsonHung/awesome-agent-skills100MIT

Database snapshot: 13.11.2026 · package version aa1bd0fadfd1 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 2 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 95publish-to-linkedin
    Use when the user asks to publish, post or share content on their personal LinkedIn profile (a text post, or a post with one image), to add a comment or publish a post with a first comment containing links, to delete one of their LinkedIn posts, to automate or schedule LinkedIn…
  • 85linkedin-posts
    When the user wants to create LinkedIn post copy or optimize for LinkedIn. Also use when the user mentions "LinkedIn post," "LinkedIn article," "professional post," "post to LinkedIn," "LinkedIn content," "LinkedIn copy," "B2B LinkedIn," "LinkedIn engagement," "LinkedIn feed,"…
  • 100linkedin-preview
    Write a LinkedIn post and hand it over as one self-contained HTML page that previews the post in the LinkedIn feed (phone and desktop, with the "…more" cut), with an editor, a live 3,000-character counter and copy buttons. Use when someone asks to "write a LinkedIn post", "draft…
  • 100linkedin-marketing
    Create, optimize, and automate LinkedIn content for personal branding, lead generation, and B2B marketing. Use when someone asks to "write a LinkedIn post", "grow on LinkedIn", "LinkedIn content strategy", "LinkedIn API integration", "automate LinkedIn posting", "LinkedIn…
  • 90linkedin-content
    Write, publish, and work LinkedIn posts the way the 2026 data says wins — hooks that earn the first cohort, bodies that teach, formats that keep people on-platform, 3–5 posts a week, and a comment section run like a CRM. Every number traces to the LinkedIn Algorithm Report. Use…
  • 100linkedin-publisher
    Publish and schedule LinkedIn posts through the official API with a mandatory human approval step. Use when the user says "post this to LinkedIn", "publish", "schedule a LinkedIn post", "queue posts", "add a first comment", or wants an image, PDF carousel (document), poll or…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.