Skill: red777777/inkedin-automation-that-really-works (version 1.0.2)

--- name: linkedin description: LinkedIn automation — post, comment (with @mentions), edit/delete comments, repost, read feed, analytics, and engagement tracking. Uses Playwright with persistent browser profile. Use for any LinkedIn task including content strategy, engagement analysis, and audience growth. --- # LinkedIn Skill Automate LinkedIn interactions via headless Playwright browser with a persistent session. ## Commands ```bash CLI=/opt/moltbot/skills/linkedin/scripts/linkedin.py # Check if session is valid python3 $CLI check-session # Read feed python3 $CLI feed --count 5 # Create a post python3 $CLI post --text "Hello world" # Comment on a post (supports @Mentions — see below) python3 $CLI comment --url "https://linkedin.com/feed/update/..." --text "Great insight @Betina Weiler!" # Edit a comment (match by text fragment) python3 $CLI edit-comment --url "https://..." --match "old text" --text "new text" # Delete a comment python3 $CLI delete-comment --url "https://..." --match "text to identify" # Repost with thoughts python3 $CLI repost --url "https://..." --thoughts "My take..." # Engagement analytics for recent posts python3 $CLI analytics --count 10 # Profile-level stats (followers, views) python3 $CLI profile-stats # Scrape someone's activity python3 $CLI activity --profile-url "https://linkedin.com/in/someone/" --count 5 ``` All commands output JSON. Enable debug logging: `LINKEDIN_DEBUG=1`. ## @Mentions Comments support `@FirstName LastName` syntax. The skill: 1. Types `@FirstName` -> waits for typeahead dropdown 2. Progressively types last name if needed 3. Clicks the match only if first+last name both match 4. Falls back to plain text if person not found (returns `mention_failed` warning) Check `mentions` in the JSON result to see if mentions succeeded. ## Golden Rule **NEVER post, comment, repost, edit, or delete anything without EXPLICIT user approval.** Always show the user exactly what will be posted and get a clear "yes" before executing. Read-only actions (feed, analytics, check-session) are safe to run freely. ## Write Actions The following commands modify LinkedIn state and **require explicit user confirmation** before execution: | Command | Effect | |---------|--------| | `post` | Creates a new LinkedIn post | | `comment` | Adds a comment on a post | | `edit-comment` | Modifies an existing comment | | `delete-comment` | Removes a comment | | `repost` | Reposts content with commentary | Read-only commands (`check-session`, `feed`, `analytics`, `profile-stats`, `activity`) are safe to run without confirmation. ## Environment Variables | Variable | Default | Description | |----------|---------|-------------| | `LINKEDIN_BROWSER_PROFILE` | `~/.linkedin-browser` | Persistent Chromium profile directory (contains your logged-in LinkedIn session — keep secure) | | `LINKEDIN_VENV_PACKAGES` | *(empty — uses system packages)* | Path to Python venv site-packages if playwright is installed in a venv | | `LINKEDIN_HEADLESS` | `1` | Set to `0` to show the browser window (useful for debugging) | | `LINKEDIN_LOCALE` | `de-DE` | Browser locale (affects LinkedIn UI language) | | `LINKEDIN_DEBUG` | *(unset)* | Set to `1` to enable verbose debug logging | | `LINKEDIN_DEBUG_DIR` | `~/.linkedin-debug` | Directory where debug screenshots are saved on failure | ## Files Written | Path | Purpose | |------|---------| | `$LINKEDIN_BROWSER_PROFILE/` | Persistent Chromium profile with cookies/session | | `$LINKEDIN_DEBUG_DIR/*.png` | Debug screenshots saved on command failures | ## Prerequisites - Python 3.10+ - Playwright (`pip install playwright && playwright install chromium`) - A logged-in LinkedIn session in the browser profile (run `check-session` to verify; if not logged in, run with `LINKEDIN_HEADLESS=0` to log in manually) ## Content Strategy For content creation guidance, see: - **[references/content-strategy.md](references/content-strategy.md)** — Hook formulas, post structure, posting times, hashtag strategy - **[references/engagement.md](references/engagement.md)** — Comment quality formula, engagement algorithm, rate limits, growth tactics ## Rate Limits | Action | Daily Max | Weekly Max | |--------|----------|-----------| | Posts | 2-3 | 10-15 | | Comments | 20-30 | - | | Likes | 100 | - | | Connection requests | 30 | 100 | ## Troubleshooting If selectors break, see [references/dom-patterns.md](references/dom-patterns.md) for known LinkedIn DOM patterns. Debug screenshots are saved to `LINKEDIN_DEBUG_DIR` (default `~/.linkedin-debug`) on failure.

path: scripts/requirements.txt
content: playwright>=1.40.0


Security scan verdicts — ClawScan: clean | static analysis:  | VirusTotal:  | SkillSpector:  ()