skills/stackone-connect/SKILL.md
Implement account linking using StackOne Connect Sessions and the Hub React component. Use when user asks to "connect a provider", "embed the integration picker", "add BambooHR to my app", "create a connect session", "set up auth links", or "handle account webhooks". Covers the full flow from session creation to webhook handling. Do NOT use for making API calls after linking (use stackone-platform) or building AI agents (use stackone-agents).
npx skillsauth add stackonehq/agent-plugins-marketplace stackone-connectInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Before writing code, fetch the latest documentation:
https://docs.stackone.com/guides/connect-tools-overview for the current connection flowhttps://www.npmjs.com/package/@stackone/hub for the latest Hub component APIThe Hub component is in active beta — props and peer dependencies change between versions.
| Method | When to use | |--------|-------------| | Embedded Hub | In-app integration picker — users stay in your app | | Auth Link | Email onboarding or external flows — standalone URL, valid 5 days | | Dashboard | Internal testing only — never for production |
If unsure, recommend the Embedded Hub. It provides the best user experience.
Your backend creates a session token that the frontend uses to initialize the Hub:
curl -X POST https://api.stackone.com/connect_sessions \
-H "Authorization: Basic $(echo -n 'YOUR_API_KEY:' | base64)" \
-H "Content-Type: application/json" \
-d '{
"origin_owner_id": "customer-123",
"origin_owner_name": "Acme Inc"
}'
The response includes a token field. Pass this to the frontend.
To filter which providers appear in the Hub:
{
"origin_owner_id": "customer-123",
"origin_owner_name": "Acme Inc",
"provider": "bamboohr",
"categories": ["hris"]
}
Fetch https://docs.stackone.com/platform/api-reference/connect-sessions/create-connect-session for the full request/response schema.
npm install @stackone/hub
import { StackOneHub } from "@stackone/hub";
function ConnectorPage() {
const [token, setToken] = useState<string>();
useEffect(() => {
fetchConnectSessionToken().then(setToken);
}, []);
if (!token) return <div>Loading...</div>;
return (
<StackOneHub
token={token}
onSuccess={(account) => {
// Store account.id — you'll need it for all subsequent API calls
console.log("Connected:", account.id, account.provider);
}}
onCancel={() => console.log("User cancelled")}
onClose={() => console.log("Hub closed")}
/>
);
}
For the full props API and theming options, consult references/hub-reference.md.
Webhooks are required for Auth Links (no frontend callbacks) and recommended for the Embedded Hub:
| Event | When it fires |
|-------|---------------|
| account.created | New account linked |
| account.updated | Credentials refreshed |
| account.deleted | Account disconnected |
Fetch https://docs.stackone.com/guides/webhooks for the webhook payload format and setup instructions.
After receiving onSuccess or the account.created webhook, make a test API call:
curl https://api.stackone.com/accounts/{account_id} \
-H "Authorization: Basic $(echo -n 'YOUR_API_KEY:' | base64)"
A 200 response with status: "active" confirms the connection is working.
User says: "I want to let my customers connect their BambooHR account"
Actions:
POST /connect_sessions with provider: "bamboohr"@stackone/hub and render <StackOneHub token={token} />onSuccess to store the account IDaccount.created as a backupResult: Working integration picker that filters to BambooHR only.
User says: "I need to onboard customers by email, not in-app"
Actions:
origin_owner_id set to the customerResult: Customer clicks link, authenticates, webhook fires with account details.
Cause: Missing peer dependencies.
@stackone/hub requires: react, react-dom, react-hook-form, @hookform/resolvers, zodCause: Tokens are short-lived.
Cause: Provider-side authentication succeeded but StackOne couldn't sync data.
Cause: Webhook endpoint configuration issue.
https://docs.stackone.com/guides/webhooks for the verification processtools
Behavioral guidance for Claude Code when StackOne Defender is running as a PostToolUse hook. Defender flags tool results that may contain prompt injection. Treat its flags as a quiet review hint — do a quick check for genuine injection, then continue working. Do not interrupt the user unless you confirm a real attack.
tools
Baseline skill for building unified/schema-based connectors that transform provider data into standardized schemas. Use alongside domain-specific schema skills (e.g., unified-hris-schema, unified-crm-schema) that define your organization's standard schemas. Use when user says "start unified build for [provider]", "build a schema-based connector", "map fields to schema", "test unified connector", or asks about field mapping, enum mapping, pagination configuration, or scope decisions. This skill provides implementation patterns; schema skills provide field definitions. Do NOT use for agentic/custom connectors (use stackone-cli), discovering existing connectors (use stackone-connectors), or building AI agents (use stackone-agents).
development
Manage StackOne resources including API keys, linked accounts, logs, and webhooks. Use when user asks to "set up StackOne", "list my accounts", "debug API errors", "check integration status", or "configure webhooks". Covers authentication, account management, and troubleshooting. Do NOT use for building AI agents (use stackone-agents) or discovering connector capabilities (use stackone-connectors).
development
Discover StackOne's 200+ connectors and 9,000+ actions across HRIS, ATS, CRM, LMS, ticketing, messaging, documents, IAM, and accounting. Use when user asks "which providers does StackOne support", "what can I do with BambooHR", "recommend an integration for HR", "what actions are available", "how do I call a provider-specific action", or "does StackOne support Workday". Helps choose the right connector and actions for any use case. Do NOT use for building agents (use stackone-agents) or connecting accounts (use stackone-connect).