linkedin-reply-handler
Draft a reply to one LinkedIn comment from its URL, or sweep a whole thread from just the post URL and draft a reply to every comment worth answering, in one batch. Use for replying to a comment, following an author reply, or clearing all comments on a post.
Install / Use
npx skills add sergebulaev/linkedin-skills --skill linkedin-reply-handlerInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
MarketingSupported Platforms
Tags
Our assessment of linkedin-reply-handler
linkedin-reply-handler scores 92/100 on our quality scale, 181st of 642 Marketing skills we index (top 29%).
Its SKILL.md is 14 KB long, well organised into 14 sections with 1 code example: a thorough specification that gives an agent plenty to work with.
With 5,507 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated 20 days ago, so linkedin-reply-handler is actively maintained.
- Our last check on 2026-10-04 found the source still online.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.
AI review by kimi-k2.7-code on 2026-09-29. Automated pattern scan on 2026-09-29. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
linkedin-reply-handler compared with similar skills
All 4 of these similar skills score higher than linkedin-reply-handler; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| linkedin-reply-handler (this skill)by sergebulaev | 92 | 5.5k | 20d ago | SKILL.md |
| x402by browser-use | 100 | 121.0k | 3d ago | SKILL.md |
| algorithmic-artby anthropics | 100 | 177.9k | 55d ago | SKILL.md |
| pptxby anthropics | 100 | 177.9k | 55d ago | SKILL.md |
| designby nextlevelbuilder | 100 | 149.0k | 6d ago | SKILL.md |
Frequently asked questions
- How do I install linkedin-reply-handler?
- Run
npx skills add sergebulaev/linkedin-skills --skill linkedin-reply-handler. The install tabs above show the steps for each supported agent. - Which AI agents does linkedin-reply-handler work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is linkedin-reply-handler safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It is MIT-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is linkedin-reply-handler still maintained?
- The repository was last updated 20 days ago, so linkedin-reply-handler is actively maintained.
Skill content
View source on GitHubname: linkedin-reply-handler description: "Draft a reply to one LinkedIn comment from its URL, or sweep a whole thread from just the post URL and draft a reply to every comment worth answering, in one batch. Use for replying to a comment, following an author reply, or clearing all comments on a post. Resolves the correct parentComment (LinkedIn flattens threads to 2 levels), filters low-value comments before a sweep, and posts via Publora on approval. Not for top-level comments (use linkedin-comment-drafter)."
LinkedIn Reply Handler
Drafts a reply to a specific LinkedIn comment, or sweeps an entire comment thread (every top-level comment and its replies) from just the post URL and drafts a reply to each one worth answering. Both modes correctly handle 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
Single comment:
- 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
Whole thread (just a post URL, no comment URLs):
- User pastes a post URL and says "reply to all the comments", "clear my inbox on this post", "draft replies for everyone who commented", "sweep the comments on this post"
- User wants to catch up on a post that has accumulated comments over several days
Not for:
- Commenting on someone else's post (not replying to comments on the user's own post) →
linkedin-comment-drafter - Reading engagement without drafting anything →
linkedin-engager-analyticsorlinkedin-thread-monitor
Input
Either shape works:
- 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. Triggers single-comment mode. - Just a LinkedIn post URL, in any of the standard shapes (see root
SKILL.mdURL table) — no comment URLs needed. Triggers whole-thread mode.
Output
Single comment:
- 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
Whole thread:
- A filtered roster: how many comments were fetched, how many were filtered out and why, how many drafts follow
- One reply draft per comment worth replying to (150-300 chars each), each tagged with its target comment, the correct
parentCommentURN, and a reaction suggestion - A single batch approval card covering every draft
- On approval, posts all of them (reaction + reply, per comment)
Steps — single comment
Voice profile first (all drafts, both modes). If ../../references/voice-profile.md has filled: yes, load it and match the user's voice fingerprint, hard rules, and CTA/link style throughout. If it is not filled, mention once that linkedin-humanizer --mode profile can learn their voice from a few posts, then proceed with the generic voice rules. If ../../references/story-bank.md has filled: yes, load it too and take concrete details (numbers, dates, named projects) from there instead of asking mid-draft. Never invent a figure that is not in it; if the bank has nothing that fits, ask the user or offer linkedin-interviewer.
- 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)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. Scrub 2026 AI vocab by density, cap em dashes (about one per 100 words), fix only machine-flat rhythm and never manufacture sentence-length variance. Canonical rules:
linkedin-humanizerV3. - 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=<approved>, target_url=<comment_url>, post_urn=<urn>, platform_id=<id>, parent_comment=<top_level_comment_urn>, reaction_type=<chosen>). The wrapper handles Publora / manual / diy routing.
Steps — whole thread
Same voice-profile-first rule applies. Then:
- Parse the post URL.
lib.url_parser.parse_linkedin_urlto getpost_urn. If the URL is a reshare, resolve the canonical original post first — see "Reshare gotcha" below — comments live on the original, not the reshare's activity id. - Fetch the full comment tree. Call
lib.ApifyClient.fetch_post_comments(post_id=<post_urn or resolved canonical id>, max_items=100)Comments come back sorted by most relevant, which is what surfaces the reply threads the parentComment rule needs; passsort_order="most recent"if the user explicitly wants the newest first. IfAPIFY_TOKENis not set, ask the user to paste the comment list (name + text per comment is enough; nested replies noted as such). - Flatten the tree into a reply queue. For each top-level comment, queue the comment itself plus every reply under it. Each queue entry carries:
comment_id(the one being replied to),top_level_comment_id(for the flattening rule below), author name, comment text, and depth. - Filter out low-value comments. Drop anything matching
references/filtering-rules.md: plain "thanks for sharing" / generic praise with no content, duplicate or near-duplicate text already filtered elsewhere in the thread, spam or engagement-bait patterns, and comments from the user's own account (don't reply to yourself). Report the drop count and a one-line reason per category — don't silently discard. - Draft each remaining reply. For every surviving queue entry, follow the same
references/reply-templates.mdtemplates as single-comment mode (R1 Answer-Their-Question, R2 Concede-Then-Sharpen, R3 Extend-Their-Thesis, R4 Share-Lived-Experience, R5 Ask-Back). Read the surrounding thread (the top-level comment plus any prior replies) for context before drafting a reply to a nested reply. - Compute the parentComment URN for each draft. Use
lib.url_parser.build_parent_comment_urn(post_urn, top_level_comment_id)— always the TOP-level comment's id, never an intermediate reply's id, per the flattening gotcha below. Sweeping many comments at once makes it easy to mix up which id is "top-level" — double check each entry'stop_level_comment_idbefore building its URN. - Humanizer pass. Same scrub as single-comment mode, run per draft.
- One batch approval card. Present every surviving draft together: for each, the commenter's name, a short quote of what they said, the drafted reply, the reaction suggestion, and the parentComment URN. Show the filter summary from step 4 above the drafts so the user can sanity-check what got skipped. Wait for one explicit approval — the user can approve all, or call out specific ones to skip or edit.
- On approval, publish each one. For each approved draft, call
lib.publish(...)the same way single-comment mode does. React before replying on each comment. If the user approved only some drafts, publish only those.
The flattening gotcha (both modes)
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:(urn:li:activity:POST,111)
└─ Reply by Carol (id: 333) ← parentComment: STILL urn:li:comment:(urn:li:activity:POST,111)
Two URN forms exist, and only one is the API's. LinkedIn's web permalinks and
the Apify scraper both use the short form, urn:li:comment:(activity:POST,111).
The API uses the long one, urn:li:comment:(urn:li:activity:POST,111) — verified
against a live create_comment response, which comes back in the long form.
lib.url_parser.parse_linkedin_url normalises a pasted short-form URL into the
long form, and build_parent_comment_urn emits the long form, so following this
skill as written is correct. Do not "fix" a long-form URN into a short one
because a LinkedIn URL looks different.
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:(urn:li: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. In single-comment mode, if you're replying to a 2nd-level reply, walk up the tree to find the top comment. In whole-thread mode, carry top_level_comment_id through the queue from step 3 onward so every draft targeting Bob's or Carol's comment still uses Alice's URN.
Reshare gotcha (whole-thread mode)
If the input post URL is a reshare (a repost of someone else's post), the comment tree usually lives on the underlying original post, not the reshare's own activity id. Resolve the canonical post first via lib.ApifyClient.fetch_post(url) (or apimaestro/linkedin-post-detail) and read its canonical URN before fetching comments — a comments call against a reshare's activity id will return zero results.
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 — a filtered-out low-value comment in a sweep gets no reply at all, not a placeholder one.
- If the thread is older than 72 hours, consider a DM instead (use
linkedin-thread-monitor). In whole-thread mode, mention this once for the sweep rather than repeating it per draft. - Never draft a reply to the user's own comment in the thread.
- Whole-thread mode: cap the sweep at 100 comments per run (matches
fetch_post_comments's default ceiling); if the thread is larger, ask the user whether to sweep the most recent N or the most-liked N first. - Whole-thread mode: if more than 15 drafts survive filtering, still present them in one batch — don't split into multiple approval rounds unless the user asks to review in chunks.
- Whole-thread mode: publish approved replies one at a time, not in a burst. LinkedIn's enforcement targets automation patterns and applies per-account comment rate limits (see
../../references/algorithm-heuristics.md), and a dozen replies landing in the same second is that pattern exactly. Post them sequentially, and if the batch is larger than about 10, tell the user the sweep will be spread out and offer to publish the rest later rather than pushing everything at once. A 429 or a rejected publish means
Truncated for display — read the full file on GitHub.
Related Skills
x402
121.0kSet up Browser Use Cloud payments with x402 — pay per request from a crypto wallet (USDC on Base mainnet), no signup or API key.
algorithmic-art
177.9kCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems.
pptx
177.9kUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an em…
design
149.0kComprehensive design skill: brand identity, design tokens, UI styling, logo generation (55 styles, Gemini, Atlas Cloud, or MuAPI AI), corporate identity program (50 deliverables, CIP mockups), HTML presentations (Chart.js), banner design (22 styles, social/ads/web/print), icon design (15 styles, SVG…
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
