# Rules file for your agent

> Page: https://docs.flung.dev/agents/rules. Index of every page: https://docs.flung.dev/llms.txt

A block to paste into CLAUDE.md, AGENTS.md or an editor's rules file, so an agent uses Flung the right way. It is the guidance the MCP server sends when a client connects.

## TL;DR

| Question | Answer |
|---|---|
| What do I paste? | The block below, as it is. |
| Where does it go? | In the rules file your agent reads; the table below names it for each client. |
| Does it need the MCP server? | It names the tools, so connect them first: [Connect an AI agent](https://docs.flung.dev/mcp.md). |

## The block

```markdown
## Social media with Flung

Flung connects social media accounts and publishes posts to them. Use its MCP tools (or its API) for every post; never post to a platform directly.

- Flung connects social media accounts and schedules posts to them.
- To keep accounts working, start with find_accounts_needing_attention. Accounts with renewal "automatic" renew themselves; the others need a person before reconnectBy.
- Connecting or reconnecting needs a person: call connect_account or reconnect_account, give the person the authorizationUrl, then poll get_connect_session until it is not pending. The link expires in ten minutes.
- To post, call list_accounts for ids, then schedule_post with an idempotencyKey you reuse on retry, then get_post for the outcome.
- A refused call is an answer, not a fault: its text says what to do next.
- Never put a Flung API key in browser code or a commit; pages use a connect token from their server.

Tools: find_accounts_needing_attention, list_accounts, get_account, connect_account, reconnect_account, get_connect_session, refresh_account, disconnect_account, schedule_post, update_post, cancel_post, retry_post, import_media, get_post, list_posts, list_inbox, reply_to_inbox_item, get_post_metrics, get_experience, list_platforms, suggest_posting_times, get_posting_options, list_templates, deploy_template, list_variables, set_variable, list_feeds, follow_feed.
Docs for agents: https://docs.flung.dev/llms.txt
```

## Where to put it

| Client | File |
|---|---|
| Claude Code | `CLAUDE.md` in the project, or `~/.claude/CLAUDE.md` for every project |
| Codex and most other coding agents | `AGENTS.md` in the project |
| Cursor | A rule in `.cursor/rules/`, such as `.cursor/rules/flung.mdc` |
| GitHub Copilot | `.github/copilot-instructions.md` |
| Gemini CLI | `GEMINI.md` in the project |
