.claude/skills/vendor-abstraction/SKILL.md
Guardrails for edits to core/abstraction/vendor-abstraction.js that preserve vendor isolation, mappings, fallback selection, and stable client-facing schemas. Use when adding/removing vendors, operations, or schema fields.
npx skillsauth add thefixer3x/onasis-gateway vendor-abstractionInstall 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.
Apply this skill when modifying core/abstraction/vendor-abstraction.js.
The Vendor Abstraction Layer provides:
client: {
operationName: {
schema: {
fieldName: { type: 'string', required: true },
optionalField: { type: 'number', required: false },
defaultedField: { type: 'string', default: 'value' }
}
}
}
// Input: client schema -> Output: vendor-specific format
transform: (input) => ({
vendor_field: input.clientField,
vendor_amount: input.amount * 100,
reference: input.reference || `prefix_${Date.now()}`
})
const vendors = Object.keys(abstraction.vendors);
const selectedVendor = vendorPreference && vendors.includes(vendorPreference)
? vendorPreference
: vendors[0];
this.validateInput(input, clientSchema.schema);
// Flow: client input -> validation -> transform -> vendor call
async executeAbstractedCall(category, operation, input, vendorPreference) {
const abstraction = this.vendorMappings.get(category);
this.validateInput(input, abstraction.client[operation].schema);
const vendorInput = mapping.transform(input);
return await this.executeVendorCall(vendorConfig.adapter, mapping.tool, vendorInput);
}
vendors: {
'existing-vendor': { /* keep unchanged */ },
'new-vendor': {
adapter: 'new-vendor-api',
mappings: {
initializeTransaction: {
tool: 'create-payment',
transform: (input) => ({
customer_email: input.email,
payment_amount: input.amount
})
}
}
}
}
client: {
existingOperation: { /* keep unchanged */ },
newOperation: {
schema: {
requiredField: { type: 'string', required: true }
}
}
}
vendors: {
'vendor1': {
mappings: {
existingOperation: { /* unchanged */ },
newOperation: { /* add here */ }
}
},
'vendor2': {
mappings: {
newOperation: { /* must also add here */ }
}
}
}
this.registerAbstraction('newCategory', {
client: {
operationName: {
schema: {
field: { type: 'string', required: true }
}
}
},
vendors: {
'primary-vendor': {
adapter: 'vendor-api',
mappings: {
operationName: {
tool: 'vendor-tool-name',
transform: (input) => ({ /* mapping */ })
}
}
}
}
});
Minimum 30-day window:
vendors: {
'old-vendor': {
adapter: 'old-vendor-api',
deprecated: true,
deprecationDate: '2024-01-15',
migrateTo: 'new-vendor',
mappings: { /* unchanged */ }
}
}
| Component | Integration Method |
|-----------|-------------------|
| Base Client | Vendor calls routed through executeVendorCall() |
| MCP Server | Categories exposed as tool groups |
| REST API | Operations exposed as endpoints |
| Metrics | Track per-vendor call metrics |
| Category | Operation | Required Fields | Optional Fields | |----------|-----------|-----------------|-----------------| | payment | initializeTransaction | amount, email | currency, reference, metadata | | payment | verifyTransaction | reference | | | payment | createCustomer | email | firstName, lastName, phone | | payment | purchaseAirtime | amount, phone, network | reference, metadata | | payment | getTransaction | transactionId | | | banking | getAccountBalance | accountId | | | banking | transferFunds | fromAccount, toAccount, amount | currency, reference | | banking | verifyAccount | accountNumber, bankCode | | | infrastructure | createTunnel | port | subdomain, region | | infrastructure | listTunnels | | |
tools
# Onasis Gateway — Agent & IDE Skill Guide > **Read this file first.** This guide is the primary reference for AI agents (Claude, Cursor, Copilot, etc.) and developers working with the Onasis Gateway API integration repository. It covers all 16 third-party API integrations, Postman MCP setup, auth patterns, environment variables, and recommended workflows. --- ## Table of Contents 1. [Overview](#overview) 2. [Postman MCP Integration](#postman-mcp-integration) 3. [16 API Integrations](#16-api
data-ai
Guardrails for edits to core/versioning/version-manager.js covering semver validation, deprecation, migrations, and compatibility rules. Use when changing version registration or migration handling.
tools
Use this skill when adding new methods, tools, or schema changes to the `@lanonasis/mem-intel-sdk`. Trigger when the user wants to extend the SDK with new capabilities, add a new MCP tool to mcp-core, add a new intelligence endpoint, or migrate the behavior_patterns schema. Also trigger when the user says things like "add a new tool to the SDK", "extend mem-intel-sdk", "add behavior X to the MCP server", or "update the SDK schema." Do NOT use for general behavior pattern recording/recall — use the behavior-memory skill for that.
data-ai
Guardrails for edits to core/monitoring/metrics-collector.js to preserve Prometheus metric names, labels, cardinality limits, and emission patterns. Use when adding or changing metrics or collectors.