LinkedIn Message Drafter
Write LinkedIn outreach that actually gets replies — personalized, warm, and ready in seconds. Feed it a name and a bit of context; it hands back a concise, human-sounding draft you can send as-is or tweak.
Draft-first and safe by design. It does not scrape LinkedIn, automate browser actions, or send anything on its own. You stay in control of every message — review, copy, send. Ready to automate? Wire in an approved LinkedIn integration through the adapter below.
No API key needed. The best way to use it is inside an AI assistant you already pay for — Claude Code, Claude Desktop, Codex, Cursor, or ChatGPT — which does the writing on your existing subscription. See Use it in your AI assistant. The standalone CLI works too: free offline via a built-in template, or with your own Anthropic API key for richer copy.
Install
pipx install linkedin-message-drafter # or: pip install linkedin-message-drafter
# for the Claude draft path: pipx install "linkedin-message-drafter[ai]"
Quick start
linkedin-draft prospect.json # prints a draft and saves it to drafts/
From source (development)
git clone https://github.com/wuisabel-gif/linkedin-message-drafter.git
cd linkedin-message-drafter
python3 -m venv .venv && source .venv/bin/activate
pip install -e . # add [ai] for the Claude draft path: pip install -e ".[ai]"
linkedin-draft src/linkedin_message_drafter/examples/prospect.json
Web UI
Prefer a form to the CLI? A zero-dependency local UI ships with it:
linkedin-draft-web # then open http://127.0.0.1:8000
Binds to localhost only, uses the same drafting engine (voice matching, slop check, short mode), and still just drafts — nothing is sent.
Input
See src/linkedin_message_drafter/examples/prospect.json. Required fields are name, context, and goal; company, role, and relationship are optional. CSV input uses the same column names, one prospect per row.
Options
# Batch — pass multiple files, a CSV, or a whole folder
linkedin-draft ./prospects/
linkedin-draft prospects.csv
# Connection-request note, guaranteed under LinkedIn's 300-char limit
linkedin-draft --short my-prospect.json
# Write in a Cadence voice preset (AI path; needs CADENCE_VOICES)
export CADENCE_VOICES=/path/to/Cadence/voices
linkedin-draft --style punchy my-prospect.json
--short works with both the template and AI paths; --style applies to AI drafts only. Available presets are the .md files in Cadence's voices/ (punchy, column, plain, dispatch, …).
AI drafting via the API (advanced / power users)
Prefer the assistant path above — it needs no key. But if you want the standalone
CLI to generate AI copy (for scripting or batch runs), set ANTHROPIC_API_KEY to
draft with Claude. This uses the pay-as-you-go Anthropic API (a subscription does
not cover it). With no key set, the CLI uses the dependency-free template and works fully offline.
export ANTHROPIC_API_KEY=sk-ant-...
linkedin-draft my-prospect.json
Sounds like you (Cadence)
Point VOICE_SAMPLE at your own past writing and the AI draft mimics the way you speak — tone, rhythm, and word choice. It takes a single file or a directory: drop in a folder of all your previous posts and messages and Cadence learns from the whole corpus.
export VOICE_SAMPLE=~/my-writing-sample.txt # one sample
export VOICE_SAMPLE=~/my-linkedin-posts/ # or a folder of everything you've written
AI-slop cleanup is Cadence's job. This tool writes the outreach; to strip AI
tells, run the draft through Cadence —
its deterministic cadence-deslop detector. The drafter doesn't bundle its own
copy; it composes with Cadence so there's one source of truth for voice + slop.
Use it in your AI assistant — no API key (recommended)
Your own assistant does the writing, powered by the Claude / Codex / ChatGPT subscription you already pay for — no API key, no hosting, no per-message cost.
Drop skills/linkedin-drafter/SKILL.md into
your assistant's skills directory (Claude Code, Codex, Cursor, …). Then just ask
it to draft a LinkedIn message. The skill owns the outreach craft — the
specific-context opener, the low-pressure ask, the 300-char note limit — and
hands off voice-matching and deslop to Cadence if you have it installed (with a self-edit fallback if you don't).
Install Cadence too for the real deterministic voice + deslop. Everything stays draft-only — nothing is scraped or sent.
Adding an approved API integration
src/linkedin_message_drafter/linkedin.py contains a deliberately unimplemented LinkedInClient. Implement only the endpoints and scopes that LinkedIn has approved for your application. Keep the default workflow draft-only and require a user confirmation before any send operation. Do not add scraping, credential collection, or bulk/unattended sending.
Read TUTORIAL.md before configuring credentials or requesting permissions.
Tests
python -m unittest discover -s tests -v
Publishing
Releases publish to PyPI automatically via Trusted Publishing — no API token is stored anywhere. One-time setup:
-
On pypi.org, add a pending publisher: project
linkedin-message-drafter, ownerwuisabel-gif, repolinkedin-message-drafter, workflowpublish.yml, environmentpypi. -
Cut a release: bump
versioninpyproject.toml, thengit tag v0.1.0 && git push origin v0.1.0 gh release create v0.1.0 --generate-notes
The Publish to PyPI workflow builds the sdist + wheel and uploads them. Local dry run:
python -m build && twine check dist/*
Metadata
Release files for linkedin-message-drafter 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| linkedin_message_drafter-0.1.4.tar.gz | 15.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| linkedin_message_drafter-0.1.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 29.4 kB
Release files / linkedin_message_drafter-0.1.4.tar.gz
| Download URL | linkedin_message_drafter-0.1.4.tar.gz |
|---|---|
| Size | 15.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3915f555141d9d8ed52e6050694d8c092fe1196515e986bbcf4b0fb318ff8c99
|
|
BLAKE2b-256 checksum How to use checksums |
0c3de56a0a8c0542229eb40e08ab6a9ed37a389c013e5218b17fefeada913e74
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 24, 2026.
Transparency logRelease files / linkedin_message_drafter-0.1.4-py3-none-any.whl
| Download URL | linkedin_message_drafter-0.1.4-py3-none-any.whl |
|---|---|
| Size | 14.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
29b9b89097b94ae824ae06c7295a2b9f82532e79f4de762d2376b3f18ea9d45f
|
|
BLAKE2b-256 checksum How to use checksums |
e2145a4d8ab84666e4b48395ba3d6cdb6f2cc28947c0ba81699680ee11367753
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 24, 2026.
Transparency log