# Claude Code

Use the BeeL. plugin for Claude Code to implement, audit, and maintain BeeL. API integrations with AI assistance.

The BeeL. plugin for Claude Code is a toolkit for working with the BeeL. API: an always-current integration guide plus dedicated skills to implement an integration, audit it for compliance, build webhook receivers, work with several NIFs, apply the fiscal rules, and detect drift against the live API. It also connects the hosted [MCP server](/mcp), so Claude can act on your BeeL. account from the same session.

The plugin keeps only stable invariants locally (auth, idempotency, response envelope, invoice lifecycle). Everything else — endpoints, schemas, events — Claude fetches from these docs at the moment of use, so the plugin never goes stale.

## Before you start

- [Claude Code](https://claude.ai/claude-code) installed
- A BeeL. API key — get one at [**Settings > API Keys**](https://app.beel.es/ajustes/api-keys)

## Installation

Open Claude Code in your project and run:

```text
/plugin marketplace add beel-es/claude-plugins
/plugin install beel-api@beel
```

That's it. The plugin installs automatically and updates whenever a new version is published.

## Skills

Claude Code activates the right skill automatically based on what you ask — no manual invocation needed. You can also invoke them explicitly:

| Skill | What it does |
|-------|--------------|
| `/beel-api:beel-api` | Integration guide: golden rules, auth, doc lookup, plus recipes (typed client / official SDK, webhook handler, invoice flow, fiscal context, debugging, CLI) |
| `/beel-api:implement` | Guided integration: detects your stack, sets up the official SDK or a typed client, and implements the flows you need against the live spec |
| `/beel-api:audit` | Audits your integration code against the BeeL. rules — idempotency, key security, error handling, rate limits, webhook verification, invoice lifecycle — and reports findings with severity and ready-to-apply fixes |
| `/beel-api:webhooks` | Builds a correct webhook receiver: signature verification, raw-body handling, deduplication, retry-aware processing |
| `/beel-api:multi-nif` | Integrates the multi-NIF model: one account holding several companies, addressing a company per request, members and grants, and managed accounts |
| `/beel-api:rules` | The fiscal rules an integration must respect — VeriFactu, numbering, corrective and simplified invoices, dates, taxes, QR — cited by id, looked up by id, domain or error code, and ready to add to your repository's `AGENTS.md` or `CLAUDE.md`. See [Use the rules in your tools](/rules#use-the-rules-in-your-tools) |
| `/beel-api:upgrade` | Checks your integration against the live OpenAPI spec and SDK releases: breaking changes, deprecated patterns, new features worth adopting |

## Example prompts

```text
Add BeeL invoice creation to my existing Express checkout webhook
```

```text
Audit my BeeL integration — is it production-safe?
```

```text
Implement a webhook receiver for invoice.issued events
```

```text
Is my BeeL integration up to date with the current API?
```

```text
List all ISSUED invoices from the last 30 days and export them to Excel
```

## Verifying against the sandbox

The skills use the [BeeL. CLI](/cli) to run real API calls when verifying a flow — sandbox by default, production only with an explicit `--live`:

```bash
npx @beel_es/cli invoices create --data @invoice.json
npx @beel_es/cli invoices get <invoice_id>
```

With a `beel_sk_test_` key in `BEEL_API_KEY`, Claude can create test invoices, trigger webhook events, and confirm your integration works end to end — without writing throwaway scripts.

## Machine-readable docs

Claude fetches these URLs directly during a session to get the latest spec or docs:

| URL | Contents |
|-----|----------|
| [`/llms.txt`](https://docs.beel.es/llms.txt) | Index of all documentation pages |
| [`/llms-full.txt`](https://docs.beel.es/llms-full.txt) | All docs in a single file |
| [`/api/openapi`](https://docs.beel.es/api/openapi) | Full OpenAPI spec (YAML) |

## Related

<Related>

- [CLI](/cli) — the command line the skills use to verify a flow against the sandbox
- [AI agents](/ai-agents) — the rules block for `AGENTS.md` / `CLAUDE.md` and the other entry points for agents
- [Rules](/rules#use-the-rules-in-your-tools) — the catalogue the `rules` skill cites, and the other ways to use it
- [Idempotency](/guides/idempotency) — why every write that creates something carries a key

</Related>

---

Full OpenAPI spec: https://docs.beel.es/api/openapi