[Docs](/docs) /Agent skill

# Agent skill

Drive Anomalia from your coding agent. Prefer MCP tools when connected; otherwise use the anomalia CLI. Same OAuth identity — no static API tokens.

**Prefer MCP.** When the Anomalia MCP server is connected, call tools like list\_brands and approve\_posts. Fall back to the CLI only when MCP is unavailable.

## Choose interface

| Situation | Action |
| --- | --- |
| Anomalia MCP is connected | Call MCP tools (list\_brands, list\_posts, …) |
| MCP not available | Shell: anomalia … after anomalia login |
| Vague / multi-step ask | MCP chat or anomalia ai --message "…" --pipe |

Never invent REST endpoints or API keys.

## Install the skill

Publishable Agent Skill (agentskills.io / skills.sh):

```
npx skills add andreabuttarelli/anomalia-cli --skill anomalia
```

Or install via the hosted script:

```
curl -sSL https://anomalia.so/install-skill.sh | bash
```

After installation, your AI assistant can manage Anomalia brands directly.

You can also copy `skills/anomalia/` into `.cursor/skills/anomalia/` or `~/.claude/skills/anomalia/`.

## Auth (always OAuth)

-   **Local MCP / CLI:** shared session at `~/.config/anomalia/session.json`. MCP tool `login` opens the browser, or run `anomalia login`.
-   **Remote MCP** (`https://mcp.anomalia.so/mcp`): send `Authorization: Bearer <access_token>` (same JWT the CLI stores). Missing Bearer → 401.
-   Verify with `whoami` / `list_brands` or `anomalia brands`.

## Operating rules

1.  Start with list\_brands (or anomalia brands) to learn slugs.
2.  Pass slug on every brand-scoped call.
3.  Post/article ids accept short unambiguous prefixes from list output — never guess if ambiguous.
4.  Prefer specific tools (approve\_posts, edit\_post, …) over chat for precise edits.
5.  Confirm before reject / delete / discard unless the user clearly asked.

## Quick workflows

-   **Approve pending posts** — list\_posts (status pending) → optional get\_post → approve\_posts
-   **Fix one carousel slide** — get\_post → regenerate\_slide (index, instruction; 0 = cover)
-   **Blog draft** — generate\_article → optional optimize\_article → publish\_article when asked

## Examples

```
"Use the Anomalia CLI to show me my brands"
"Approve all pending posts for flashcamp"
"Ask Anomalia to analyze my last 10 posts"
"Change the tone to friendly and professional"
```

## Supported agents

-   **Claude Code** — full skill, auto-installed
-   **Cursor** — MCP + terminal skill
-   **GitHub Copilot** — via CLI commands
-   **Windsurf** — via terminal integration
-   **Cline** — via CLI commands
-   **Aider** — via pipe mode

## CLI fallback

If MCP is not connected, install the CLI and work from the shell:

```
curl -sSL https://anomalia.so/install.sh | bash
anomalia login
anomalia brands
anomalia content <slug> --status pending_user
anomalia approve <slug> --all
anomalia ai <slug> --message "..." --pipe
```

For machine-readable output:

```
echo "Analyze my posts" | anomalia ai my-brand --pipe
```

* * *

## Next

-   [MCP](/docs/mcp) — connect stdio or remote HTTP and authenticate
-   [CLI](/docs/cli) — full terminal reference
-   [anomalia-cli](https://github.com/andreabuttarelli/anomalia-cli) — canonical skill sources and tool map

[

← Previous

MCP

](/docs/mcp)

---
Source: https://www.anomalia.so/docs/agents
