Install
$ agentstack add skill-sergebulaev-linkedin-skills-linkedin-reply-handler ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
LinkedIn Reply Handler
Drafts a reply to a specific LinkedIn comment. Correctly handles LinkedIn's 2-level thread flattening: if you're replying to a reply, the Publora API needs the TOP-level comment URN as parentComment, not the reply's URN.
When to use
- User pastes a LinkedIn comment URL (contains
?commentUrn=...) and says "reply to this" - An author replied to the user's comment and the user wants to continue the thread
- User wants to re-engage a conversation that's gone dormant
Input
A LinkedIn URL containing commentUrn=urn:li:comment:(activity:POST,COMMENT_ID) — either the direct comment permalink or a feed URL with the query fragment.
Output
- 1-2 reply drafts, 150-300 chars each
- Reaction suggestion for the comment being replied to (always react before replying)
- Thread context summary (who said what, when)
- Approval card → on user "post", fires reaction + reply via Publora
Steps
- Parse the URL.
lib.url_parser.parse_linkedin_urlreturnspost_urn,comment_id,comment_urn. - Determine thread structure. If
APIFY_TOKENis set, calllib.ApifyClient.fetch_post_comments(post_id=post_urn, max_items=50, scrape_replies=True)and locate the comment bycomment_id. Otherwise ask the user to paste the relevant slice of the thread. Figure out whether the target is:
- a top-level comment (parentComment = this comment's URN when replying)
- a reply to a top-level comment (parentComment = the TOP comment's URN, not this reply's URN. LinkedIn flattens)
- Read the full context. Author post text, top-level comment text, any intermediate replies. Include the user's own prior comment if they're in the thread.
- Draft the reply. Follow the engagement templates in
references/reply-templates.md. If the counterpart asked a question, answer it directly. If they pushed back, concede then sharpen. - Humanizer pass. Strip em dashes, AI vocab, enforce varied sentence length.
- Approval card. Include thread preview (who said what in last 3 turns), the draft, reaction suggestion, and the parentComment URN we'll send.
- On approval. Call
lib.publish(kind="reply", draft_text=, target_url=, post_urn=, platform_id=, parent_comment=, reaction_type=). The wrapper handles Publora / manual / diy routing.
The flattening gotcha
LinkedIn only nests replies two levels deep. Visually the thread looks like:
Top comment by Alice (id: 111)
└─ Reply by Bob (id: 222) ← parentComment: urn:li:comment:(activity:POST, 111)
└─ Reply by Carol (id: 333) ← parentComment: STILL urn:li:comment:(activity:POST, 111)
Carol's reply doesn't nest under Bob's — it's pinned at level 2 to the same top comment. If you pass urn:li:comment:(activity:POST, 222) as parentComment, the API returns 400 on some paths or silently misplaces the reply.
Rule in this skill: always use the TOP-level comment's URN as parentComment. If you're replying to a 2nd-level reply, we walk up the tree to find the top comment.
Templates (references/reply-templates.md)
- R1 Answer-Their-Question — they asked, you answer plainly + one real detail
- R2 Concede-Then-Sharpen — "you're right on X, and the piece I'd push on is Y"
- R3 Extend-Their-Thesis — take their point one layer deeper with a new framing
- R4 Share-Lived-Experience — "we hit this last quarter — here's what broke"
- R5 Ask-Back — redirect with a sharper question when their position needs more context
Hard rules
Global voice rules: see root SKILL.md §Voice rules. Additional skill-specific rules:
- 150-300 chars. Replies are tighter than top-level comments.
- React to the comment you're replying to, not to the parent post.
- Never paste a canned "thanks!". Either respond with content or don't reply.
- If the thread is older than 72 hours, consider a DM instead (use
linkedin-thread-monitor).
Example
> User: "Reply to this: https://www.linkedin.com/feed/update/urn:li:activity:7449018753880834048?commentUrn=urn%3Ali%3Acomment%3A%28activity%3A7449018753880834048%2C7449758545140453376%29" > > Skill: parses → post 7449018753880834048, comment 7449758545140453376. Fetches thread. Sees: post-author's post → Serge's comment ("moat moved to taste") → author's reply ("How are you building that conviction muscle with your team?"). Drafts R1 Answer-Their-Question variant. Shows approval card. > > User: "post" > > Skill: react APPRECIATION on the author's reply → pause 12s → post reply with parentComment set to Serge's original comment URN (the TOP level, not the author's reply).
Files
SKILL.md— this filereferences/reply-templates.md— 5 reply templates with examplesreferences/threading-rules.md— LinkedIn's 2-level flattening explained with edge cases
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: sergebulaev
- Source: sergebulaev/linkedin-skills
- License: MIT
- Homepage: https://github.com/sergebulaev/linkedin-skills
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.