From ai-permission-hook
This skill should be used when the user asks to "diagnose permission hook", "check permission hook status", "permission hook not working", "debug permission hook", "run permission hook doctor", or when troubleshooting LLM permission evaluation issues.
How this skill is triggered — by the user, by Claude, or both
Slash command
/ai-permission-hook:doctorThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Run a comprehensive health check on the ai-permission-hook installation. Report issues and suggest fixes.
Run a comprehensive health check on the ai-permission-hook installation. Report issues and suggest fixes.
Run all checks and present results as a checklist.
Read ~/.claude/permission-hook/config.json. Check:
llm.provider fieldllm.apiKey field (non-empty)llm.model fieldllm.baseUrl fieldRead ~/.claude/settings.json. Check:
hooks.PermissionRequest array exists"command" containing permission-hook/run.sh"*" (covers all tools)Check ~/.claude/permission-hook/run.sh:
permission-handler.jspermission-handler.js file actually exists at that pathIf the path in run.sh points to a non-existent file (stale after plugin update), report this clearly and suggest re-running /ai-permission-hook:setup to update the path.
Make a minimal test call to the configured LLM endpoint. Read the config to get the base URL, API key, and model, then send a lightweight chat completion request:
node -e "
const fs = require('fs');
const https = require('https');
const http = require('http');
const cfg = JSON.parse(fs.readFileSync(require('os').homedir() + '/.claude/permission-hook/config.json', 'utf8'));
const url = new URL((cfg.llm.baseUrl || 'https://openrouter.ai/api/v1').replace(/\/+$/, '') + '/chat/completions');
const mod = url.protocol === 'https:' ? https : http;
const body = JSON.stringify({ model: cfg.llm.model, messages: [{ role: 'user', content: 'Reply OK' }], max_tokens: 5 });
const req = mod.request({ hostname: url.hostname, port: url.port || 443, path: url.pathname, method: 'POST', headers: { 'Authorization': 'Bearer ' + cfg.llm.apiKey, 'Content-Type': 'application/json' }, timeout: 10000 }, (res) => {
let data = ''; res.on('data', c => data += c);
res.on('end', () => console.log(res.statusCode >= 200 && res.statusCode < 300 ? 'OK: API connectivity verified' : 'ERROR: HTTP ' + res.statusCode + ' - ' + data.slice(0, 100)));
});
req.on('error', e => console.log('ERROR: ' + e.message));
req.on('timeout', () => { req.destroy(); console.log('ERROR: Request timed out'); });
req.write(body); req.end();
"
Report: success, HTTP error, network error, or auth error.
Read ~/.claude/permission-hook/cache/approval_cache.json:
Check ~/.claude/permission-hook/logs/decisions.jsonl:
Check ~/.claude/permission-hook/local.md:
Check if ~/.claude-code-fast-permission-hook/ still exists:
/ai-permission-hook:setup to migrate and then uninstalling: npm uninstall -g @abdo-el-mobayad/claude-code-fast-permission-hookPresent results as a checklist:
Configuration:
Provider: openrouter
Model: gpt-4o-mini
API Key: (set)
Base URL: https://openrouter.ai/api/v1
Hook Registration: (registered in settings.json, matcher: *)
Wrapper Script: (valid, points to existing handler)
API Connectivity: (success)
Cache: 142 entries, oldest 312 hours ago
Logs: 1,847 entries, 245 KB, last entry 2 hours ago
Local Override: (configured, 15 lines)
Legacy cf-approve: not found
Flag any issues with clear fix suggestions.
Provides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
npx claudepluginhub thenemal/thenemal-cc-marketplace --plugin ai-permission-hook