[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M793JM60GZ3JDFS7PST64RZG":3,"skill-same:01M793JM60GZ3JDFS7PST64RZG":56},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":33,"commitSha":34,"skillDirectory":35,"forksCount":36,"repositoryHtmlUrl":37,"repositoryHomepageUrl":6,"ownerHtmlUrl":38,"ownerBlogUrl":39,"ownerDescription":40,"updatedAt":41,"install":42,"resources":55},"01M793JM60GZ3JDFS7PST64RZG","notion-debug-bundle",null,"Collect Notion API diagnostic info for troubleshooting and support tickets.\nUse when encountering persistent API issues, token\u002Fauth failures, page access\nproblems, or preparing diagnostic bundles for Notion support.\nTrigger with phrases like \"notion debug\", \"notion diagnostic\", \"notion support\nbundle\", \"collect notion logs\", \"notion troubleshoot\".","jukeyman\u002Fjukeyman-skills","jukeyman","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F142960420?v=4","01M78FR4Y3DHMMCBCC0GXXNB3F","RICK JEFFERSON","01M78FR4Z8RVQRAD31Y5J7V6EB",1,"MIT","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsaas-packs--notion-pack--notion-debug-bundle\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: notion-debug-bundle\ndescription: |\n  Collect Notion API diagnostic info for troubleshooting and support tickets.\n  Use when encountering persistent API issues, token\u002Fauth failures, page access\n  problems, or preparing diagnostic bundles for Notion support.\n  Trigger with phrases like \"notion debug\", \"notion diagnostic\", \"notion support\n  bundle\", \"collect notion logs\", \"notion troubleshoot\".\nallowed-tools: Read, Bash(grep:*), Bash(curl:*), Bash(tar:*), Bash(npm:*), Bash(node:*), Grep\nversion: 1.0.0\nlicense: MIT\nauthor: Jeremy Longshore \u003Cjeremy@intentsolutions.io>\ntags: [saas, productivity, notion]\ncompatible-with: claude-code\n---\n\n# Notion Debug Bundle\n\n## Overview\n\nCollect 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.\n\n## Prerequisites\n\n- `@notionhq\u002Fclient` installed (`npm ls @notionhq\u002Fclient` to verify)\n- `NOTION_TOKEN` environment variable set (internal integration token, starts with `ntn_`)\n- `curl` and `jq` available for shell-based diagnostics\n\n## Instructions\n\n### Step 1: Quick Connectivity and Auth Check\n\n```bash\n#!\u002Fbin\u002Fbash\necho \"=== Notion Debug Check ===\"\necho \"Generated: $(date -u +%Y-%m-%dT%H:%M:%SZ)\"\n\n# 1. SDK version\necho -e \"\\n--- SDK Version ---\"\nnpm ls @notionhq\u002Fclient 2>\u002Fdev\u002Fnull || echo \"SDK not found — run: npm install @notionhq\u002Fclient\"\n\n# 2. Runtime and token status\necho -e \"\\n--- Runtime ---\"\nnode --version 2>\u002Fdev\u002Fnull || echo \"Node.js not found\"\necho \"NOTION_TOKEN: ${NOTION_TOKEN:+SET (${#NOTION_TOKEN} chars)}\"\nTOKEN_PREFIX=\"${NOTION_TOKEN:0:4}\"\nif [ -n \"$NOTION_TOKEN\" ] && [ \"$TOKEN_PREFIX\" != \"ntn_\" ]; then\n  echo \"WARNING: Token does not start with 'ntn_' — may be using legacy format\"\nfi\n\n# 3. API connectivity — \u002Fv1\u002Fusers\u002Fme as health check\necho -e \"\\n--- API Connectivity ---\"\nRESPONSE=$(curl -s -w \"\\n%{http_code}\\n%{time_total}\" \\\n  https:\u002F\u002Fapi.notion.com\u002Fv1\u002Fusers\u002Fme \\\n  -H \"Authorization: Bearer ${NOTION_TOKEN}\" \\\n  -H \"Notion-Version: 2022-06-28\" 2>&1)\n\nHTTP_CODE=$(echo \"$RESPONSE\" | tail -1)\nLATENCY=$(echo \"$RESPONSE\" | tail -2 | head -1)\nBODY=$(echo \"$RESPONSE\" | head -n -2)\n\necho \"HTTP Status: $HTTP_CODE\"\necho \"Latency: ${LATENCY}s\"\n\nif [ \"$HTTP_CODE\" = \"200\" ]; then\n  echo \"Bot Name: $(echo \"$BODY\" | jq -r '.name \u002F\u002F \"unknown\"')\"\n  echo \"Bot Type: $(echo \"$BODY\" | jq -r '.type \u002F\u002F \"unknown\"')\"\nelse\n  echo \"Error Code: $(echo \"$BODY\" | jq -r '.code \u002F\u002F \"unknown\"')\"\n  echo \"Message: $(echo \"$BODY\" | jq -r '.message \u002F\u002F \"unknown\"')\"\nfi\n\n# 4. Notion platform status\necho -e \"\\n--- Notion Platform Status ---\"\ncurl -s https:\u002F\u002Fstatus.notion.so\u002Fapi\u002Fv2\u002Fstatus.json \\\n  | jq -r '.status.description \u002F\u002F \"Could not reach status page\"' 2>\u002Fdev\u002Fnull \\\n  || echo \"Could not reach status.notion.so\"\n\n# 5. Rate limit baseline (3 req\u002Fsec across all endpoints)\necho -e \"\\n--- Rate Limit Info ---\"\necho \"Notion enforces 3 requests\u002Fsecond per integration (across all endpoints)\"\necho \"Average request rate limits are not exposed in response headers\"\n```\n\n### Step 2: Full Debug Bundle Script\n\n```bash\n#!\u002Fbin\u002Fbash\n# notion-debug-bundle.sh — collects all diagnostic artifacts into a tarball\nBUNDLE=\"notion-debug-$(date +%Y%m%d-%H%M%S)\"\nmkdir -p \"$BUNDLE\"\n\n# --- Environment snapshot ---\ncat > \"$BUNDLE\u002Fenvironment.txt\" \u003C\u003C EOF\nDate: $(date -u +%Y-%m-%dT%H:%M:%SZ)\nNode: $(node --version 2>\u002Fdev\u002Fnull || echo \"not found\")\nnpm: $(npm --version 2>\u002Fdev\u002Fnull || echo \"not found\")\nSDK: $(npm ls @notionhq\u002Fclient 2>\u002Fdev\u002Fnull | grep notionhq || echo \"not found\")\nNOTION_TOKEN: ${NOTION_TOKEN:+SET (prefix: ${NOTION_TOKEN:0:4})}\nOS: $(uname -a)\nEOF\n\n# --- API auth response (avatar redacted) ---\ncurl -s https:\u002F\u002Fapi.notion.com\u002Fv1\u002Fusers\u002Fme \\\n  -H \"Authorization: Bearer ${NOTION_TOKEN}\" \\\n  -H \"Notion-Version: 2022-06-28\" \\\n  | jq 'del(.avatar_url)' > \"$BUNDLE\u002Fapi-auth.json\" 2>\u002Fdev\u002Fnull\n\n# --- Database access test (if DATABASE_ID is set) ---\nif [ -n \"$NOTION_DATABASE_ID\" ]; then\n  curl -s \"https:\u002F\u002Fapi.notion.com\u002Fv1\u002Fdatabases\u002F${NOTION_DATABASE_ID}\" \\\n    -H \"Authorization: Bearer ${NOTION_TOKEN}\" \\\n    -H \"Notion-Version: 2022-06-28\" \\\n    | jq '{id, title: .title[0].plain_text, is_inline, created_time, last_edited_time}' \\\n    > \"$BUNDLE\u002Fdatabase-access.json\" 2>\u002Fdev\u002Fnull\nelse\n  echo \"NOTION_DATABASE_ID not set — skipping database access test\" > \"$BUNDLE\u002Fdatabase-access.json\"\nfi\n\n# --- Platform status with active incidents ---\ncurl -s https:\u002F\u002Fstatus.notion.so\u002Fapi\u002Fv2\u002Fsummary.json \\\n  | jq '{status: .status, incidents: [.incidents[] | {name, status, updated_at}]}' \\\n  > \"$BUNDLE\u002Fplatform-status.json\" 2>\u002Fdev\u002Fnull\n\n# --- Application logs (redacted) ---\nfor LOG_FILE in app.log server.log output.log; do\n  if [ -f \"$LOG_FILE\" ]; then\n    grep -i \"notion\\|notionhq\\|api\\.notion\" \"$LOG_FILE\" | tail -100 \\\n      | sed 's\u002Fntn_[a-zA-Z0-9_]*\u002Fntn_[REDACTED]\u002Fg' \\\n      | sed 's\u002Fsecret_[a-zA-Z0-9_]*\u002Fsecret_[REDACTED]\u002Fg' \\\n      > \"$BUNDLE\u002Flogs-${LOG_FILE%.log}-redacted.txt\"\n  fi\ndone\n\n# --- Dependency tree for notion packages ---\nnpm ls @notionhq\u002Fclient --all 2>\u002Fdev\u002Fnull > \"$BUNDLE\u002Fdependency-tree.txt\"\n\n# --- .env redacted copy ---\nif [ -f \".env\" ]; then\n  sed 's\u002F=.*\u002F=[REDACTED]\u002F' .env > \"$BUNDLE\u002Fenv-redacted.txt\"\nfi\n\n# --- Package and clean up ---\ntar -czf \"$BUNDLE.tar.gz\" \"$BUNDLE\"\nrm -rf \"$BUNDLE\"\necho \"Bundle created: $BUNDLE.tar.gz\"\n```\n\n### Step 3: Programmatic Diagnostics\n\n```typescript\nimport { Client, isNotionClientError, APIErrorCode } from '@notionhq\u002Fclient';\n\nasync function collectNotionDiagnostics(databaseId?: string) {\n  const notion = new Client({ auth: process.env.NOTION_TOKEN });\n  const debug: Record\u003Cstring, unknown> = {\n    timestamp: new Date().toISOString(),\n    sdk: '@notionhq\u002Fclient',\n    nodeVersion: process.version,\n    tokenSet: !!process.env.NOTION_TOKEN,\n    tokenPrefix: process.env.NOTION_TOKEN?.substring(0, 4) ?? 'unset',\n  };\n\n  \u002F\u002F Test authentication — \u002Fv1\u002Fusers\u002Fme\n  try {\n    const me = await notion.users.me({});\n    debug.auth = { status: 'ok', botName: me.name, type: me.type };\n  } catch (error) {\n    if (isNotionClientError(error)) {\n      debug.auth = { status: 'error', code: error.code, message: error.message };\n    }\n  }\n\n  \u002F\u002F Test database access (if ID provided)\n  if (databaseId) {\n    try {\n      const db = await notion.databases.retrieve({ database_id: databaseId });\n      debug.database = {\n        status: 'ok',\n        title: (db as any).title?.[0]?.plain_text ?? 'untitled',\n        isInline: (db as any).is_inline,\n      };\n    } catch (error) {\n      if (isNotionClientError(error)) {\n        debug.database = { status: 'error', code: error.code, message: error.message };\n        if (error.code === APIErrorCode.ObjectNotFound) {\n          debug.database.hint = 'Integration may not be invited to this database — share it via the page menu';\n        }\n      }\n    }\n  }\n\n  \u002F\u002F Test search (verifies workspace-level access)\n  try {\n    const search = await notion.search({ page_size: 1 });\n    debug.search = {\n      status: 'ok',\n      accessiblePages: search.results.length > 0,\n      resultType: search.results[0]?.object ?? 'none',\n    };\n  } catch (error) {\n    if (isNotionClientError(error)) {\n      debug.search = { status: 'error', code: error.code };\n    }\n  }\n\n  return debug;\n}\n```\n\n## Output\n\n- `notion-debug-YYYYMMDD-HHMMSS.tar.gz` containing:\n  - `environment.txt` — SDK version, Node version, token prefix, OS\n  - `api-auth.json` — Bot user info from `\u002Fv1\u002Fusers\u002Fme` (avatar redacted)\n  - `database-access.json` — Database retrieve result (if `NOTION_DATABASE_ID` set)\n  - `platform-status.json` — status.notion.so health and active incidents\n  - `logs-*-redacted.txt` — Recent Notion-related log entries (tokens masked)\n  - `dependency-tree.txt` — Full npm dependency tree for `@notionhq\u002Fclient`\n  - `env-redacted.txt` — Environment config (all values masked)\n\n## Error Handling\n\n| Error | HTTP | Cause | Fix |\n|-------|------|-------|-----|\n| `unauthorized` | 401 | Invalid or missing token | Verify `NOTION_TOKEN` starts with `ntn_`, regenerate in integration settings |\n| `object_not_found` | 404 | Page\u002FDB not shared with integration | Open page in Notion, click Share, invite the integration |\n| `rate_limited` | 429 | Exceeded 3 req\u002Fsec | Add exponential backoff; batch requests where possible |\n| `validation_error` | 400 | Malformed page\u002Fdatabase ID | Use 32-char UUID format (with or without dashes) |\n| `conflict_error` | 409 | Concurrent edit conflict | Retry with fresh data; avoid parallel writes to same block |\n| `internal_server_error` | 500 | Notion platform issue | Check status.notion.so; retry after 60s |\n\n## Examples\n\n### Token Format Validation\n```bash\n# Valid formats (all start with ntn_):\n# ntn_abc123...  (internal integration token)\n# Old format (secret_xyz...) is deprecated — regenerate in notion.so\u002Fmy-integrations\necho \"Token prefix: ${NOTION_TOKEN:0:4}\"\n```\n\n### Page ID Normalization\n```typescript\n\u002F\u002F Notion accepts both formats — but URLs use dashless form\nconst withDashes    = '12345678-1234-1234-1234-123456789abc';\nconst withoutDashes = '123456781234123412341234567890abc';\n\n\u002F\u002F The SDK handles both, but for consistency:\nconst normalized = rawId.replace(\u002F-\u002Fg, '');\n```\n\n### Redaction Rules\n\n**ALWAYS REDACT:** Integration tokens (`ntn_*`), OAuth client secrets, user emails, page content\n\n**SAFE TO INCLUDE:** Error codes\u002Fmessages, HTTP status codes, latencies, SDK versions, platform status, page\u002Fdatabase IDs (non-sensitive metadata)\n\n## Resources\n\n- [Notion API Introduction](https:\u002F\u002Fdevelopers.notion.com\u002Freference\u002Fintro) — authentication, versioning, pagination\n- [Notion Status Page](https:\u002F\u002Fstatus.notion.so) — real-time platform health\n- [Notion Error Codes](https:\u002F\u002Fdevelopers.notion.com\u002Freference\u002Ferrors) — full error code reference\n- [Integration Setup Guide](https:\u002F\u002Fdevelopers.notion.com\u002Fdocs\u002Fcreate-a-notion-integration) — creating and configuring integrations\n- [Rate Limits](https:\u002F\u002Fdevelopers.notion.com\u002Freference\u002Frequest-limits) — 3 req\u002Fsec limit details\n\n## Next Steps\n\nFor rate limit issues, see `notion-rate-limits`. For page sharing and permission problems, see `notion-enterprise-rbac`.\n","# Notion Debug Bundle\n\n## Overview\n\nCollect 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.\n\n## Prerequisites\n\n- `@notionhq\u002Fclient` installed (`npm ls @notionhq\u002Fclient` to verify)\n- `NOTION_TOKEN` environment variable set (internal integration token, starts with `ntn_`)\n- `curl` and `jq` available for shell-based diagnostics\n\n## Instructions\n\n### Step 1: Quick Connectivity and Auth Check\n\n```bash\n#!\u002Fbin\u002Fbash\necho \"=== Notion Debug Check ===\"\necho \"Generated: $(date -u +%Y-%m-%dT%H:%M:%SZ)\"\n\n# 1. SDK version\necho -e \"\\n--- SDK Version ---\"\nnpm ls @notionhq\u002Fclient 2>\u002Fdev\u002Fnull || echo \"SDK not found — run: npm install @notionhq\u002Fclient\"\n\n# 2. Runtime and token status\necho -e \"\\n--- Runtime ---\"\nnode --version 2>\u002Fdev\u002Fnull || echo \"Node.js not found\"\necho \"NOTION_TOKEN: ${NOTION_TOKEN:+SET (${#NOTION_TOKEN} chars)}\"\nTOKEN_PREFIX=\"${NOTION_TOKEN:0:4}\"\nif [ -n \"$NOTION_TOKEN\" ] && [ \"$TOKEN_PREFIX\" != \"ntn_\" ]; then\n  echo \"WARNING: Token does not start with 'ntn_' — may be using legacy format\"\nfi\n\n# 3. API connectivity — \u002Fv1\u002Fusers\u002Fme as health check\necho -e \"\\n--- API Connectivity ---\"\nRESPONSE=$(curl -s -w \"\\n%{http_code}\\n%{time_total}\" \\\n  https:\u002F\u002Fapi.notion.com\u002Fv1\u002Fusers\u002Fme \\\n  -H \"Authorization: Bearer ${NOTION_TOKEN}\" \\\n  -H \"Notion-Version: 2022-06-28\" 2>&1)\n\nHTTP_CODE=$(echo \"$RESPONSE\" | tail -1)\nLATENCY=$(echo \"$RESPONSE\" | tail -2 | head -1)\nBODY=$(echo \"$RESPONSE\" | head -n -2)\n\necho \"HTTP Status: $HTTP_CODE\"\necho \"Latency: ${LATENCY}s\"\n\nif [ \"$HTTP_CODE\" = \"200\" ]; then\n  echo \"Bot Name: $(echo \"$BODY\" | jq -r '.name \u002F\u002F \"unknown\"')\"\n  echo \"Bot Type: $(echo \"$BODY\" | jq -r '.type \u002F\u002F \"unknown\"')\"\nelse\n  echo \"Error Code: $(echo \"$BODY\" | jq -r '.code \u002F\u002F \"unknown\"')\"\n  echo \"Message: $(echo \"$BODY\" | jq -r '.message \u002F\u002F \"unknown\"')\"\nfi\n\n# 4. Notion platform status\necho -e \"\\n--- Notion Platform Status ---\"\ncurl -s https:\u002F\u002Fstatus.notion.so\u002Fapi\u002Fv2\u002Fstatus.json \\\n  | jq -r '.status.description \u002F\u002F \"Could not reach status page\"' 2>\u002Fdev\u002Fnull \\\n  || echo \"Could not reach status.notion.so\"\n\n# 5. Rate limit baseline (3 req\u002Fsec across all endpoints)\necho -e \"\\n--- Rate Limit Info ---\"\necho \"Notion enforces 3 requests\u002Fsecond per integration (across all endpoints)\"\necho \"Average request rate limits are not exposed in response headers\"\n```\n\n### Step 2: Full Debug Bundle Script\n\n```bash\n#!\u002Fbin\u002Fbash\n# notion-debug-bundle.sh — collects all diagnostic artifacts into a tarball\nBUNDLE=\"notion-debug-$(date +%Y%m%d-%H%M%S)\"\nmkdir -p \"$BUNDLE\"\n\n# --- Environment snapshot ---\ncat > \"$BUNDLE\u002Fenvironment.txt\" \u003C\u003C EOF\nDate: $(date -u +%Y-%m-%dT%H:%M:%SZ)\nNode: $(node --version 2>\u002Fdev\u002Fnull || echo \"not found\")\nnpm: $(npm --version 2>\u002Fdev\u002Fnull || echo \"not found\")\nSDK: $(npm ls @notionhq\u002Fclient 2>\u002Fdev\u002Fnull | grep notionhq || echo \"not found\")\nNOTION_TOKEN: ${NOTION_TOKEN:+SET (prefix: ${NOTION_TOKEN:0:4})}\nOS: $(uname -a)\nEOF\n\n# --- API auth response (avatar redacted) ---\ncurl -s https:\u002F\u002Fapi.notion.com\u002Fv1\u002Fusers\u002Fme \\\n  -H \"Authorization: Bearer ${NOTION_TOKEN}\" \\\n  -H \"Notion-Version: 2022-06-28\" \\\n  | jq 'del(.avatar_url)' > \"$BUNDLE\u002Fapi-auth.json\" 2>\u002Fdev\u002Fnull\n\n# --- Database access test (if DATABASE_ID is set) ---\nif [ -n \"$NOTION_DATABASE_ID\" ]; then\n  curl -s \"https:\u002F\u002Fapi.notion.com\u002Fv1\u002Fdatabases\u002F${NOTION_DATABASE_ID}\" \\\n    -H \"Authorization: Bearer ${NOTION_TOKEN}\" \\\n    -H \"Notion-Version: 2022-06-28\" \\\n    | jq '{id, title: .title[0].plain_text, is_inline, created_time, last_edited_time}' \\\n    > \"$BUNDLE\u002Fdatabase-access.json\" 2>\u002Fdev\u002Fnull\nelse\n  echo \"NOTION_DATABASE_ID not set — skipping database access test\" > \"$BUNDLE\u002Fdatabase-access.json\"\nfi\n\n# --- Platform status with active incidents ---\ncurl -s https:\u002F\u002Fstatus.notion.so\u002Fapi\u002Fv2\u002Fsummary.json \\\n  | jq '{status: .status, incidents: [.incidents[] | {name, status, updated_at}]}' \\\n  > \"$BUNDLE\u002Fplatform-status.json\" 2>\u002Fdev\u002Fnull\n\n# --- Application logs (redacted) ---\nfor LOG_FILE in app.log server.log output.log; do\n  if [ -f \"$LOG_FILE\" ]; then\n    grep -i \"notion\\|notionhq\\|api\\.notion\" \"$LOG_FILE\" | tail -100 \\\n      | sed 's\u002Fntn_[a-zA-Z0-9_]*\u002Fntn_[REDACTED]\u002Fg' \\\n      | sed 's\u002Fsecret_[a-zA-Z0-9_]*\u002Fsecret_[REDACTED]\u002Fg' \\\n      > \"$BUNDLE\u002Flogs-${LOG_FILE%.log}-redacted.txt\"\n  fi\ndone\n\n# --- Dependency tree for notion packages ---\nnpm ls @notionhq\u002Fclient --all 2>\u002Fdev\u002Fnull > \"$BUNDLE\u002Fdependency-tree.txt\"\n\n# --- .env redacted copy ---\nif [ -f \".env\" ]; then\n  sed 's\u002F=.*\u002F=[REDACTED]\u002F' .env > \"$BUNDLE\u002Fenv-redacted.txt\"\nfi\n\n# --- Package and clean up ---\ntar -czf \"$BUNDLE.tar.gz\" \"$BUNDLE\"\nrm -rf \"$BUNDLE\"\necho \"Bundle created: $BUNDLE.tar.gz\"\n```\n\n### Step 3: Programmatic Diagnostics\n\n```typescript\nimport { Client, isNotionClientError, APIErrorCode } from '@notionhq\u002Fclient';\n\nasync function collectNotionDiagnostics(databaseId?: string) {\n  const notion = new Client({ auth: process.env.NOTION_TOKEN });\n  const debug: Record\u003Cstring, unknown> = {\n    timestamp: new Date().toISOString(),\n    sdk: '@notionhq\u002Fclient',\n    nodeVersion: process.version,\n    tokenSet: !!process.env.NOTION_TOKEN,\n    tokenPrefix: process.env.NOTION_TOKEN?.substring(0, 4) ?? 'unset',\n  };\n\n  \u002F\u002F Test authentication — \u002Fv1\u002Fusers\u002Fme\n  try {\n    const me = await notion.users.me({});\n    debug.auth = { status: 'ok', botName: me.name, type: me.type };\n  } catch (error) {\n    if (isNotionClientError(error)) {\n      debug.auth = { status: 'error', code: error.code, message: error.message };\n    }\n  }\n\n  \u002F\u002F Test database access (if ID provided)\n  if (databaseId) {\n    try {\n      const db = await notion.databases.retrieve({ database_id: databaseId });\n      debug.database = {\n        status: 'ok',\n        title: (db as any).title?.[0]?.plain_text ?? 'untitled',\n        isInline: (db as any).is_inline,\n      };\n    } catch (error) {\n      if (isNotionClientError(error)) {\n        debug.database = { status: 'error', code: error.code, message: error.message };\n        if (error.code === APIErrorCode.ObjectNotFound) {\n          debug.database.hint = 'Integration may not be invited to this database — share it via the page menu';\n        }\n      }\n    }\n  }\n\n  \u002F\u002F Test search (verifies workspace-level access)\n  try {\n    const search = await notion.search({ page_size: 1 });\n    debug.search = {\n      status: 'ok',\n      accessiblePages: search.results.length > 0,\n      resultType: search.results[0]?.object ?? 'none',\n    };\n  } catch (error) {\n    if (isNotionClientError(error)) {\n      debug.search = { status: 'error', code: error.code };\n    }\n  }\n\n  return debug;\n}\n```\n\n## Output\n\n- `notion-debug-YYYYMMDD-HHMMSS.tar.gz` containing:\n  - `environment.txt` — SDK version, Node version, token prefix, OS\n  - `api-auth.json` — Bot user info from `\u002Fv1\u002Fusers\u002Fme` (avatar redacted)\n  - `database-access.json` — Database retrieve result (if `NOTION_DATABASE_ID` set)\n  - `platform-status.json` — status.notion.so health and active incidents\n  - `logs-*-redacted.txt` — Recent Notion-related log entries (tokens masked)\n  - `dependency-tree.txt` — Full npm dependency tree for `@notionhq\u002Fclient`\n  - `env-redacted.txt` — Environment config (all values masked)\n\n## Error Handling\n\n| Error | HTTP | Cause | Fix |\n|-------|------|-------|-----|\n| `unauthorized` | 401 | Invalid or missing token | Verify `NOTION_TOKEN` starts with `ntn_`, regenerate in integration settings |\n| `object_not_found` | 404 | Page\u002FDB not shared with integration | Open page in Notion, click Share, invite the integration |\n| `rate_limited` | 429 | Exceeded 3 req\u002Fsec | Add exponential backoff; batch requests where possible |\n| `validation_error` | 400 | Malformed page\u002Fdatabase ID | Use 32-char UUID format (with or without dashes) |\n| `conflict_error` | 409 | Concurrent edit conflict | Retry with fresh data; avoid parallel writes to same block |\n| `internal_server_error` | 500 | Notion platform issue | Check status.notion.so; retry after 60s |\n\n## Examples\n\n### Token Format Validation\n```bash\n# Valid formats (all start with ntn_):\n# ntn_abc123...  (internal integration token)\n# Old format (secret_xyz...) is deprecated — regenerate in notion.so\u002Fmy-integrations\necho \"Token prefix: ${NOTION_TOKEN:0:4}\"\n```\n\n### Page ID Normalization\n```typescript\n\u002F\u002F Notion accepts both formats — but URLs use dashless form\nconst withDashes    = '12345678-1234-1234-1234-123456789abc';\nconst withoutDashes = '123456781234123412341234567890abc';\n\n\u002F\u002F The SDK handles both, but for consistency:\nconst normalized = rawId.replace(\u002F-\u002Fg, '');\n```\n\n### Redaction Rules\n\n**ALWAYS REDACT:** Integration tokens (`ntn_*`), OAuth client secrets, user emails, page content\n\n**SAFE TO INCLUDE:** Error codes\u002Fmessages, HTTP status codes, latencies, SDK versions, platform status, page\u002Fdatabase IDs (non-sensitive metadata)\n\n## Resources\n\n- [Notion API Introduction](https:\u002F\u002Fdevelopers.notion.com\u002Freference\u002Fintro) — authentication, versioning, pagination\n- [Notion Status Page](https:\u002F\u002Fstatus.notion.so) — real-time platform health\n- [Notion Error Codes](https:\u002F\u002Fdevelopers.notion.com\u002Freference\u002Ferrors) — full error code reference\n- [Integration Setup Guide](https:\u002F\u002Fdevelopers.notion.com\u002Fdocs\u002Fcreate-a-notion-integration) — creating and configuring integrations\n- [Rate Limits](https:\u002F\u002Fdevelopers.notion.com\u002Freference\u002Frequest-limits) — 3 req\u002Fsec limit details\n\n## Next Steps\n\nFor rate limit issues, see `notion-rate-limits`. For page sharing and permission problems, see `notion-enterprise-rbac`.\n",{"name":5,"tags":24,"author":28,"license":15,"version":29,"description":30,"allowed-tools":31,"compatible-with":32},[25,26,27],"saas","productivity","notion","Jeremy Longshore \u003Cjeremy@intentsolutions.io>","1.0.0","Collect Notion API diagnostic info for troubleshooting and support tickets.\nUse when encountering persistent API issues, token\u002Fauth failures, page access\nproblems, or preparing diagnostic bundles for Notion support.\nTrigger with phrases like \"notion debug\", \"notion diagnostic\", \"notion support\nbundle\", \"collect notion logs\", \"notion troubleshoot\".\n","Read, Bash(grep:*), Bash(curl:*), Bash(tar:*), Bash(npm:*), Bash(node:*), Grep","claude-code","main","99825ad3f3bcc6597ddcc7294a14e6e922f2b67b","skills\u002Fsaas-packs--notion-pack--notion-debug-bundle",0,"https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills","https:\u002F\u002Fgithub.com\u002Fjukeyman","https:\u002F\u002FRJBUSINESSSOLUTIONS.ORG","Credit and Finance Expert | Developer\r\n\r\nI'm Rick Jefferson, a seasoned credit and finance expert with over a decade of experience in financial literacy,","2026-07-13 07:03:29",{"source":8,"skillName":5,"commands":43,"prompt":53,"zipAvailable":54},[44,47,50],{"tool":45,"command":46},"npx","npx skills add jukeyman\u002Fjukeyman-skills --skill notion-debug-bundle",{"tool":48,"command":49},"bunx","bunx skills add jukeyman\u002Fjukeyman-skills --skill notion-debug-bundle",{"tool":51,"command":52},"pnpm","pnpm dlx skills add jukeyman\u002Fjukeyman-skills --skill notion-debug-bundle","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsaas-packs--notion-pack--notion-debug-bundle\u002FSKILL.md",true,[],[57,64,71,78,85,93],{"skillNo":58,"name":59,"nameZh":6,"description":60,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":63,"publishedAt":19},"01M79ANS2SM329NEP5ZCX106RR","zustand-store-creator","Create zustand store creator operations. Auto-activating skill for Frontend Development.\nTriggers on: zustand store creator, zustand store creator\nPart of the Frontend Development skill category. Use when working with zustand store creator functionality. Trigger with phrases like \"zustand store creator\", \"zustand creator\", \"zustand\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzustand-store-creator\u002FSKILL.md",[],[],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":19},"01M79AMZKP4YDEZ7EHG1Y7PP74","zero-trust-config-helper","Configure with zero trust config helper operations. Auto-activating skill for Security Advanced.\nTriggers on: zero trust config helper, zero trust config helper\nPart of the Security Advanced skill category. Use when configuring systems or services. Trigger with phrases like \"zero trust config helper\", \"zero helper\", \"zero\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzero-trust-config-helper\u002FSKILL.md",[],[],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":19},"01M79AMJSBCEJQNBTYNAHYN5HM","zapier-integration-helper","Assist with zapier integration helper operations. Auto-activating skill for Business Automation.\nTriggers on: zapier integration helper, zapier integration helper\nPart of the Business Automation skill category. Use when working with APIs or building integrations. Trigger with phrases like \"zapier integration helper\", \"zapier helper\", \"zapier\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzapier-integration-helper\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":19},"01M79AHJZGVMARS13VFQYRR1MP","yaml-config-validator","Validate yaml config validator operations. Auto-activating skill for DevOps Basics.\nTriggers on: yaml config validator, yaml config validator\nPart of the DevOps Basics skill category. Use when configuring systems or services. Trigger with phrases like \"yaml config validator\", \"yaml validator\", \"yaml\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fyaml-config-validator\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":89,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":19},"01M79AHGDZRN0020RDQSQDPAM8","xvary-stock-research","Thesis-driven equity analysis from public SEC EDGAR and market data; \u002Fanalyze, \u002Fscore, \u002Fcompare workflows with bundled Python tools (Claude Code, Cursor, Codex).","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxvary-stock-research\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxvary-stock-research\u002FSKILL.md",[],[],{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":19},"01M79AHCYJ9FV9RMHQ24HDRN33","xss-vulnerability-scanner","Scan xss vulnerability scanner operations. Auto-activating skill for Security Fundamentals.\nTriggers on: xss vulnerability scanner, xss vulnerability scanner\nPart of the Security Fundamentals skill category. Use when working with xss vulnerability scanner functionality. Trigger with phrases like \"xss vulnerability scanner\", \"xss scanner\", \"xss\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxss-vulnerability-scanner\u002FSKILL.md",[],[]]