API Docs/For Agents/Skills
For Agents

Skills

A Linkedmash agent skill teaches a coding agent — Claude Code, Cursor, or any tool-using model — how to drive Linkedmash. Install it with one command, or paste it in by hand.

Install the published skill from the linkedmash/agent-skills repo with a single command, or copy the block below into your agent's system prompt or a SKILL.md. It documents what Linkedmash does, how to authenticate, the full tool surface, and example workflows — so the agent can act without guessing.

Install the skill

Add the Linkedmash skill to any agent that supports the open Agent Skills format:

bash
npx skills add linkedmash/agent-skills

Using Claude Code? Install it as a plugin instead:

bash
/plugin marketplace add linkedmash/agent-skills
/plugin install linkedmash@linkedmash

Or clone the repo and copy the skill folder into your agent's skills directory (for example .claude/skills/ or .cursor/skills/):

bash
git clone https://github.com/linkedmash/agent-skills
cp -r agent-skills/skills/linkedmash ~/.claude/skills/
View the repo on GitHub

How to use it

Install

Run one command — npx skills add linkedmash/agent-skills — or add it as a Claude Code plugin.

Authenticate

Get an API token from Integrations → API, then run linkedmash setup (or paste it when your agent asks).

Run

Ask your agent in plain language — it drives Linkedmash over MCP or REST.

The skill

Prefer to paste it by hand, or want to see exactly what the agent reads? Expand the full skill below — plain markdown, with tool names and code kept literal.

Show the full skill
markdown
# Linkedmash agent skill

Linkedmash lets a user save, organize, and search their LinkedIn saved posts, and create, schedule, publish, and analyze LinkedIn content. Use it to research a user's saved posts and to draft, schedule, and review LinkedIn posts on their behalf.

## Setup

- Get an API token from the user's Linkedmash account (Integrations -> API).
- Preferred: connect the hosted Linkedmash MCP server (`https://mcp.linkedmash.com/api/mcp?token=<token>`) to get all tools as typed functions.
- Or call REST at `https://api.linkedmash.com/v1` with the header `Authorization: Bearer <token>` on every request.
- Saved-post tools work on any plan. Content Studio, Scheduling, and Analytics tools require a paid Creator or Lifetime plan; on a free plan they return a subscription-required error.

## Tools

### Saved posts (any plan)
- `list_bookmarks` - list saved posts, with filters and pagination.
- `search_bookmarks` - keyword and semantic search over saved posts.
- `get_bookmark` - fetch one saved post by id.
- `get_bookmark_count` - total number of saved posts.
- `list_labels` - list the user's labels.
- `add_labels` - add one or more labels to saved posts.
- `remove_labels` - remove labels from saved posts.
- `setup_vector_store` - build the semantic index that powers search.

### Content Studio (paid)
- `create_draft` - create a new post draft.
- `list_drafts` - list drafts, optionally by status.
- `get_draft` - fetch one draft by id.
- `update_draft` - edit a draft's content.
- `delete_draft` - delete a draft.
- `upload_media` - re-host an image, video, or PDF to attach to a draft.

### Scheduling (paid)
- `schedule_post` - schedule a draft now, at the next open slot, or at a set time.
- `get_queue` - list scheduled posts grouped by day.
- `get_posting_slots` - get the next open posting slots.
- `cancel_scheduled_post` - cancel a scheduled post and return it to unscheduled.
- `get_posting_schedule` - read the recurring posting-schedule grid.
- `set_posting_schedule` - replace the recurring posting-schedule grid.

### Analytics (paid)
- `get_analytics` - aggregate account metrics over a date range.
- `get_post_analytics` - per-post metrics over a date range.

## Auth note

Always send the user's token. Never log it, echo it, or store it in plaintext. A 401 means the token is missing or invalid; a 402 means the action needs a paid plan.

## Example workflows

1. Research saved posts about a topic, then draft and schedule a post:
   `search_bookmarks` (topic) -> `get_bookmark` (read the best matches) -> `create_draft` (write the post) -> `schedule_post` (next open slot).
2. Review performance:
   `get_analytics` (account totals for the range) + `get_post_analytics` (per-post breakdown) -> summarize what worked.
3. Organize the library:
   `list_bookmarks` -> `add_labels` / `remove_labels` to tidy labels; run `setup_vector_store` first if search returns nothing.
Paid features: Content Studio, Scheduling, and Analytics tools require an active Creator or Lifetime plan. The agent will get a subscription-required error if it calls them on a free plan.