linkedin · acedatacloud — скилл для Claude Code: посты и установка
Публикует текстовые и ссылочные посты в личной ленте LinkedIn через Posts API. Перед отправкой просит подтвердить текст.
Apache-2.0 215 установок ★ 17 обновлён 2026-10-25
npx skills add AceDataCloud/Skills --skill linkedin -a claude-codeЧто делает linkedin
Скилл получает идентификатор пользователя через OpenID userinfo, собирает URN автора и отправляет публикацию через LinkedIn Posts API. Ссылку он оставляет прямо в тексте: LinkedIn сам создаёт превью. После успешной отправки возвращает URN поста или его URL.
Внутри используются curl, jq и Bash. Нужны переменная LINKEDIN_TOKEN, право w_member_social и актуальный заголовок LinkedIn-Version. Без w_member_social публикация в личную ленту не пройдёт. Публикации от имени компании этим скиллом не поддерживаются.
Какие задачи решает
- опубликовать текст в личной ленте LinkedIn
- разместить ссылку на статью с автоматическим превью
- получить URN созданного поста
- проверить ошибку API при публикации
Примеры запросов агенту
- Опубликуй этот текст в моей личной ленте LinkedIn после моего подтверждения: «Анонс новой статьи о тестировании API».
- Размести ссылку
https://studio.acedata.cloudв LinkedIn как пост и сначала покажи мне итоговый текст. - Опубликуй обновление в LinkedIn и верни URL созданного поста.
Как установить linkedin
1Через Skills CLI (Vercel)
npx skills add AceDataCloud/Skills --skill linkedin -a claude-code2Вручную: положить файлы
~/.claude/skills/linkedin/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/linkedin/
1Через Skills CLI (Vercel)
npx skills add AceDataCloud/Skills --skill linkedin -a codex2Вручную: положить файлы
.agents/skills/linkedin/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add AceDataCloud/Skills --skill linkedin -a cursor2Вручную: положить файлы
.cursor/skills/linkedin/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install AceDataCloud/Skills skills/linkedin2Вручную: положить файлы
.github/skills/linkedin/SKILL.md1Через Skills CLI (Vercel)
npx skills add AceDataCloud/Skills --skill linkedin -a gemini-cli2Командой платформы
gemini skills install https://github.com/AceDataCloud/Skills --path skills/linkedinВручную: положить файлы
.devin/skills/linkedin/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add AceDataCloud/Skills --skill linkedin -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о linkedin
Как установить linkedin в Claude Code?
Выполните npx skills add AceDataCloud/Skills --skill linkedin -a claude-code. Затем проверьте файл ~/.claude/skills/linkedin/SKILL.md.
Что делает linkedin?
Скилл публикует текстовые и ссылочные посты в личной ленте LinkedIn через Posts API, а после успешной отправки возвращает идентификатор или URL поста.
Что нужно для публикации в LinkedIn?
Нужны LINKEDIN_TOKEN, право w_member_social, а также curl и jq. Скилл работает с личной лентой участника, а не со страницами компаний.
Исходный текст
SKILL.md · Apache-2.0
---
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`.
© acedatacloud · Apache-2.0 · AceDataCloud/Skills
Похожие скиллы
Все скиллы по теме «Маркетинг и контент» →Сначала — linkedin от других авторов.