The Marketer API Client — Claude Skill
The official Claude skill for themarketer/api-client — The Marketer's PHP client for marketing platform APIs. Helps Claude write correct, schema-aware code when integrating the package.
What it does
Teaches Claude to:
- Generate correct PHP code for all 11 modules:
orders(), subscribers(), campaigns(), products(), transactionals(), reports(), events(), coupons(), loyalty(), reviews(), mobilePush().
- Distinguish correctly between the REST gateway and tracking gateway — the single most common source of bugs in this library.
- Apply exact payload schemas: field names, types, required vs optional, enum values.
- Handle Laravel integration: service provider, facade, and the
themarketer mail transport.
- Catch errors with the right exception types in the right order.
When you ask Claude to do something with the package — sync an order, send a tracking event, push subscribers in bulk, configure Laravel — the skill loads automatically and Claude follows the documented schemas instead of guessing.
Installation
Three install paths depending on how you use Claude. All three end up with the same skill loaded.
1. Claude Code (recommended for developers)
The fastest way. From inside a Claude Code session:
/plugin marketplace add the-marketer/claude-docs-skill
/plugin install themarketer-api-client@themarketer-api-client
/reload-plugins
Verify it's loaded by asking: "What skills are available?" — themarketer-api-client should appear.
Note: the skill becomes invocable as themarketer-api-client:themarketer-api-client (plugin name + skill name). Claude will load it automatically when relevant — you don't need to type the slash command.
2. Claude Desktop / Claude.ai web
For chat users who don't use Claude Code.
- Download
themarketer-api-client.skill from the latest Release.
- In Claude → Customize → Skills → + → Create skill.
- Upload the
.skill file. Toggle it on.
- Make sure Code execution is enabled in Settings → Capabilities (or, on Team/Enterprise, an org owner has enabled it under Organization settings → Skills).
3. Manual install (Claude Code, no plugin system)
If you prefer dropping files into the skills folder yourself:
# Personal — available across all your projects
mkdir -p ~/.claude/skills
git clone https://github.com/the-marketer/claude-docs-skill /tmp/tm-skill
cp -r /tmp/tm-skill/skills/themarketer-api-client ~/.claude/skills/
rm -rf /tmp/tm-skill
Or, for a single project:
cd /path/to/your/project
mkdir -p .claude/skills
git clone https://github.com/the-marketer/claude-docs-skill /tmp/tm-skill
cp -r /tmp/tm-skill/skills/themarketer-api-client .claude/skills/
rm -rf /tmp/tm-skill
You can also unzip the .skill file directly:
mkdir -p ~/.claude/skills
unzip themarketer-api-client.skill -d ~/.claude/skills/
Example prompts that trigger the skill
- "Help me sync an order with
themarketer/api-client from PHP."
- "I'm getting a
ValidationException on viewProduct — what's wrong?"
- "Set up the Laravel mail transport for The Marketer."
- "Push 200 subscribers in bulk through The Marketer."
- "What's the payload for
campaigns()->create with type=email?"
You don't need to mention the package name explicitly — the skill triggers on related phrasings too.
Repo structure
themarketer-api-client-skill/
├── .claude-plugin/
│ ├── marketplace.json ← makes this repo a Claude Code marketplace
│ └── plugin.json ← plugin manifest
├── skills/
│ └── themarketer-api-client/ ← the skill itself
│ ├── SKILL.md
│ └── references/
│ ├── authentication.md
│ ├── errors.md
│ ├── laravel.md
│ └── modules/
│ ├── orders.md
│ ├── subscribers.md
│ ├── campaigns.md
│ ├── products.md
│ ├── transactionals.md
│ ├── reports.md
│ ├── events.md
│ ├── coupons.md
│ ├── loyalty.md
│ ├── reviews.md
│ ├── mobile-push.md
│ └── credentials-utilities.md
├── README.md
├── LICENSE
└── .github/workflows/release.yml ← auto-builds .skill on tag
Versioning
This project follows SemVer.
Contributing
PRs are welcome. The actual skill content lives in skills/themarketer-api-client/. To suggest a fix:
- Edit the relevant markdown file (usually under
references/modules/).
- Open a PR with a short description of what changed and why.
- If you're adding a new method or payload field, link to the source of truth (the official docs or the GitHub source).
Related