> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mallary.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Agent Skill

> Give AI agents deep knowledge of Mallary's social media scheduling APIs across 10 platforms.

## Install

```bash theme={null}
npx skills add mallarylabs/mallary-agent
```

Or download [SKILL.md](https://github.com/mallarylabs/mallary-agent/blob/main/SKILL.md) to upload to Claude or any AI tool manually.

## What's included

The skill teaches your AI agent how to use the Mallary API. It covers endpoint selection, parameter usage, pagination, uploads, and platform-specific rules. These rules cover all 10 supported platforms, including TikTok, Instagram, YouTube, LinkedIn, Twitter/X, Reddit, and Facebook.

The skill also teaches agents to preserve the format you ask for. If you ask for a Story, Reel, Short, carousel, photo, or video, the agent checks the destination's supported post types and does not silently replace it with a feed post.

| When you say | What the skill does |
| - | - |
| "post this video to all my accounts" | Sends the video and the publishing intent to the Mallary CLI. The CLI handles the upload, the queue, platform-specific posting, retries, status, and reporting. |
| "Schedule these 2 video posts for tomorrow at 9am and 3pm." | Resolves "tomorrow at 9am and 3pm" into exact timestamps. Uploads the two videos to the Mallary CDN. Creates two scheduled jobs through the Mallary API or MCP. A Mallary worker publishes them later, and tracks status, retries, and failures. |
| "How did yesterday's post do?" | Resolves "yesterday" to the correct date range. Authenticates through the Mallary API or MCP. Finds the posts from that day. Reads the available performance data, such as views, likes, comments, shares, clicks, and platform-specific metrics. |
| "How many followers do my accounts have?" | Reads the latest saved follower or subscriber count for every connected account in the selected Mallary profile. |
| "Reply to everyone who commented on my launch post." | Calls the Mallary comment-list endpoint or tool for the published post. Writes each reply in the user's voice. Sends the exact reply text through the comment-reply endpoint or tool. |

## Authentication

For OpenClaw, Hermes, and other CLI-backed agent harnesses, install the Mallary CLI and start browser-based OAuth:

```bash theme={null}
npm install -g @mallary/cli
mallary auth login
mallary auth status
```

The CLI shows a Mallary sign-in URL and one-time code. The agent should show those to you and wait while you approve access in your browser. Do not paste your password, API key, access token, or refresh token into the agent.

One OAuth login gives the agent access to view data, publish posts, reply to comments, and manage settings and connections. You do not choose OAuth scopes or sign in again for another capability. Login itself does not post or change anything. After setup, a clear request to publish, schedule, upload media for a requested post, or send a supplied reply is enough authorization. The agent should ask only when a needed detail is missing or unclear, and it should not ask you to approve the same action again.

> [card] [Connect with OAuth](https://mallary.ai)
>
> <ol>
>   <li>Sign up at [https://mallary.ai](https://mallary.ai)</li>
>   <li>Connect your social media accounts in the Mallary dashboard</li>
>   <li>Run `mallary auth login` and approve Mallary access</li>
> </ol>

`MALLARY_API_KEY` remains available as an optional fallback for CI or another environment where OAuth is not practical. Keep it in a masked secret store and never paste it into an agent prompt. When set, it takes precedence over stored OAuth.

## Skill vs MCP

The MCP server gives your AI agent direct API access. It can call Mallary endpoints on your behalf. The skill teaches the agent best practices for those APIs: which endpoint to pick, how to upload files, and the platform-specific rules. Use the skill and the MCP server together, or use each one alone.

## Comment engagement

Agents can use Mallary for post-publication engagement without browser automation:

1. Find the Mallary `post_id`/job ID from the post list or job lookup.
2. Call `GET /api/v1/comments` or MCP `mallary_list_comments`.
3. Write the reply in the user's voice.
4. Call `POST /api/v1/comments/reply` or MCP `mallary_reply_to_comment` with the exact reply text.

Comment listing and supplied replies are available on all plans for Facebook, Instagram, Threads, LinkedIn, X, YouTube, and Bluesky.

## Links

* [GitHub Repository](https://github.com/mallarylabs/mallary-agent)
* [MCP Integration](https://docs.mallary.ai/home/mcp.md) — for direct API access from your agent

## Saved Drafts

Saved drafts are available to all users. Save unfinished posts without a publish date or a publishing job. Read, edit, or delete them, then publish or schedule when ready. A request to save a draft does not authorize publishing.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.