notion-debug-bundle
Collect Notion API diagnostic info for troubleshooting and support tickets. Use when encountering persistent API issues, token/auth failures, page access problems, or preparing diagnostic bundles for Notion support. Trigger with phrases like "notion debug", "notion diagnostic", "notion support bundle", "collect notion logs", "notion troubleshoot".
What this skill does
# Notion Debug Bundle
## Overview
Collect diagnostic information for Notion API issues: SDK version, token validity, database access, page sharing status, rate limits, and platform health. The Notion API requires integrations to be explicitly invited to each page or database — most "not found" errors are sharing problems, not code bugs.
## Prerequisites
- `@notionhq/client` installed (`npm ls @notionhq/client` to verify)
- `NOTION_TOKEN` environment variable set (internal integration token, starts with `ntn_`)
- `curl` and `jq` available for shell-based diagnostics
## Instructions
### Step 1: Quick Connectivity and Auth Check
```bash
#!/bin/bash
echo "=== Notion Debug Check ==="
echo "Generated: $(date -u +%Y-%m-%dT%H:%M:%SZ)"
# 1. SDK version
echo -e "\n--- SDK Version ---"
npm ls @notionhq/client 2>/dev/null || echo "SDK not found — run: npm install @notionhq/client"
# 2. Runtime and token status
echo -e "\n--- Runtime ---"
node --version 2>/dev/null || echo "Node.js not found"
echo "NOTION_TOKEN: ${NOTION_TOKEN:+SET (${#NOTION_TOKEN} chars)}"
TOKEN_PREFIX="${NOTION_TOKEN:0:4}"
if [ -n "$NOTION_TOKEN" ] && [ "$TOKEN_PREFIX" != "ntn_" ]; then
echo "WARNING: Token does not start with 'ntn_' — may be using legacy format"
fi
# 3. API connectivity — /v1/users/me as health check
echo -e "\n--- API Connectivity ---"
RESPONSE=$(curl -s -w "\n%{http_code}\n%{time_total}" \
https://api.notion.com/v1/users/me \
-H "Authorization: Bearer ${NOTION_TOKEN}" \
-H "Notion-Version: 2022-06-28" 2>&1)
HTTP_CODE=$(echo "$RESPONSE" | tail -1)
LATENCY=$(echo "$RESPONSE" | tail -2 | head -1)
BODY=$(echo "$RESPONSE" | head -n -2)
echo "HTTP Status: $HTTP_CODE"
echo "Latency: ${LATENCY}s"
if [ "$HTTP_CODE" = "200" ]; then
echo "Bot Name: $(echo "$BODY" | jq -r '.name // "unknown"')"
echo "Bot Type: $(echo "$BODY" | jq -r '.type // "unknown"')"
else
echo "Error Code: $(echo "$BODY" | jq -r '.code // "unknown"')"
echo "Message: $(echo "$BODY" | jq -r '.message // "unknown"')"
fi
# 4. Notion platform status
echo -e "\n--- Notion Platform Status ---"
curl -s https://status.notion.so/api/v2/status.json \
| jq -r '.status.description // "Could not reach status page"' 2>/dev/null \
|| echo "Could not reach status.notion.so"
# 5. Rate limit baseline (3 req/sec across all endpoints)
echo -e "\n--- Rate Limit Info ---"
echo "Notion enforces 3 requests/second per integration (across all endpoints)"
echo "Average request rate limits are not exposed in response headers"
```
### Step 2: Full Debug Bundle Script
```bash
#!/bin/bash
# notion-debug-bundle.sh — collects all diagnostic artifacts into a tarball
BUNDLE="notion-debug-$(date +%Y%m%d-%H%M%S)"
mkdir -p "$BUNDLE"
# --- Environment snapshot ---
cat > "$BUNDLE/environment.txt" << EOF
Date: $(date -u +%Y-%m-%dT%H:%M:%SZ)
Node: $(node --version 2>/dev/null || echo "not found")
npm: $(npm --version 2>/dev/null || echo "not found")
SDK: $(npm ls @notionhq/client 2>/dev/null | grep notionhq || echo "not found")
NOTION_TOKEN: ${NOTION_TOKEN:+SET (prefix: ${NOTION_TOKEN:0:4})}
OS: $(uname -a)
EOF
# --- API auth response (avatar redacted) ---
curl -s https://api.notion.com/v1/users/me \
-H "Authorization: Bearer ${NOTION_TOKEN}" \
-H "Notion-Version: 2022-06-28" \
| jq 'del(.avatar_url)' > "$BUNDLE/api-auth.json" 2>/dev/null
# --- Database access test (if DATABASE_ID is set) ---
if [ -n "$NOTION_DATABASE_ID" ]; then
curl -s "https://api.notion.com/v1/databases/${NOTION_DATABASE_ID}" \
-H "Authorization: Bearer ${NOTION_TOKEN}" \
-H "Notion-Version: 2022-06-28" \
| jq '{id, title: .title[0].plain_text, is_inline, created_time, last_edited_time}' \
> "$BUNDLE/database-access.json" 2>/dev/null
else
echo "NOTION_DATABASE_ID not set — skipping database access test" > "$BUNDLE/database-access.json"
fi
# --- Platform status with active incidents ---
curl -s https://status.notion.so/api/v2/summary.json \
| jq '{status: .status, incidents: [.incidents[] | {name, status, updated_at}]}' \
> "$BUNDLE/platform-status.json" 2>/dev/null
# --- Application logs (redacted) ---
for LOG_FILE in app.log server.log output.log; do
if [ -f "$LOG_FILE" ]; then
grep -i "notion\|notionhq\|api\.notion" "$LOG_FILE" | tail -100 \
| sed 's/ntn_[a-zA-Z0-9_]*/ntn_[REDACTED]/g' \
| sed 's/secret_[a-zA-Z0-9_]*/secret_[REDACTED]/g' \
> "$BUNDLE/logs-${LOG_FILE%.log}-redacted.txt"
fi
done
# --- Dependency tree for notion packages ---
npm ls @notionhq/client --all 2>/dev/null > "$BUNDLE/dependency-tree.txt"
# --- .env redacted copy ---
if [ -f ".env" ]; then
sed 's/=.*/=[REDACTED]/' .env > "$BUNDLE/env-redacted.txt"
fi
# --- Package and clean up ---
tar -czf "$BUNDLE.tar.gz" "$BUNDLE"
rm -rf "$BUNDLE"
echo "Bundle created: $BUNDLE.tar.gz"
```
### Step 3: Programmatic Diagnostics
```typescript
import { Client, isNotionClientError, APIErrorCode } from '@notionhq/client';
async function collectNotionDiagnostics(databaseId?: string) {
const notion = new Client({ auth: process.env.NOTION_TOKEN });
const debug: Record<string, unknown> = {
timestamp: new Date().toISOString(),
sdk: '@notionhq/client',
nodeVersion: process.version,
tokenSet: !!process.env.NOTION_TOKEN,
tokenPrefix: process.env.NOTION_TOKEN?.substring(0, 4) ?? 'unset',
};
// Test authentication — /v1/users/me
try {
const me = await notion.users.me({});
debug.auth = { status: 'ok', botName: me.name, type: me.type };
} catch (error) {
if (isNotionClientError(error)) {
debug.auth = { status: 'error', code: error.code, message: error.message };
}
}
// Test database access (if ID provided)
if (databaseId) {
try {
const db = await notion.databases.retrieve({ database_id: databaseId });
debug.database = {
status: 'ok',
title: (db as any).title?.[0]?.plain_text ?? 'untitled',
isInline: (db as any).is_inline,
};
} catch (error) {
if (isNotionClientError(error)) {
debug.database = { status: 'error', code: error.code, message: error.message };
if (error.code === APIErrorCode.ObjectNotFound) {
debug.database.hint = 'Integration may not be invited to this database — share it via the page menu';
}
}
}
}
// Test search (verifies workspace-level access)
try {
const search = await notion.search({ page_size: 1 });
debug.search = {
status: 'ok',
accessiblePages: search.results.length > 0,
resultType: search.results[0]?.object ?? 'none',
};
} catch (error) {
if (isNotionClientError(error)) {
debug.search = { status: 'error', code: error.code };
}
}
return debug;
}
```
## Output
- `notion-debug-YYYYMMDD-HHMMSS.tar.gz` containing:
- `environment.txt` — SDK version, Node version, token prefix, OS
- `api-auth.json` — Bot user info from `/v1/users/me` (avatar redacted)
- `database-access.json` — Database retrieve result (if `NOTION_DATABASE_ID` set)
- `platform-status.json` — status.notion.so health and active incidents
- `logs-*-redacted.txt` — Recent Notion-related log entries (tokens masked)
- `dependency-tree.txt` — Full npm dependency tree for `@notionhq/client`
- `env-redacted.txt` — Environment config (all values masked)
## Error Handling
| Error | HTTP | Cause | Fix |
|-------|------|-------|-----|
| `unauthorized` | 401 | Invalid or missing token | Verify `NOTION_TOKEN` starts with `ntn_`, regenerate in integration settings |
| `object_not_found` | 404 | Page/DB not shared with integration | Open page in Notion, click Share, invite the integration |
| `rate_limited` | 429 | Exceeded 3 req/sec | Add exponential backoff; batch requests where possible |
| `validation_error` | 400 | Malformed page/database ID | Use 32-char UUID format (with or without dashes) |
| `conflict_error` | 409 | Concurrent edit conflict | Retry with fresh data; avoid parallel writes to same block |
| `internal_server_error` | 5Related 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.