Skip to content
Skillv1.0.0

doctor

Diagnose Promptbook setup — check config, hooks, API key, and session tracking health. Use when Promptbook seems broken or the user wants to verify their setup. Trigger with "/doctor" or "check prompt

by jeremylongshore(0) 0 installs
Free
Sign in to install

Free account. Installing gives you the manifest plus copy-paste snippets.

See reviews

About

Imported from jeremylongshore/tons-of-skills-marketplace (skills/.curated/doctor/SKILL.md). Install upstream with npx skills add jeremylongshore/tons-of-skills-marketplace --skill doctor. Copyright stays with the author (MIT).

Promptbook Doctor

Overview

Run diagnostics to verify Promptbook is set up correctly. Checks config, consent, API key validity, and recent session activity. Presents a clear pass/fail report.

Prerequisites

  • Promptbook must have been set up via /setup first
  • Node.js installed (used for config parsing)
  • Internet access (for API key verification)

Instructions

Run these checks in order via Bash and report each result.

1. Config file exists

if [ -f "$HOME/.promptbook/config.json" ]; then
  echo "CONFIG_FOUND"
  # Check permissions — should be 600 for security
  stat -f "%Lp" "$HOME/.promptbook/config.json" 2>/dev/null || stat -c "%a" "$HOME/.promptbook/config.json" 2>/dev/null
  # Check required fields exist (without displaying values)
  node -e "const c=JSON.parse(require('fs').readFileSync('$HOME/.promptbook/config.json','utf8'));console.log('has_api_key:',!!c.api_key);console.log('has_api_url:',!!c.api_url);console.log('auto_summary:',c.auto_summary);console.log('telemetry_consent:',c.telemetry_consent===true)"
else
  echo "NO_CONFIG"
fi

If no config file found or telemetry_consent is false: tell the user to run /setup first.

2. API key is valid

Test the API key without displaying it:

API_KEY=$(node -e "console.log(JSON.parse(require('fs').readFileSync('$HOME/.promptbook/config.json','utf8')).api_key)")
curl -sL -o /dev/null -w "%{http_code}" -X POST "https://promptbook.gg/api/auth/verify-setup" \
  -H "Authorization: Bearer $API_KEY"
  • 200 = valid and verified
  • 401 = invalid key — suggest running /setup again
  • Other = network issue — suggest checking connectivity

3. Last session activity

Check for recent session data files to verify hooks are firing:

ls -lt ~/.promptbook/sessions/ 2>/dev/null | head -5

If no session files found: hooks may not be firing. Suggest starting a new Claude Code session.

Output

Present results as a clear diagnostic report:

Promptbook Doctor
─────────────────
✓ Config:    Found (~/.promptbook/config.json)
✓ Consent:   Granted during setup
✓ API Key:   Valid and verified
✓ Activity:  Last session 2 hours ago

Use for passing checks, for failures, for warnings.

Error Handling

  • If config file is missing, report ✗ Config and direct user to /setup
  • If consent is false, report ✗ Consent and direct user to /setup
  • If API key returns 401, report ✗ API Key and suggest re-running /setup
  • If no session files exist, report ⚠ Activity and suggest starting a new session
  • Never display the API key in the report

Examples

User: /doctor
Agent: Promptbook Doctor
       ─────────────────
       ✓ Config:    Found (~/.promptbook/config.json), permissions 600
       ✓ Consent:   Granted during setup
       ✓ API Key:   Valid and verified (HTTP 200)
       ✗ Activity:  No recent sessions found
       
       Everything looks good except no sessions have been tracked yet.
       Start a new Claude Code session to see your first build.

Resources

Use it

Copy one of these into your project. Installing also returns the manifest and these snippets.

yaml
targets:
  - https://api.opensmartroute.ai/api/v1/registry/jeremylongshore-tons-of-skills-marketplace-doctor/manifest   # or paste the manifest below

Manifest

An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.

jeremylongshore-tons-of-skills-marketplace-doctor.ocm.jsonjson
{
  "ocm": "1",
  "id": "jeremylongshore-tons-of-skills-marketplace-doctor",
  "kind": "skill",
  "name": "doctor",
  "description": "Diagnose Promptbook setup — check config, hooks, API key, and session tracking health. Use when Promptbook seems broken or the user wants to verify their setup. Trigger with \"/doctor\" or \"check promptbook health\".",
  "publisher": "jeremylongshore",
  "version": "1.0.0",
  "capabilities": {
    "domains": [
      "coding"
    ],
    "tags": [
      "skill-md",
      "analytics",
      "telemetry",
      "diagnostics",
      "health-check",
      "skills-sh"
    ],
    "languages": [
      "en"
    ]
  },
  "quality_prior": 0.6,
  "examples": [
    "Diagnose Promptbook setup — check config, hooks, API key, and session tracking health. Use when Promptbook seems broken or the user wants to verify their setup. Trigger with \"/doctor\" or \"check promptbook health\"."
  ],
  "primary": false,
  "metadata": {
    "source": {
      "provider": "skills.sh",
      "repository": "https://github.com/jeremylongshore/tons-of-skills-marketplace",
      "path": "skills/.curated/doctor/SKILL.md",
      "ref": "HEAD",
      "url": "https://github.com/jeremylongshore/tons-of-skills-marketplace/blob/HEAD/skills/.curated/doctor/SKILL.md",
      "key": "jeremylongshore/tons-of-skills-marketplace/skills/.curated/doctor/SKILL.md"
    },
    "compatibility": "Designed for Claude Code",
    "allowed_tools": [
      "Bash(node:*),",
      "Bash(curl:*),",
      "Bash(ls:*),",
      "Bash(stat:*),",
      "Bash(cat:*),",
      "Read"
    ],
    "license": "MIT"
  },
  "instructions": "# Promptbook Doctor\n\n## Overview\n\nRun diagnostics to verify Promptbook is set up correctly. Checks config, consent, API key validity, and recent session activity. Presents a clear pass/fail report.\n\n## Prerequisites\n\n- Promptbook must have been set up via `/setup` first\n- Node.js installed (used for config parsing)\n- Internet access (for API key verification)\n\n## Instructions\n\nRun these checks in order via Bash and report each result.\n\n### 1. Config file exists\n\n```bash\nif [ -f \"$HOME/.promptbook/config.json\" ]; then\n  echo \"CONFIG_FOUND\"\n  # Check permissions — should be 600 for security\n  st",
  "cost": {
    "context_tokens": 793
  }
}

Fetch it by URL: GET /api/v1/registry/jeremylongshore-tons-of-skills-marketplace-doctor/manifest?version=1.0.0

Reviews

Star ratings from people who tried it. One review per account; edit yours any time.

No reviews yet. Install it, try it, and be the first to rate it.