Publisher Linkedin
Generate LinkedIn posts from blog content with automatic media attachment via LinkedIn API
Before you use this component
This is a third-party source bundle, not an installation into your account. UI Discovery has checked the available redistribution license evidence; runtime behavior has not been tested. Review all files, use a disposable project first, and do not enable scripts or hooks until you understand their permissions.
Some integrations require separately installed software, API keys or paid services. Credentials and subscriptions are not included. These are Claude Code resources; other clients may require adaptation.
Extract the ZIP into a temporary folder, inspect its entry file and supporting resources, then follow the original instructions. Do not overwrite an existing project configuration blindly. Keep the bundled license and attribution notices.
- Source publisher
- Claude Code Templates
- Creator supplied by source
- Not listed in source
- Pinned source version
- a344359459263d73d8948651c789244093c02e4e
- License evidence
- LICENSE
Source preview
cli-tool/components/commands/marketing/publisher-linkedin.md
---
allowed-tools: Read, Write, Bash, Glob, WebFetch
argument-hint: <input> [lang] [custom-file-path]
description: Generate LinkedIn posts from blog content with automatic media attachment via LinkedIn API
---
# LinkedIn Post Generator
Create professional LinkedIn posts from any content source with optional media attachment.
**Usage:** `$ARGUMENTS`
**Examples:**
```bash
/publisher:linkedin my-post # Auto-detect and attach blog diagrams
/publisher:linkedin my-post en # English with diagrams
/publisher:linkedin my-post en image.png # Custom image attachment
/publisher:linkedin my-post ja report.pdf # Japanese with custom PDF
```
**Process:**
1. **Parse Input Arguments**
- Content input (slug, file path, or URL)
- Optional language parameter (en/ja)
- Optional custom file path for attachment
2. **Universal Input Detection**
- **File path**: Read and parse (markdown, PDF, HTML, text, JSON)
- **URL**: Use WebFetch to retrieve content
- **Slug**: Search codebase for matching blog post
3. **Generate Professional LinkedIn Post**
- Use thought leadership tone for English
- Use professional business tone (敬語) for Japanese
- Extract key insights from actual content
- Include relevant hashtags (2-4 max)
- Add link to full article
4. **Handle Media Attachment**
- **Custom file**: Use specified image/PDF if provided
- **Auto-detect**: Find blog diagrams if available
- Supported formats: PNG, JPG, JPEG, PDF
5. **Post via LinkedIn API** (using Bash + curl)
- Check for credentials in .env file
- Handle OAuth flow if needed
- **CRITICAL**: Escape LinkedIn Little Text Format reserved characters: `| { } @ [ ] ( ) < > # * _ ~`
- Upload media file and get asset URN
- Create draft post with commentary and media
- Open LinkedIn in browser for review
**LinkedIn API Authentication:**
1. Create LinkedIn app at https://www.linkedin.com/developers/apps
2. Add credentials to .env:
```
LINKEDIN_CLIENT_ID=your_client_id
LINKEDIN_CLIENT_SECRET=your_secret
LINKEDIN_ACCESS_TOKEN=your_token (auto-generated on first use)
```
**Without API setup**: Command still generates the post content for manual copy-paste.
**Note**: Works in ANY repo type (Python, Rust, Go, etc.) - uses only bash and curl, no Node.js required.
Preview capped at 60,000 characters. Download the bundle for every original file and notice.
Read the redistribution license
MIT License Copyright (c) 2025 Daniel (San) Ávila Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Bundle SHA-256: 3c607bf26cd5f90ea69e80258e1f7a19e70637f0aa0265bb4789f1dfa5868cce. Files are served as downloads and are never executed by this page.