LinkedIn rewards the person who shows up three times a week for six months, not the one who posts nine times in a burst and disappears. The hard part is rarely writing. It is the Sunday-night “what do I post this week?” and the Wednesday-morning “I’ll do it later”.
This recipe gives the rhythm to Claude Code. A weekly task looks at how your last posts performed and writes next week’s three posts into a file. A daily task publishes whichever post is dated today. You read the plan once a week, maybe edit a line, and that is the whole job.
When you’re done you’ll have:
- a
linkedinfolder with aplan.mdthe AI keeps filled in a week ahead, - a weekday scheduled task that publishes the entry dated today (and does nothing on days with no entry),
- a Sunday task that reads your recent posts’ numbers and drafts the next plan,
- a
log.mdwith a link to every post that went out.
Setup takes about 20 minutes, most of it signing in and one supervised first run.
Who this fits: one person (founder, consultant, creator) posting from their own LinkedIn profile, on a computer that is on and awake at posting time. These are local scheduled tasks, which per Anthropic’s docs only fire while the Claude desktop app is open and the computer is awake. If you need it to run with the laptop closed, the cloud version trades local files for a GitHub repo.
The recipe
Paste this to Claude Code in step 2:
Read https://www.publishport.app/skill.md and follow it to set up PublishPort for me, then check that my LinkedIn account is connected, read my last 10 LinkedIn posts with their reactions, comments and impressions, and write plan.md in this folder with three posts for next week (Monday, Wednesday, Friday), each with a date, a hook and the full text under 3,000 characters. Show me the plan, and once I approve, dry-run today's post (or the first one) so I can see it would work. After that, help me create two Claude Code Desktop scheduled tasks: a weekday task that publishes the plan.md entry dated today, and a Sunday task that reviews last week's numbers and writes the next plan.md.
The skill file is a short public instruction sheet. It tells the AI how to install itself, ask you for one authorization click, check which accounts your computer has connected, publish, and confirm a post exists. Every AI you authorize is listed on your account page, where you can revoke it.
Step 0: Get three things ready
1. The PublishPort desktop app, signed in to LinkedIn. Install it from the download page, open Platform accounts, click Sign in next to LinkedIn, sign in the way you normally do in the window that opens, then click I’ve signed in (walkthrough). Posts then come from your own session, like ones you’d type by hand.
2. The Claude desktop app with the Code tab. Local scheduled tasks need Claude Desktop 1.1.5368 or later (docs). You can do the first run in the CLI instead, but the scheduled tasks themselves are created in Desktop.
3. Node.js and an empty folder. The publishing command runs on Node.js. Check with node -v, or install the LTS release from nodejs.org. Create a folder named linkedin. Optionally drop in a voice.md with three of your own past posts you like and a few “never say” rules; the AI matches your voice far better with it.
Step 1: What LinkedIn can do through PublishPort
Before you ask for something, here is what the commands support (checked against the PublishPort command set, publishport-opencli 1.0.40):
| Job | Supported | Worth knowing |
|---|---|---|
| Publish a text post | Yes | Up to 3,000 characters, up to 9 images (JPG/PNG/GIF, 10 MB each), public or connections-only |
| Dry run | Yes | Without an explicit send flag the command only checks your signed-in session and publishes nothing |
| Read your recent posts | Yes | Returns reactions, comments, reposts and, where LinkedIn shows them, impressions |
| Summarize those counters | Yes | Plain totals; no scoring, so the AI does the judging |
That last pair is what lets the Sunday task plan from evidence. It reads only what LinkedIn shows on your own profile.
Step 2: Supervised first run
Open the Code tab, start a session in your linkedin folder, and paste the recipe. What happens:
-
Claude installs the PublishPort skill and runs the login. It gives you an authorization link and a confirmation code. Open the link, sign in or create a PublishPort account, check that the code matches, click Authorize. The link lasts 10 minutes; ask for a new one if it expires.
-
It checks your computer and tells you whether LinkedIn shows as signed in. If not, sign in again under Platform accounts and ask it to re-check.
-
It reads your last ten posts and writes
plan.md, three dated entries for next week. Edit freely (“less hype in the Wednesday one”). Entries look like:## 2026-10-26 (Mon) Hook: The pricing page I rewrote four times Text: ... -
It dry-runs a post. A dry run publishes nothing; it confirms LinkedIn accepts your session and reports the character count.
Approve the commands it asks about now. PublishPort’s instructions tell the AI to show you content before the first post of a session, so this is also where you teach it your voice; the corrections become rules in the prompts below.
Step 3: Create the two scheduled tasks
Claude will offer to create them for you from the recipe; check what it made against the steps below. To build one by hand, in the Code tab click Scheduled, then New task. If a menu opens, choose Set up manually. Turn on Only on this computer (under Advanced settings), pick the linkedin folder as the local folder, and set the schedule in the Trigger card (steps in Anthropic’s docs).
Task 1: linkedin-publish, trigger Weekdays at 8:30 am:
This is a pre-approved publishing task. Publish without asking me to confirm.
1. Open plan.md and find the entry dated today. If there isn't one, or log.md already has a link for today, stop and say so. Do not publish anything else.
2. Check the time. If it is after 1 pm, skip and say the run was late (my computer may have been asleep).
3. Publish that entry's text to LinkedIn through PublishPort, exactly as written in plan.md. Check publishport guide linkedin first for the live options and make sure the publish flag is set explicitly.
4. If the command errors or times out, do not run it again. Look at my recent LinkedIn posts first and retry once only if today's post is not there.
5. Append the date and the post link to log.md and give me a one-line summary.
Task 2: linkedin-plan, trigger Weekly, Sunday at 5 pm:
Plan next week's LinkedIn posts.
1. Read my last 10 LinkedIn posts through PublishPort (reactions, comments, reposts, impressions) and log.md.
2. In five lines or fewer, say which posts did best and the most likely reason, judged only from those numbers and text. Don't invent causes you can't see.
3. Write plan.md for next Monday, Wednesday and Friday: date, hook, full text under 3,000 characters, in my voice (see voice.md if present). Vary the format across the three. No made-up statistics, quotes or client stories.
4. Do not publish anything in this task.
Splitting planning from publishing is deliberate. The publish task never improvises: it posts only what is in the file, so whatever you approved on Sunday is what goes out. The plan task never posts, so a bad week of drafts costs you an edit, not a public post.
Permission modes matter here. A task in Manual mode stalls on any tool it hasn’t been approved for. Anthropic’s tip: click Run now right after creating each task, watch for prompts, and choose “always allow” for the PublishPort commands. Later runs reuse those approvals, which you can review or revoke from the task’s Always allowed panel.
Step 4: Trust it for a week
Read the first two or three publish runs from the task’s History list. Then keep the Sunday review short: skim plan.md, delete anything off-brand, save.
Pacing
Three posts a week is a human rhythm, and that is the point. Don’t raise the frequency of the publish task or have the AI re-post the same text to LinkedIn; if LinkedIn pushes back, the instructions tell the AI to report and stop.
When it won’t run
- Nothing posted and no run in History: the Claude desktop app was closed or the computer asleep. If the app was only asleep, Desktop starts one catch-up run for the most recent missed time when it wakes, which is why the prompt checks the time. In Settings > This computer > System, turn on Keep computer awake if you want to avoid sleep.
- The run is waiting on a prompt: open the run from History and approve it, then choose always allow.
- The AI says no device is online: the PublishPort app isn’t running or is signed out. Start it; Launch at startup is on by default.
- LinkedIn reports you’re signed out: sessions expire. Sign in again under Platform accounts.
- A skipped day: if there’s no entry dated that day, skipping is the correct behavior. Ask Claude to add entries to
plan.md.
Taking it further
The same two-task pattern works for any platform in the set: swap “LinkedIn” for X, Threads or Bluesky, or plan several platforms from one file. For the video version, see the Codex scheduled-tasks recipe. For LinkedIn background, including why this route avoids LinkedIn’s developer approval, read how to schedule LinkedIn posts with AI.
The free plan covers setting all of this up; plan limits are on the pricing page.
