smoke-test-api
# Smoke Test API Skill
What this skill does
# Smoke Test API Skill
**Quick Reference** - Load this first for fast context (~3KB)
## Mission
Execute comprehensive API health smoke tests to validate service availability, response times, and critical endpoint functionality during release workflows.
## Core Capabilities
- **Health Check Execution**: Test API endpoints for availability and response time
- **Critical Endpoint Validation**: Verify core API operations (CRUD, search, auth)
- **Response Validation**: Check status codes, response structure, error handling
- **Performance SLA Validation**: Ensure response times meet performance budgets
- **Multi-Environment Support**: Test across pre-release, staging, production environments
## When to Use This Skill
Use this skill when:
- Executing pre-release smoke tests (before staging deployment)
- Validating post-deployment health (after staging/production deployment)
- Testing canary deployments (5%, 25%, 100% traffic)
- Verifying rollback success (after rollback operations)
- Running scheduled health checks (monitoring integration)
## Quick Start
### 1. Load Skill in Agent
```yaml
skills:
- name: smoke-test-api
path: skills/smoke-test-api/SKILL.md
```
### 2. Execute Health Checks
```javascript
const { SmokeTestAPI } = require('./scripts/execute-health-checks.js');
const tester = new SmokeTestAPI({
baseUrl: 'https://staging.example.com',
timeout: 5000,
retries: 2
});
const result = await tester.executeHealthChecks({
environment: 'staging',
endpoints: [
{ path: '/health', method: 'GET', expectedStatus: 200 },
{ path: '/api/v1/users', method: 'GET', expectedStatus: 200 }
]
});
if (result.passed) {
console.log('✅ API health checks passed');
} else {
console.error('❌ API health checks failed');
}
```
### 3. Configuration Template
```yaml
environment: staging
baseUrl: https://staging.example.com
timeout: 5000
retries: 2
endpoints:
- name: health-check
path: /health
method: GET
expectedStatus: 200
sla: 100
- name: list-users
path: /api/v1/users
method: GET
expectedStatus: 200
sla: 500
```
## API Smoke Test Categories
### 1. Health Endpoints
- System health: `/health`, `/ping`, `/status`
- Database connectivity: `/health/db`
- Cache connectivity: `/health/cache`
- External service connectivity: `/health/integrations`
### 2. Critical CRUD Operations
- Create: `POST /api/v1/resource` (201 Created)
- Read: `GET /api/v1/resource/:id` (200 OK)
- Update: `PUT /api/v1/resource/:id` (200 OK)
- Delete: `DELETE /api/v1/resource/:id` (204 No Content)
### 3. Authentication & Authorization
- Login: `POST /api/v1/auth/login` (200 OK + token)
- Token validation: `GET /api/v1/auth/me` (200 OK with user)
- Protected resource: `GET /api/v1/protected` (401 without token, 200 with token)
### 4. Search & Query Operations
- Search: `GET /api/v1/search?q=term` (200 OK with results)
- Pagination: `GET /api/v1/resource?page=1&limit=10` (200 OK with paginated results)
- Filtering: `GET /api/v1/resource?status=active` (200 OK with filtered results)
### 5. Error Handling
- Not found: `GET /api/v1/nonexistent` (404 Not Found)
- Bad request: `POST /api/v1/resource` with invalid data (400 Bad Request)
- Unauthorized: `GET /api/v1/protected` without token (401 Unauthorized)
## Performance SLAs
```javascript
const SLA_TARGETS = {
health: 100, // Health endpoints: ≤100ms
read: 500, // Read operations: ≤500ms
write: 1000, // Write operations: ≤1000ms
search: 2000, // Search operations: ≤2000ms
timeout: 5000 // Global timeout: ≤5000ms
};
```
## Pass/Fail Criteria
**Pass**: All smoke tests must pass
- ✅ All endpoints return expected status codes
- ✅ All response times meet SLA targets
- ✅ All response structures are valid
- ✅ No unexpected errors or exceptions
**Fail**: Any smoke test failure blocks deployment
- ❌ Any endpoint returns unexpected status code
- ❌ Any response time exceeds SLA target
- ❌ Any response structure is invalid
- ❌ Any unexpected error or exception occurs
## Execution Points
API smoke tests are executed at these points in the release workflow:
1. **Pre-Release** (before staging deployment): Validate API readiness
2. **Post-Staging** (after staging deployment): Verify staging API health
3. **Canary 5%** (5% traffic): Test canary API with minimal traffic
4. **Canary 25%** (25% traffic): Test canary API with moderate traffic
5. **Canary 100%** (100% traffic): Test canary API with full traffic
6. **Post-Production** (after production deployment): Verify production API health
7. **Post-Rollback** (after rollback): Validate rollback API health
## Common Patterns
### Pattern 1: Simple Health Check
```javascript
const result = await tester.testEndpoint({
path: '/health',
method: 'GET',
expectedStatus: 200,
sla: 100
});
```
### Pattern 2: Authenticated Request
```javascript
const result = await tester.testEndpoint({
path: '/api/v1/users',
method: 'GET',
expectedStatus: 200,
sla: 500,
headers: {
'Authorization': `Bearer ${token}`
}
});
```
### Pattern 3: POST with Body
```javascript
const result = await tester.testEndpoint({
path: '/api/v1/users',
method: 'POST',
expectedStatus: 201,
sla: 1000,
body: {
name: 'Test User',
email: '[email protected]'
}
});
```
## Output Format
```javascript
{
passed: true,
details: {
totalEndpoints: 10,
passed: 10,
failed: 0,
executionTime: 1234
},
reason: 'API smoke tests passed: All 10 endpoints responding',
metrics: {
endpointsPassed: 10,
endpointsFailed: 0,
averageResponseTime: 123,
executionTime: 1234
},
results: [
{
endpoint: '/health',
method: 'GET',
status: 200,
responseTime: 45,
sla: 100,
passed: true
}
]
}
```
## Need More Detail?
For comprehensive documentation including:
- Advanced testing patterns (retry logic, circuit breakers, rate limiting)
- Multi-environment configurations
- Integration with monitoring systems
- Custom validation rules
- Performance optimization strategies
**Load**: `skills/smoke-test-api/REFERENCE.md` (~15KB)
Related 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.