Skip to content

Commit 187c1e5

Browse files
Merge pull request #1 from Iterable/add-claude-code-plugin
Package as a Claude Code plugin + marketplace
2 parents 6274d74 + a26a935 commit 187c1e5

5 files changed

Lines changed: 69 additions & 27 deletions

File tree

.claude-plugin/marketplace.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"$schema": "https://json.schemastore.org/claude-code-marketplace.json",
3+
"name": "iterable",
4+
"owner": { "name": "Iterable" },
5+
"description": "Iterable's official skills for AI coding assistants — mobile SDK integration guidance.",
6+
"plugins": [
7+
{ "name": "iterable-sdk", "source": "./", "description": "Iterable mobile SDK skill" }
8+
]
9+
}

.claude-plugin/plugin.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json",
3+
"name": "iterable-sdk",
4+
"version": "0.1.0",
5+
"description": "Reliable Iterable mobile SDK integration guidance for AI coding assistants — version-pinned snippets + silent-failure pitfalls. Android today; iOS/RN/Web later.",
6+
"author": { "name": "Iterable" },
7+
"repository": "https://github.com/Iterable/iterable-sdk-skill",
8+
"license": "MIT",
9+
"keywords": ["iterable", "android", "sdk", "mobile", "push", "in-app"],
10+
"skills": ["./iterable-android"]
11+
}

.mcp.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"mcpServers": {
3+
"context7": {
4+
"type": "http",
5+
"url": "https://mcp.context7.com/mcp"
6+
}
7+
}
8+
}

README.md

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,34 +12,42 @@ callback, and more).
1212

1313
## Install
1414

15-
The skill is a single directory you symlink into your assistant's skills folder.
15+
**Claude Code** — install the plugin from this repo's marketplace:
16+
17+
```
18+
/plugin marketplace add Iterable/iterable-sdk-skill
19+
/plugin install iterable-sdk@iterable
20+
```
21+
22+
This installs the skill and wires up its documentation source in one step.
23+
24+
**Cursor (or a manual install)** — symlink the skill directory into your
25+
assistant's skills folder:
1626

1727
```bash
1828
git clone --depth 1 git@github.com:Iterable/iterable-sdk-skill.git ~/iterable-skills
19-
20-
# Cursor
2129
ln -s ~/iterable-skills/iterable-android ~/.cursor/skills/iterable-android
22-
23-
# Claude Code
24-
ln -s ~/iterable-skills/iterable-android ~/.claude/skills/iterable-android
2530
```
2631

27-
That's it. The skill activates automatically whenever you mention Iterable: it
32+
Either way, the skill activates automatically whenever you mention Iterable: it
2833
loads its always-on rules and `PITFALLS.md`, then pulls the documentation for
2934
whatever feature you're working on (see [How it works](#how-it-works)).
3035

3136
## How it works
3237

33-
The Iterable documentation that powers the skill is published to
34-
[Context7](https://context7.com), a service that hosts docs for AI assistants to
35-
query. When you ask the skill to build something, it fetches the relevant
36-
articles from Context7 on demand, so it works from the current documentation
37-
rather than what the model happened to memorize.
38+
The skill carries a copy of the Iterable documentation inside it
39+
(`iterable-android/snapshot/`), so it always has the docs on hand — even offline.
40+
This snapshot is the active source today.
41+
42+
The Claude Code plugin also connects to [Context7](https://context7.com), a
43+
service that hosts docs for AI assistants to query on demand. That connection is
44+
bundled and ready, but stays dormant until Iterable's curated library is
45+
published there; once it is, the skill fetches the latest docs live, with the
46+
snapshot as its fallback. No reinstall needed when that happens.
3847

39-
A copy of the same docs ships inside the skill (`iterable-android/snapshot/`),
40-
which it falls back to if Context7 is unreachable or your assistant is offline.
41-
This snapshot is the active source today; the Context7 library comes online in an
42-
upcoming release.
48+
> Context7 works without an API key at a lower rate limit. To raise it, get a
49+
> free key at [context7.com](https://context7.com) and add it as a
50+
> `CONTEXT7_API_KEY` header on the `context7` MCP server.
4351
4452
## What it covers
4553

iterable-android/SKILL.md

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -293,15 +293,20 @@ snapshot:verify`). Match the task to a slug (table below) and open
293293
`snapshot/<slug>.md`. This is the canonical source right now — don't try
294294
Context7 first.
295295

296-
### Source later: Context7 *(Phase 3 — not live yet, skip)*
296+
### Source later: Context7 *(curated library not published yet — do not fetch)*
297297

298-
[`.context7-library-id`](.context7-library-id) is still the placeholder
299-
`TODO-PHASE-3/...`, so any Context7 fetch fails today. Once a real library ID
300-
is dropped into that file (first non-comment line; starts with `TODO-` ⇒ not
301-
live), the flow becomes: read the ID, fetch the matching slug via the Context7
302-
MCP tool (self-contained — one doc per task, don't bulk-load), use its snippets
303-
verbatim, and surface any `sdk_min_version` mismatch. Until then, the snapshot
304-
above is authoritative.
298+
The Context7 MCP server **is** connected (the plugin bundles it), but Iterable's
299+
curated library is **not published there yet**[`.context7-library-id`](.context7-library-id)
300+
is still the placeholder `TODO-PHASE-3/...`. So do **not** call Context7 for
301+
Iterable docs right now: a `resolve-library-id` / `query-docs` lookup would
302+
return some *unrelated public* library, not this skill's vetted corpus. The
303+
[`snapshot/`](snapshot/) is authoritative until the real ID lands.
304+
305+
Once a real library ID is dropped into that file (first non-comment line; one
306+
that does **not** start with `TODO-`), the flow becomes: read the ID, fetch the
307+
matching slug via the Context7 MCP tool (self-contained — one doc per task,
308+
don't bulk-load), use its snippets verbatim, and surface any `sdk_min_version`
309+
mismatch.
305310

306311
### Slug routing
307312

@@ -334,9 +339,10 @@ order.
334339
or "what does this code do?"
335340
2. **Check rules 1–5 above** against whatever the user already has. Many
336341
"the SDK isn't working" reports are rule violations.
337-
3. **Fetch the matching slug from Context7** (snapshot fallback if needed)
338-
before writing code. Each polished doc has its own gotchas section that
339-
supersedes generic advice.
342+
3. **Read the matching slug for the task** before writing code, from whichever
343+
source the "How to use this skill" section marks authoritative (the
344+
`snapshot/` today). Each doc has its own gotchas section that supersedes
345+
generic advice.
340346
4. **For non-obvious traps not covered in the polished doc**, consult
341347
[`PITFALLS.md`](PITFALLS.md).
342348
5. **Version-check.** If the user is on an older SDK version than the doc's

0 commit comments

Comments
 (0)