Prismatic-skills prismatic-api
Prismatic API access patterns and GraphQL reference. Covers the two-tier access hierarchy (MCP tools → Prism CLI), CLI usage rules, GraphQL query patterns, pagination, authentication, and managing platform resources programmatically.
git clone https://github.com/prismatic-io/prismatic-skills
T=$(mktemp -d) && git clone --depth=1 https://github.com/prismatic-io/prismatic-skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/prismatic-api" ~/.claude/skills/prismatic-io-prismatic-skills-prismatic-api && rm -rf "$T"
skills/prismatic-api/SKILL.mdPrismatic API
Reference documentation for Prismatic platform operations and the standardized API access hierarchy.
API Access Method Hierarchy
Prismatic API access follows a two-tier priority system for interactive agents (e.g., Orby). Builder agents (cni-builder, component-builder) use their own script-based pipelines and should not use MCP tools directly — see their agent docs for details.
Priority 1: MCP Tools (Interactive Agents Only)
Use MCP tools when operating within an interactive agent conversation (e.g., Orby). These handle auth, retries, and output formatting automatically.
| MCP Tool | Operation |
|---|---|
| Check auth / user profile |
| List / search components |
| Initialize new component |
| Publish component |
| Generate component manifest |
| List / search integrations |
| Initialize new CNI |
| Import / update CNI |
| Convert YAML to CNI |
| List flows for integration |
| Test a flow |
| Listen for webhook payloads |
| Generate flow boilerplate |
| Generate config page |
| Generate config variable |
| Add connection config var |
| Add datasource config var |
| Install component manifest in CNI |
| Legacy manifest install |
Priority 2: Prism CLI (Scripts + Agents)
For scripts and operations not covered by MCP tools:
Built-in commands (via
prism-retry.ts):
prism integrations:list --extended --output json prism components:publish --directory ./my-component prism integrations:import --directory ./my-integration
Custom GraphQL queries (via
shared/graphql.ts):
import { graphql, GraphQLError } from "./shared/graphql.js"; const data = graphql('query { customers { nodes { id name } } }');
Or directly via CLI:
prism graphql:query 'query { customers { nodes { id name } } }' prism graphql:query 'query($id: ID!) { customer(id: $id) { name } }' \ --variables '{"id": "Q3VzdG9tZXI6..."}'
Decision Tree
Agent calling directly? → Use MCP tool if available, else `prism` via Bash Script? → Use shared/graphql.ts for custom queries, prism-retry.ts for built-in CLI commands
Rule: NEVER create inline GraphQL clients — always use
shared/graphql.ts imports.
Common Operations Cheat Sheet
These are the most frequently needed GraphQL operations. Use these exact queries — don't guess the field names.
| Operation | Reference File | Query/Mutation Name |
|---|---|---|
| Find test instance for an integration | → "Get Test (System) Instance" | |
| Get execution result with logs | → "Get Execution Result with Step Results" | |
| Publish an integration version | → "Mutation: Publish Integration" | |
| Set marketplace availability | → "Mutation: Set Marketplace Availability" | |
| Clear instance persisted state | → "Mutation: Clear Instance Persisted State" | |
| Update config variables (safe) | → "Mutation: Update Instance Config Variables" | (NOT ) |
Read the referenced file section for the full query with all fields. Do not reconstruct queries from memory.
CLI Usage Rules
must be installed globally (prism
) — never usenpm install -g @prismatic-io/prismnpx prism- All list commands: always use
--extended --output json
and--extended
are mutually exclusive — always prefer--columns--extended- For
: always usegraphql:query
flag, never string interpolation--variables - Auth is handled by the CLI — no custom token exchange needed
API Endpoint
- URL:
(default:{PRISMATIC_URL}/api
)https://app.prismatic.io/api - Method: HTTP POST with JSON body
{"query": "...", "variables": {}} - Auth: Bearer token in
headerAuthorization - Content-Type:
application/json
Authentication
Obtain tokens via Prism CLI. See
references/authentication.md.
Quick reference:
- Short-lived access tokenprism me:token
- Long-lived refresh tokenprism me:token --type refresh- Access tokens valid for 7 days, auto-refreshed 5 minutes before expiry
- All authenticated requests return HTTP 200, even on errors - always check
arrayerrors
Pagination
All collection queries use Relay cursor-based pagination. See
references/pagination-and-filtering.md.
query($after: String) { resources(after: $after, first: 100) { nodes { id name } pageInfo { hasNextPage endCursor } } }
Critical Patterns
- Enum values are lowercase strings:
notvariableScope: "customer"
,"CUSTOMER"
notmanagedBy: "org""ORG" - Use
(partial, safe) notupdateInstanceConfigVariables
(replaces ALL config vars)updateInstance - Always deploy after config changes: Call
to activatedeployInstance - Use parameterized variables: Never string-concatenate into queries
- Check mutation errors: Mutations return
alongside resultserrors { field messages }
Key References by Resource Type
Core Resources
- Customer CRUD, external IDs, labelsreferences/customers.md
- Integration management, publishing, testingreferences/integrations.md
- Instance deployment, config variables, lifecyclereferences/instances.md
- Component queries, action introspection, searchreferences/components.md
Connections & Config
- Scoped config vars, customer config vars, connection managementreferences/connections.md
- Instance config updates, deployment patternsreferences/config-variables.md
Operational
- Execution results, step results, log queries, replayreferences/execution-and-logs.md
- Batch operations, nested queries, aliased mutations, error handlingreferences/common-patterns.md
- Detailed MCP tool reference, CLI patterns, migration notesreferences/api-access-methods.md