nocobase-api-call
SKILL.md
Goal
Run direct NocoBase API requests in a deterministic, low-dependency way for reusable automation and distribution.
Workflow
- Confirm request inputs: HTTP method, endpoint, and optional JSON payload or file.
- Ensure authentication config is available:
- Preferred: read
NOCOBASE_URLandNOCOBASE_API_TOKENfrom environment variables. - Optional fallback: read
./.envin user's current working directory. - If token is still missing and
./.envdoes not exist, create./.envtemplate first, then ask user to edit token. - Continue after user confirms token is set.
- Preferred: read
- Execute
scripts/nocobase-api.sh. - Return response JSON and HTTP status; if it fails, show the endpoint/method and the error message.
Mandatory Auth Gate
- If
NOCOBASE_API_TOKENis missing, do not provide offline substitutes. - You must guide the user to configure auth first, then resume the API task.
- Do not switch to "design doc only", "manual JSON only", or "one-click later" fallback outputs.
- Do not attempt to obtain token on behalf of user by calling login APIs or creating API keys automatically.
- If auth is not ready, stop API execution and ask user to complete token configuration manually.
Missing-Token Response Template
When auth is missing, respond with short actionable instructions:
- Explain token is required to proceed with API execution.
- If
./.envis missing, create it with template keys and ask user to editNOCOBASE_API_TOKEN. - Ask user to confirm after setting token, then continue immediately.
Environment Setup
Use this skill as the single source of truth for API environment config:
# preferred: export environment variables
export NOCOBASE_URL="http://localhost:13000"
export NOCOBASE_API_TOKEN="<your-token>"
# after token is ready:
skills/nocobase-api-call/scripts/nocobase-api.sh GET /collections:list
Alternative (temporary session):
export NOCOBASE_URL="http://localhost:13000"
export NOCOBASE_API_TOKEN="<your-token>"
Resources
scripts/nocobase-api.sh- Generic authenticated NocoBase API caller (curlbased).env.example- Reference template.gitignore- Excludes local.env
Usage
# List collections
./scripts/nocobase-api.sh GET /collections:list
# Create collection from inline JSON
./scripts/nocobase-api.sh POST /collections:create '{"name":"products","title":"Products"}'
# Create from file
./scripts/nocobase-api.sh POST /collections:create ./payload.json
# Response body only (for script chaining)
./scripts/nocobase-api.sh --raw GET '/swagger:get?ns=plugins%2Fdata-source-main'
Weekly Installs
11
Repository
nocobase/skillsFirst Seen
Mar 2, 2026
Security Audits
Installed on
opencode11
gemini-cli11
github-copilot11
codex11
kimi-cli11
amp11