AI Agent Integration Guide#
Learn how to integrate BasaltSurge checkout and inventory flows using AI Coding Assistants (like Cursor, Copilot, or Gemini) equipped with custom workspace skills.
Overview#
AI Coding Assistants are highly effective at generating custom checkout pages, backend sync scripts, and webhook endpoints. To facilitate this, we provide a downloadable, pre-configured AI Agent Skill (SKILL.md).
Providing this skill file directly to your AI assistant feeds it immediate, accurate context on authentication headers, payload validation, cryptographic signatures, and exact API schemas, minimizing syntax errors and security issues.
AI Agent Skill Configuration#
To facilitate automated e-commerce store integration, you can download our dynamic, tenant-branded AI Agent Skill configuration file: š Download AI Agent Skill (SKILL.md)
This skill configuration file provides detailed context and instructions to your LLM for:
- API authentication (markup)
x-api-key - Inventory registration (markup)
POST /api/inventory - Orders and checkout generation (markup)
POST /api/orders - Webhook signature checks (markup)
HMAC-SHA256
SKILL.mdCore Agent Workflows#
Here are the primary tasks your AI assistant can help you automate:
1. Catalog Syncing#
Instruct the agent to write a script that connects to your e-commerce database (e.g., Shopify, WooCommerce, custom PostgreSQL) and pushes updates to the BasaltSurge inventory endpoint.
POST /api/inventorymarkupContent-Type: application/json x-api-key: your_merchant_api_key
2. Creating Checkout Sessions#
Instruct the agent to create a backend checkout route in your stack that parses user carts and creates a BasaltSurge receipt/order.
POST /api/ordersjson{ "items": [ { "sku": "prod_1001", "qty": 2 } ], "jurisdictionCode": "US-CA" }
3. Verifying Webhooks Cryptographically#
X-BasaltSurge-Signaturesha256=<hex_digest>Sample Agent Prompt#
SKILL.mdmarkupYou are assisting in integrating my e-commerce store with the checkout system. I have attached the custom integration skill rules (SKILL.md) and you can reference the online documentation at: - /docs/guides/ecommerce Based on these integration rules, write a Next.js API route that handles webhooks at `/api/webhooks/checkout`. Make sure to parse the raw body and cryptographically verify the X-BasaltSurge-Signature using HMAC-SHA256 with my API key.
Coding Assistant Compatibility & Usage#
SKILL.md- Cursor IDE:
Save the downloaded file as markupin your project root (or copy its contents into
SKILL.mdmarkupor a rule file in.cursorrulesmarkup). In the Chat or Composer panel, reference the file using.cursor/rules/markupto guide Cursor's code generation.@SKILL.md - Claude Code (CLI):
Save the file as markupin your project root. Claude Code's agentic search tools will automatically discover and read this file when you instruct it to write integration scripts or checkout logic.
SKILL.md - GitHub Copilot:
Save the file as markupin your project. In the Copilot Chat window, use
SKILL.mdmarkupto reference the rules during your conversation.#file:SKILL.md - ChatGPT / Gemini (Web):
Drag and drop the downloaded markupfile into the prompt text area, or click the Copy for LLM button on any documentation page and paste the formatted tags as context alongside your instructions.
SKILL.md
Next Steps#
- Read the E-commerce Guide for complete backend and frontend code templates.
- Check the API Reference to explore other inventory parameters and customer details.