Agent skill

Integration Builder

by CraftOS-dev in CraftOS-dev/CraftBot

Build a new craftosintegrations provider end to end — acquire the vendor's API surface, decide the auth strategy, triage scope, generate the provider/client/operations/docs/tests, and run the…

MITAuto-check passedBackend & APIs

Install Integration Builder

skills CLI
$ npx skills add CraftOS-dev/CraftBot --skill integration-builder -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install CraftOS-dev/CraftBot integration-builder --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/CraftOS-dev/CraftBot.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/integration-builder .claude/skills/integration-builder && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
integration-builder
GitHub stars
392
Token cost
~3.2k tokens
SKILL.md length
1,657 words
Files
1
Skills in repo
89
Repo updated
First seen
Licence
MIT

At a glance

Build a new craftosintegrations provider end to end — acquire the vendor's API surface, decide the auth strategy, triage scope, generate the provider/client/operations/docs/tests, and run the…

  • Works in 7 steps: Acquire the API surface → Decide the auth strategy → Triage scope → …
  • Asked to add an integration for a third-party service (e.g
  • SKILL.md covers Stage 1 — Acquire the API…, Stage 2 — Decide the auth…, Stage 3 — Triage scope and Stage 4 — Design the action sets, plus 4 more sections
  • Calls python and curl

What it does

Integration Builder is an agent skill from CraftOS-dev/CraftBot. Build a new craftosintegrations provider end to end — acquire the vendor's API surface, decide the auth strategy, triage scope, generate the provider/client/operations/docs/tests, and run the verification gates. Use when asked to add an integration for a third-party service (e.g. 'add a Linear integration', 'we need PostHog'), or to audit an existing one against the house conventions.

Its SKILL.md is about 3.2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Backend & APIs. It works with PostHog. The repository describes itself as: One agent. Every kind of work. The licence is MIT.

When your agent uses it

  • Asked to add an integration for a third-party service (e.g

Example prompts

  • “add a Linear integration”
  • “we need PostHog”
  • “/integration-builder”

Requirements

  • Python 3

Workflow steps

7 steps, taken from the step headings in SKILL.md.

  1. Acquire the API surface
  2. Decide the auth strategy
  3. Triage scope
  4. Design the action sets
  5. Generate
  6. Verify
  7. Hand off

What it can do on your machine

Read from SKILL.md and the folder at commit b50970c. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • python
    • curl

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use curl, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Integration Builder loads about 3.2k tokens when it runs. Until then it costs about 102 tokens; SKILL.md has 1,657 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~102
When it runs · the whole SKILL.md, loaded when a task matches
~3.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from CraftOS-dev/CraftBot at commit b50970c, republished under its MIT licence (© CraftOS-dev). 1,657 words, ~3,179 tokens.

Download SKILL.mdSave it as .claude/skills/integration-builder/SKILL.md (or your agent's skills folder).
name
integration-builder
description
Build a new craftos_integrations provider end to end — acquire the vendor's API surface, decide the auth strategy, triage scope, generate the provider/client/operations/docs/tests, and run the verification gates. Use when asked to add an integration for a third-party service (e.g. 'add a Linear integration', 'we need PostHog'), or to audit an existing one against the house conventions.
user-invocable
true
action-sets
file_operations, core

Integration builder

Produce a production-level craftos_integrations provider for one vendor.

The mechanical part of an integration — file layout, envelope, decorator shape, tag conventions — is maybe 30% of the work and is already specified in craftos_integrations/README.md. The other 70% is judgment: which endpoint groups an agent would realistically use, whether the vendor's auth pools identity or quota, what the canonical identifier shape is, which "delete" is really a PATCH.

So: the machine owns the inventory, the checklist and the verification. You own the scope and auth decisions. Nothing here decides what to expose. It decides whether you wrote down a defensible answer and whether the output passes the gates.

Do not skip to stage 5. Stages 1–4 are what stop you generating 60 plausible methods against endpoints that don't exist.


Stage 1 — Acquire the API surface

Get a machine-readable endpoint list before writing anything.

In preference order:

  1. An OpenAPI/Swagger schema. Most vendors publish one. Download it and parse it locally — do not read it through a doc-fetching tool.

    bash
    curl -sSL -o "$SCRATCH/<name>_schema.json" "https://<vendor>/api/schema/?format=json"

    Then group the paths by resource with a short Python script: for each path, the methods available. This is the inventory everything else hangs off.

  2. An in-repo API reference. Check skills/<name>-api/SKILL.md and skills/api-gateway/references/<name>.md first — several vendors already have one, written against the live API, and they record quirks the spec does not (PostHog's soft-delete rule came from there).

  3. The official REST reference docs, last. Cross-check the version and base URL.

Hard-won: vendor doc pages truncate when fetched and will silently give you a partial endpoint list. The schema does not. If you find yourself fetching a fourth doc page, stop and go get the schema.

Write the schema to the scratchpad, never the repo.

What to extract

For each resource group: the list/get/create/update/delete paths, sub-resource action endpoints (/enable/, /archive/, /bulk_delete/), the pagination parameters, and the identifier type in each path.

Watch for surprises the spec makes obvious and memory does not:

  • Action endpoints you'd otherwise hand-roll (/feature_flags/{id}/enable/).
  • Resources with no DELETE (PostHog persons — erasure is bulk_delete).
  • Listing that hangs off a parent you didn't expect (PostHog projects live under /organizations/{id}/projects/, not /projects/).

Stage 2 — Decide the auth strategy

Run the three-question test from the README's "Choosing an auth strategy":

  1. Whose identity acts? The user's, or one shared identity of ours?
  2. Whose rate limits apply? Per user-account, or one pooled bucket?
  3. Whose app gets suspended if one user misbehaves?

Any answer of "ours" → the user supplies their own credentials, whatever the friction. All three "user's" and the vendor offers user-authorization OAuth → OAuth with our embedded client credentials, one click.

Record the reasoning in the provider docstring. The next person will ask why, and "we didn't check" is not an answer.

Check whether OAuth actually exists

Do not assert from memory that a vendor has no OAuth. Check:

https://<vendor>/.well-known/oauth-authorization-server

It returns the real authorization_endpoint, token_endpoint, scopes_supported and code_challenge_methods_supported. PostHog was assumed token-only and turned out to support OAuth 2.0 with PKCE.

If OAuth exists but is blocked on infrastructure we don't have yet (a hosted client-metadata document, a registered developer app), the right move is: implement oauth_spec() with the real endpoints and scopes, keep auth_type as "token", and document the one-line flip. Ship the path that works; leave the other one loaded.

Never embed anything but OAuth client credentials. No user tokens, no server-side API keys.

Then write
  • fields — what the connect modal asks for. Include anything that varies per install: a region or host field is mandatory for any vendor with EU/US/self- hosted deployments, and its absence is invisible until an EU user hits a 401 that looks like a bad key.
  • connect_help — 3–5 steps, walked yourself in a fresh browser.
  • verify_token — reject the wrong-credential-type by prefix before spending a request, with a message naming the right one. Every vendor with multiple key types has a confusable pair (Stripe pk_/sk_, PostHog phc_/phx_).
  • identity_of — the stable account key. Ask "could one human have two of these?" A PostHog user routinely has several projects, so identity is org:project, not their email. Must be lowercase, stable, and must tolerate junk without raising.

Stage 3 — Triage scope

List every endpoint group from stage 1. For each, decide keep or drop, with one line of why.

Keep what an agent would plausibly be asked to do on the user's behalf. Drop:

  • Billing, subscriptions, usage — money.
  • Org admin — invites, roles, SSO, API-key management, 2FA. Privilege escalation surface. Drop even when the scopes would allow it.
  • Code/pipeline deployment into the user's instance.
  • Products with their own large surface that would double the count.

Then apply the coverage rule, which is where most integrations fail:

Mirror the API's verb set on every noun you keep. For every list/get/ create, expose update and delete unless the API genuinely lacks them. An integration that lists but cannot edit or delete is the #1 source of agent failure: the model picks it confidently, then cannot finish the job.

Target 30–75 operations. Under 30 almost always means you missed the edit/delete/reply surface.

Write the dropped list into an exclusion block at the bottom of operations.py, one line per group. It stops the next session re-litigating the same decision.


Stage 4 — Design the action sets

Group by the noun the operation acts on, never the verb. Prefix every tag with the integration name (posthog_insights, not insights).

  • One fine-grained set per resource category. None below 3 operations — merge it if it is.
  • One umbrella set named exactly the integration id, carrying the high-value ~20%: primary-noun list/get/create/update, the main search or query entry point, and 1–2 operations per remaining category. Target 15–25.

The umbrella is what loads when the user says "use <vendor>". It is easy to over-tag: PostHog's first pass came out at 30 and had to be trimmed.

Trim on the right axis. If the umbrella can create a noun, it must be able to delete that noun. PostHog's trim demoted delete_posthog_dashboard while keeping create_posthog_dashboard, purely to hit the 25 ceiling. The agent then created a dashboard, could not find a way to remove it, fell back to unauthenticated raw HTTP and got a 401. The size ceiling exists to protect the context budget; the lifecycle rule exists to protect the agent from dead ends, and it wins. verify_integration.py now fails the build on this.

When you are over the ceiling, demote in this order: convenience wrappers that duplicate a more general operation (a list_events that is really a canned query), discovery helpers the agent can reach another way, secondary-noun updates, and cross-noun linking operations. Never a delete whose create you kept.

Listener/config operations go in <name>_listener, never in a noun set.


Show full SKILL.md (557 more words)Show less

Stage 5 — Generate

One folder, craftos_integrations/providers/<name>/. Full port shape — provider.py, client.py, operations.py, INTEGRATION.md, GUIDANCE.md, __init__.py. Do not create app/data/action/integrations/<name>/; that is the legacy bridge shape.

Register in default_providers() in craftos_integrations/providers/__init__.py, in the "Full ports" block.

client.py

One method per endpoint, async, returning the Result envelope from helpers.arequest. Credential-injected: a bind_credential(credential, persist) method, has_credentials(), _load(). No disk-credential path — that is legacy plumbing that only exists in ported integrations.

  • Base URL from the credential when the vendor has regions; a module constant otherwise.
  • Clamp limit to 1–100, default 30; surface the vendor's cursor in the result.
  • Strip unset keys before a PATCH so it never blanks a field the caller didn't mention.
  • Read-modify-write for partial updates of nested structures. A blind PATCH of a filters-style object silently drops the parts the caller didn't send. PostHog's set_feature_flag_rollout reads the flag first for exactly this reason.
  • If you compose the vendor's query language from agent-supplied values, escape string literals through one helper and use it everywhere.
operations.py

One client_op(...) per client method. Schema-fragment builders (_s, _i, _b, _arr, _obj) keep it declarative — return a fresh dict each call, never a shared instance.

  • name: verb-first, snake_case, carries the integration name.
  • description: one sentence stating what it does, which identifier it expects, and what it returns. This is what the model reads to choose.
  • input_schema: keys map 1:1 to the client method's kwargs. Always give example values. Never declare an account key — the host injects it.
  • parallelizable=False on every mutation, or the runtime fans out duplicate creates.
  • destructive=True on anything matching delete/clear/remove/revoke/destroy/ cancel — the conformance suite enforces this by name.
INTEGRATION.md

The gotchas, for whoever debugs this at 2am: identifier shapes per resource, the soft-delete rule, auth failure modes with what they actually mean ("403 = missing scope, retrying won't help"), rate limits with real numbers, and why there is or isn't a listener.

GUIDANCE.md

For the agent, not the maintainer: how to answer a typical question with this integration, which operation to reach for first, the discovery calls that prevent empty results, and the failure modes worth recognising. Write the sentences you'd want in context when the model is deciding what to call.

tests/integrations/test_<name>_conformance.py

Subclass ProviderConformance with credential fixtures — the real post-verify shape, a degraded shape (missing optional identity), and {} for junk. Add direct tests for identity_of composition, any host/URL normalization, and each verify_token rejection branch with the HTTP call monkeypatched.


Stage 6 — Verify

bash
python scripts/verify_integration.py <name>

Gates: imports and registers · operation count, tag distribution, umbrella size, umbrella create/delete lifecycle, mutation and destructive flags, no account input · the conformance suite. Loop back until it passes.

Then run the whole suite — a new provider can break a hardcoded count elsewhere:

bash
python -m pytest tests/integrations -q

Use the CraftBot interpreter (app/python_runtime.py resolves it), not whatever python points at.


Stage 7 — Hand off

The offline gates cannot tell you whether the vendor accepts what you send. Do not call the integration done. Give the user a smoke-test checklist — one prompt per sub-set, in natural language, ending with a delete so soft- delete behaviour gets confirmed:

"list my <primary noun>"
"create a <primary noun> called 'smoke test'"
"update it to ..."
"<the integration's main query/search verb>"
"delete the smoke test <primary noun>"

State plainly what is verified (structure, registration, conformance) and what is not (that the API accepts these calls).


Auditing an existing integration

python scripts/verify_integration.py --all --no-tests reports convention drift across every shipped provider. Bridge ports report no operations and skip the audit — expected, not a failure. Treat parallelizable mutations as real bugs; treat umbrella-size and thin-set findings as cleanup.

© CraftOS-dev, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/integration-builder of CraftOS-dev/CraftBot.

Open the folder on GitHubat commit b50970c

Compare with similar skills

Integration Builder next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Integration Builder compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Integration Builder this skillCraftOS-dev/CraftBot392—~3.2kAutomated safety check: PassMIT
Feature Flagspeakeasy-api/gram272—~2.6kAutomated safety check: PassAGPL-3.0
tRPC Release Compatibility Checksuperset-sh/superset15k—~1.7kAutomated safety check: PassCustom licence
Adding Personhog RpcPostHog/posthog40k—~2.1kAutomated safety check: PassCustom licence
Authoring Error Tracking AlertsPostHog/posthog40k—~2.8kAutomated safety check: PassCustom licence
Improving Drf EndpointsPostHog/posthog40k—~2.9kAutomated safety check: PassCustom licence

Similar skills

  • Feature Flag

    speakeasy-api/gram

    A skill your agent uses when gating a feature behind a flag, dogfooding or gradually rolling out a change, choosing between productfeatures and PostHog feature flags, adding or checking a product…

    272 GitHub stars~2.6k tokensUpdated today
    Backend & APIsAuto-check passed
  • Checks whether a tRPC procedure change is safe for released desktop, mobile, CLI and SDK builds, picks a compatible pattern and decides when a deprecated procedure can go.

    15k GitHub stars~1.7k tokensUpdated today
    Backend & APIsAuto-check passed
  • Adding Personhog Rpc

    PostHog/posthog

    Official

    Guide for adding a new RPC to personhog-replica and personhog-router.

    40k GitHub stars~2.1k tokensUpdated today
    Backend & APIsAuto-check passed
  • Official

    Author error tracking alerts that fire when an issue is created, reopened, or starts spiking.

    40k GitHub stars~2.8k tokensUpdated today
    Backend & APIsAuto-check passed
  • Official

    A skill your agent uses when editing, reviewing, or auditing DRF viewsets and serializers in PostHog.

    40k GitHub stars~2.9k tokensUpdated today
    Backend & APIsAuto-check passed
  • Official

    Guides PostHog engineers through dashboard widget platform work — ship a new widgettype (WIDGETREGISTRY, catalog, runwidgets, WidgetCard) or update a shipped type (config, query, layout, RBAC, tile…

    40k GitHub stars~2.3k tokensUpdated today
    Backend & APIsAuto-check passed

More from CraftOS-dev/CraftBot

All 89 skills in this repo
  • Self Improvement

    CraftOS-dev/CraftBot

    Captures learnings, errors, and corrections to enable continuous improvement.

    392 GitHub starsUsed in 5 repos~4.9k tokens
    Auto-check passed
  • Bbc News

    CraftOS-dev/CraftBot

    Fetch and display BBC News stories from various sections and regions via RSS feeds.

    392 GitHub starsUsed in 2 repos~555 tokens
    Auto-check passed
  • Outlook

    CraftOS-dev/CraftBot

    Read, search, and manage Outlook emails and calendar via Microsoft Graph API.

    392 GitHub starsUsed in 2 repos~1.8k tokens
    Auto-check passed
  • Nano Banana Pro

    CraftOS-dev/CraftBot

    Generate/edit images with Nano Banana Pro (Gemini 3 Pro Image).

    392 GitHub starsUsed in 6 repos~1.4k tokens
    Auto-check passed
  • Airweave

    CraftOS-dev/CraftBot

    Context retrieval layer for AI agents across users' applications.

    392 GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Telegram Bot Manager

    CraftOS-dev/CraftBot

    Manage and configure Telegram bots for OpenClaw. An agent skill from CraftOS-dev/CraftBot.

    392 GitHub stars~836 tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about Integration Builder

What does Integration Builder do?

Build a new craftosintegrations provider end to end — acquire the vendor's API surface, decide the auth strategy, triage scope, generate the provider/client/operations/docs/tests, and run the…. Integration Builder is an agent skill from CraftOS-dev/CraftBot. Build a new craftosintegrations provider end to end — acquire the vendor's API surface, decide the auth strategy, triage scope, generate the provider/client/operations/docs/tests, and run the verification gates.

When should I use Integration Builder?

Integration Builder fits situations like: asked to add an integration for a third-party service (e.g.

How do I install Integration Builder in Claude Code?

Run `npx skills add CraftOS-dev/CraftBot --skill integration-builder -a claude-code`. Or copy the skill folder (skills/integration-builder in CraftOS-dev/CraftBot) into .claude/skills/integration-builder in your project. Claude Code loads it when a task matches its description.

How do I install Integration Builder in Codex?

Run `npx skills add CraftOS-dev/CraftBot --skill integration-builder -a codex`. Or copy the skill folder (skills/integration-builder in CraftOS-dev/CraftBot) into .agents/skills/integration-builder in your project. Codex loads it when a task matches its description.

Can I use Integration Builder in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add CraftOS-dev/CraftBot --skill integration-builder -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/integration-builder, .gemini/skills/integration-builder, .github/skills/integration-builder and .opencode/skills/integration-builder in your project.

What does Integration Builder need to run?

Going by SKILL.md and its folder, Integration Builder needs the command-line tools its instructions call (python and curl). Our summary lists: Python 3.

Does Integration Builder access the network?

SKILL.md contains no URLs. Its commands use curl, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Integration Builder safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Integration Builder use?

Integration Builder is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Integration Builder use?

About 3.2k tokens (SKILL.md is roughly 13k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Integration Builder?

Skills that share tags, products or a category with Integration Builder: Feature Flag (speakeasy-api/gram, 272 stars), tRPC Release Compatibility Check (superset-sh/superset, 15k stars), Adding Personhog Rpc (PostHog/posthog, 40k stars) and Authoring Error Tracking Alerts (PostHog/posthog, 40k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Integration Builder?

CraftOS-dev (a GitHub user) maintains it in CraftOS-dev/CraftBot, which has 392 GitHub stars. The repository holds 89 skills in this directory. The repository was last updated on October 7, 2026.

Source: CraftOS-dev/CraftBot on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.