sdk
AGENTS.md269 starsChanged 18 days agoMITView on GitHub
Instructions for AI agents (Claude Code, Cursor, Codex, Copilot, ...) working in this repository. The docs and agent skill for @zapier/zapier-sdk. The SDK itself is published on npm. Its source is not in this repo. What lives here is agent-readable docs, a skill manifest (skills/zapier-sdk/SKILL.md), and Claude Code subagents under agents/. Each file below is authoritative for a slice of the repo. Read them; don't re-derive. Building both shipped code and ad-hoc agent tool use? Combine: SDK for code paths,…
- Installs packages
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 33,398 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository3 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- llms.txtllms.txt
- zapier-sdkSkill
The file
We split this AGENTS.md into the rules it gives an agent
7 rules. About 0 are common, 3 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 37
No build, lint, or test step lives in this repo.
- Distinctive: line 57
Use only methods documented at docs.zapier.com/sdk/reference.
- Distinctive: line 58
Never invent method names: Use the discovery commands below.
- Very specific: line 59
Never invent app keys: If unsure, zapier-sdk list-apps.
- Very specific: line 60
Never invent action keys: Run zapier-sdk list-actions <app> first.
- Distinctive: line 65
Every command below runs at the shell against the live catalog.
- Very specific: line 122
Never: add a new action call without verifying the action key first.
≈ “Common” is an estimate: at least 1 in 5 of the 43,423 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md
Instructions for AI agents (Claude Code, Cursor, Codex, Copilot, ...) working in this repository.
What this repo is
The docs and agent skill for @zapier/zapier-sdk. The SDK itself is published on npm. Its source is not in this repo. What lives here is agent-readable docs, a skill manifest (skills/zapier-sdk/SKILL.md), and Claude Code subagents under agents/.
Files to read before you start
Each file below is authoritative for a slice of the repo. Read them; don't re-derive.
README.md: install, authenticate, and try a first action.CONTRIBUTING.md: contribution rules and PR expectations..github/scripts/README.md: CI checks and the README art generators.skills/zapier-sdk/SKILL.md: installable skill manifest (cross-platform).agents/README.md: optional Claude Code subagents that pair with the skill.
When to use this SDK vs. alternatives
| Situation | Use |
| Writing TypeScript code that ships | This SDK (@zapier/zapier-sdk) |
| Tool-calling inside an MCP client (Cursor, Claude Desktop, Codex) | Zapier MCP |
| One-off terminal command | npx zapier-sdk |
Building both shipped code and ad-hoc agent tool use? Combine: SDK for code paths, MCP for ad-hoc.
Setup
npm install @zapier/zapier-sdk
npm install -D @zapier/zapier-sdk-cli @types/node typescript
npx zapier-sdk loginNo build, lint, or test step lives in this repo; the only scripts in package.json regenerate the README art under assets/readme/. Details in .github/scripts/README.md.
Repo map
.
├── README.md ← human entrypoint
├── AGENTS.md ← you are here
├── CONTRIBUTING.md
├── skills/
│ └── zapier-sdk/ ← SKILL.md manifest for agent runtimes
└── agents/ ← optional Claude Code subagentsCritical: do not trust your training data
The Zapier SDK (@zapier/zapier-sdk) is new. Your training data does not contain accurate information about its API.
Rules:
- Use only methods documented at docs.zapier.com/sdk/reference.
- Never invent method names. Use the discovery commands below.
- Never invent app keys. If unsure,
zapier-sdk list-apps. - Never invent action keys. Run
zapier-sdk list-actions <app>first. - Never invent input field shapes. Many actions have dynamic properties that depend on the user's specific connection (Notion database schema, HubSpot custom properties, Jira project + issue-type schema). For those inputs, run
zapier-sdk list-action-input-fields <app> <type> <action>against the live connection before assuming the shape.
Discovery
Every command below runs at the shell against the live catalog. The same operations are exposed as SDK methods when you need them inside code.
# What apps exist?
npx zapier-sdk list-apps --search notion
# What actions does an app expose? Optionally filter by type.
npx zapier-sdk list-actions notion
npx zapier-sdk list-actions notion --action-type search
# Inspect an action.
npx zapier-sdk get-action notion search page_by_title
# What inputs does an action take?
npx zapier-sdk list-action-input-fields notion search page_by_title
# Full JSON Schema for the inputs (for programmatic validation).
npx zapier-sdk get-action-input-fields-schema notion search page_by_title
# What choices exist for a dynamic-dropdown field (e.g., a Notion database)?
npx zapier-sdk list-action-input-field-choices notion write create_database_item datasource
# Which connections do I have?
npx zapier-sdk list-connections
npx zapier-sdk list-connections notion
# Try an action end to end.
npx zapier-sdk run-action notion search page_by_title \
--inputs '{"title":"Meeting Notes","exact_match":"no"}'Canonical workflow
- Authenticate.
npx zapier-sdk loginwrites credentials to your machine, or passcredentialstocreateZapierSdk()for server use. Have a connection for the app?
npx zapier-sdk list-connections <app>. Skip to step 3 if yes.If no connection exists, the user has to complete OAuth in a browser. This step cannot be fully automated: a human must click "authorize" for their account.
# Opens a browser and waits for the user to finish. npx zapier-sdk create-connection <app>For headless / agent-driven flows, use
get-connection-start-url <app>to fetch the URL, present it to the user, thenwait-for-new-connection <app> <started-at>to block until they finish. Only after the connection exists can steps 3 and 4 run.- Find the connection.
npx zapier-sdk find-first-connection <app>at the shell, orsdk.findFirstConnection({ app, owner })in code. - Run an action.
npx zapier-sdk run-action <app> <type> <action> --inputs '<json>'at the shell, orsdk.runAction({...})in code. The typed formsdk.apps.<app>.<type>.<action>(...)is available only for actions on the stable surface documented in the SDK reference.
Escape hatches
sdk.fetch(url, { connection }): authenticated raw HTTP. Use when no first-class action exists.sdk.runAction({ appKey, actionType, actionKey, connection, inputs }): generic action call. Works uniformly across all apps.
Never
- Never add a new action call without verifying the action key first. Run
zapier-sdk list-actions <app>. - Never assume input field shapes for dynamic inputs. Call
zapier-sdk list-action-input-fields. - Never store user tokens. Connections are owned by Zapier; reference them by
connection.idat runtime, or by a named alias (e.g."notion_primary") in a durable workflow. - Never bypass governance. The audit trail is the product.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

