READ BEFORE INSTALL
This skill covers signed AICADE gateway service management:
- Register/update service:
POST /admin/gateway/services - Query service detail:
GET /admin/gateway/services/{serviceId} - Disable service:
PATCH /admin/gateway/services/{serviceId}/status?enabled=falseREAD BEFORE INSTALL
aicade-create-service
Use this skill to prepare, validate, and generate signed AICADE gateway service-management requests.
Core Principle
Treat every operation as a guided, signed flow.
Do not directly generate requests from examples. First ask focused questions, confirm the user's answers, then generate the final JSON or signed curl.
The first time this skill is used in a session, confirm the service-management base URL:
The default service-management base URL is https://aicadegalaxy.com/agent. Should I use this URL?
If the user says no, ask for the actual base URL and reuse it for the rest of the session.
Required Environment
Check local environment before asking the user:
node {baseDir}/scripts/build-service-request.mjs env-check --operation register
node {baseDir}/scripts/build-service-request.mjs env-check --operation detail
node {baseDir}/scripts/build-service-request.mjs env-check --operation disable
Use existing local values without asking again:
AICADE_API_KEY: sent asX-API-KeyAICADE_API_SECRET_KEY: used to generateX-Signature
Ask only for missing values. SECRET_KEY is accepted as a compatibility alias for AICADE_API_SECRET_KEY.
Workflow
1. Identify Operation
- Register/update: collect and confirm full camelCase registration JSON.
- Detail: collect and confirm
serviceId. - Disable: collect and confirm
serviceId; do not ask for operator.
2. Load References
Read these references when needed:
references/register-intake.mdfor registration questionsreferences/service-operations-intake.mdfor detail and disable questionsreferences/service-management-api.mdfor signed API rules, fields, and errors
3. Register Intake
Collect registration fields in small groups:
- Service identity:
serviceId,serviceName,description,tags - Endpoint and route:
endpointUrl,requestMethod,routePath,stripPrefix,routeOrder,timeoutMs,enabled - Outbound auth:
authType,authLocation,outboundAuth - Contract:
inputSchema,outputSchema - Billing:
billingType,currency, prices, limits,fallbackStrategy - Rate limits: service/user/IP limits and token limits
- Final review: show assembled JSON and ask for confirmation before generating signed curl
Use camelCase request body fields. Do not emit old snake_case fields such as service_id, endpoint_url, input_schema, or rate_limits.
4. Validate Register JSON
Before generating signed curl, check:
AICADE_API_KEYandAICADE_API_SECRET_KEYare available.- base URL has been confirmed.
serviceIduses lowercase letters, digits, and hyphens only, length 3-64.endpointUrlstarts withhttp://orhttps://.routePathstarts with/; add it if the user omitted it.timeoutMsis between1000and300000when set.stripPrefixis between0and10when set.inputSchemaandoutputSchemaare present.billing.billingType,billing.currency, andbilling.fallbackStrategyare present.outboundAuthexists whenauthTypeis notNONE.
5. Generate Requests
Use scripts/build-service-request.mjs to print signed curl. The script generates:
X-Client-TimeX-NonceX-Content-MD5X-Signature
The script does not call the remote API; it only prints curl.
Endpoint Summary
| Operation | Method | Path / Query | Required headers |
|---|---|---|---|
| Register/update | POST |
/admin/gateway/services |
X-API-Key, X-Client-Time, X-Nonce, X-Content-MD5, X-Signature, Content-Type |
| Detail | GET |
/admin/gateway/services/{serviceId} |
X-API-Key, X-Client-Time, X-Nonce, X-Content-MD5, X-Signature |
| Disable | PATCH |
/admin/gateway/services/{serviceId}/status?enabled=false |
X-API-Key, X-Client-Time, X-Nonce, X-Content-MD5, X-Signature |
Error Handling
If any service-management API returns 401, treat it as an API key or signature error.
Check:
AICADE_API_KEYAICADE_API_SECRET_KEY- signature path
- signature query
- body MD5
- client timestamp and nonce
Do not diagnose 401 as a service registration JSON, serviceId, route, billing, or schema problem.
If the API returns 422, treat it as request validation failure and inspect the JSON field names and values.
Common Mistakes
- Do not ask for the base URL repeatedly; confirm once per session, defaulting to
https://aicadegalaxy.com/agent. - Do not ask for credentials already present in local environment.
- Do not generate unsigned curl.
- Do not use old
/servicesendpoints. - Do not disable with
POST /services/disable; use signedPATCH .../status?enabled=false. - Do not ask for or send operator headers.
- Do not use snake_case registration fields.
- Do not reuse a previous
serviceIdunless the user confirms it.
Files Included
references/service-management-api.mdreferences/register-intake.mdreferences/service-operations-intake.mdscripts/build-service-request.mjsassets/register-service.template.jsonassets/register-service.example.json
