bknd-api-discovery
Use when exploring Bknd's auto-generated API endpoints. Covers REST endpoint patterns, route listing, module base paths, SDK method mapping, admin panel API explorer, and understanding the API structure.
What this skill does
# API Discovery
Explore and understand Bknd's auto-generated REST API endpoints.
## Prerequisites
- Running Bknd instance (local or deployed)
- Access to admin panel (optional but helpful)
- Basic understanding of REST APIs
## When to Use UI Mode
- Browsing available entities and their fields
- Viewing schema structure visually
- Quick endpoint exploration via browser
**UI steps:** Admin Panel > Data > Entities
## When to Use Code Mode
- Listing all registered routes programmatically
- Understanding endpoint patterns for integration
- Debugging route registration issues
- Building API documentation
## Understanding Bknd's API Structure
Bknd auto-generates REST endpoints for all configured modules:
```
┌─────────────────────────────────────────────────────────────┐
│ Bknd API Structure │
├─────────────────────────────────────────────────────────────┤
│ /api/data → CRUD for all entities │
│ /api/auth → Authentication (login, register, logout) │
│ /api/media → File uploads and serving │
│ /api/system → System operations │
│ /flow → Flow management and triggers │
│ /admin → Admin UI (if enabled) │
└─────────────────────────────────────────────────────────────┘
```
## Code Approach
### Step 1: List All Routes (CLI)
Use the debug command to list all registered routes:
```bash
bknd debug routes
```
**Output:**
```
GET /admin/*
GET /api/auth/me
POST /api/auth/password/login
POST /api/auth/logout
POST /api/auth/register
GET /api/data/:entity
POST /api/data/:entity
GET /api/data/:entity/:id
PATCH /api/data/:entity/:id
DELETE /api/data/:entity/:id
POST /api/media/upload
GET /api/media/:path
...
```
### Step 2: Data API Endpoints
All entities get CRUD endpoints automatically:
| Method | Path | Description | SDK Method |
|--------|------|-------------|------------|
| GET | `/api/data/:entity` | List records | `api.data.readMany(entity)` |
| POST | `/api/data/:entity/query` | List (complex query) | `api.data.readMany(entity, query)` |
| GET | `/api/data/:entity/:id` | Get single record | `api.data.readOne(entity, id)` |
| GET | `/api/data/:entity/:id/:ref` | Get related records | `api.data.readManyByReference(...)` |
| POST | `/api/data/:entity` | Create record(s) | `api.data.createOne/Many(entity, data)` |
| PATCH | `/api/data/:entity/:id` | Update single | `api.data.updateOne(entity, id, data)` |
| PATCH | `/api/data/:entity` | Update many | `api.data.updateMany(entity, where, data)` |
| DELETE | `/api/data/:entity/:id` | Delete single | `api.data.deleteOne(entity, id)` |
| DELETE | `/api/data/:entity` | Delete many | `api.data.deleteMany(entity, where)` |
| POST | `/api/data/:entity/fn/count` | Count records | `api.data.count(entity, where)` |
| POST | `/api/data/:entity/fn/exists` | Check existence | `api.data.exists(entity, where)` |
**Example: Explore posts entity**
```bash
# List all posts
curl http://localhost:7654/api/data/posts
# Get post by ID
curl http://localhost:7654/api/data/posts/1
# Get with query params
curl "http://localhost:7654/api/data/posts?limit=10&sort[created_at]=desc"
# Get with relations
curl "http://localhost:7654/api/data/posts?with[]=author&with[]=comments"
# Complex query via POST
curl -X POST http://localhost:7654/api/data/posts/query \
-H "Content-Type: application/json" \
-d '{"where": {"status": "published"}, "limit": 10}'
```
### Step 3: Auth API Endpoints
| Method | Path | Description |
|--------|------|-------------|
| GET | `/api/auth/me` | Current user info |
| POST | `/api/auth/:strategy/login` | Login (e.g., `/api/auth/password/login`) |
| POST | `/api/auth/register` | Register new user |
| POST | `/api/auth/logout` | Logout |
| GET | `/api/auth/:strategy/redirect` | OAuth redirect |
| GET | `/api/auth/:strategy/callback` | OAuth callback |
**Example:**
```bash
# Check current user
curl http://localhost:7654/api/auth/me \
-H "Authorization: Bearer $TOKEN"
# Login
curl -X POST http://localhost:7654/api/auth/password/login \
-H "Content-Type: application/json" \
-d '{"email": "[email protected]", "password": "pass123"}'
# Register
curl -X POST http://localhost:7654/api/auth/register \
-H "Content-Type: application/json" \
-d '{"email": "[email protected]", "password": "pass123"}'
```
### Step 4: Media API Endpoints
| Method | Path | Description |
|--------|------|-------------|
| POST | `/api/media/upload` | Upload file |
| GET | `/api/media/:path` | Serve/download file |
**Example:**
```bash
# Upload file
curl -X POST http://localhost:7654/api/media/upload \
-H "Authorization: Bearer $TOKEN" \
-F "[email protected]"
# Serve file
curl http://localhost:7654/api/media/uploads/image.png
```
### Step 5: Flow Endpoints
| Method | Path | Description |
|--------|------|-------------|
| GET | `/flow` | List all flows |
| GET | `/flow/:name` | Get flow details |
| GET | `/flow/:name/run` | Manually run flow |
| * | Custom trigger path | HTTP trigger endpoints |
**Example:**
```bash
# List flows
curl http://localhost:7654/flow
# Run flow manually
curl http://localhost:7654/flow/my-flow/run
```
### Step 6: Programmatic Route Discovery
Access route information from your code:
```typescript
import { App } from "bknd";
const app = new App({ /* config */ });
await app.build();
// Get Hono server instance
const server = app.server;
// Routes are registered on the Hono instance
// Use bknd debug routes for listing
```
### Step 7: Discover Entity Schema
Query the system to understand available entities:
```typescript
import { Api } from "bknd";
const api = new Api({ host: "http://localhost:7654" });
// List available entities by checking which respond
const entities = ["posts", "users", "comments", "categories"];
for (const entity of entities) {
const { ok } = await api.data.readMany(entity, { limit: 1 });
if (ok) {
console.log(`Entity exists: ${entity}`);
}
}
```
### Step 8: Response Format Discovery
All endpoints return consistent response format:
**Success (list):**
```json
{
"data": [
{ "id": 1, "title": "Post 1" },
{ "id": 2, "title": "Post 2" }
],
"meta": {
"total": 50,
"limit": 20,
"offset": 0
}
}
```
**Success (single):**
```json
{
"data": { "id": 1, "title": "Post 1" }
}
```
**Error:**
```json
{
"error": {
"message": "Record not found",
"code": "NOT_FOUND"
}
}
```
## UI Approach: Admin Panel
### Step 1: Access Admin Panel
Navigate to: `http://localhost:7654/admin`
### Step 2: Browse Entities
1. Click **Data** in sidebar
2. View list of all entities
3. Click entity to see:
- All fields with types
- Relationships
- Sample data
### Step 3: View Entity Structure
Admin panel shows:
- Field names and types
- Required vs optional fields
- Default values
- Relation configurations
### Step 4: Test Queries
Admin panel provides:
- Data browser for each entity
- Filter/sort interface
- Create/edit forms
- Relationship navigation
## Query Parameter Reference
### Data Endpoints
| Parameter | Example | Description |
|-----------|---------|-------------|
| `limit` | `?limit=10` | Max records to return |
| `offset` | `?offset=20` | Skip N records |
| `sort[field]` | `?sort[created_at]=desc` | Sort by field |
| `where[field]` | `?where[status]=published` | Filter by field |
| `with[]` | `?with[]=author` | Include relation |
| `join[]` | `?join[]=author` | Join relation (same result) |
| `select[]` | `?select[]=id&select[]=title` | Select specific fields |
### Complex Queries (POST)
```bash
curl -X POST http://localhost:7654/api/data/posts/query \
-H "Content-Type: application/json" \
-d '{
"where": {
"status": "published",
"views": { "$gt": 100 }
},
"sort": { "created_at": "desc" },
"limit": 10,
"offset": 0,
"with": ["author", "category"]
}'
```
## SDK MRelated in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.