[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-1169":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":14,"stars7d":14,"stars30d":15,"stars90d":14,"forks30d":14,"starsTrendScore":14,"compositeScore":16,"rankGlobal":9,"rankLanguage":9,"license":17,"archived":18,"fork":18,"defaultBranch":19,"hasWiki":20,"hasPages":18,"topics":21,"createdAt":9,"pushedAt":9,"updatedAt":22,"readmeContent":23,"aiSummary":24,"trendingCount":14,"starSnapshotCount":14,"syncStatus":12,"lastSyncTime":25,"discoverSource":26},1169,"skill-doctor","xigua-wang\u002Fskill-doctor","xigua-wang","Local-first inspector for coding-agent skills, conflicts, precedence, and risk   analysis.",null,"TypeScript",327,2,317,0,5,1.43,"MIT License",false,"main",true,[],"2026-06-12 02:00:24","\u003Cdiv align=\"center\">\n\n# Skill Doctor\n\n**Audit coding-agent skills like infrastructure, not hidden prompt glue.**\n\n[中文文档](.\u002FREADME.zh-CN.md)\n\n\u003Cp>\n  \u003Cimg alt=\"npm\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fnpm-package-161b22?style=for-the-badge&logo=npm&logoColor=white\">\n  \u003Cimg alt=\"react\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Freact-ui-161b22?style=for-the-badge&logo=react&logoColor=61dafb\">\n  \u003Cimg alt=\"typescript\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Ftypescript-core-161b22?style=for-the-badge&logo=typescript&logoColor=3178c6\">\n  \u003Cimg alt=\"local first\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flocal--first-workflow-161b22?style=for-the-badge\">\n  \u003Cimg alt=\"bilingual\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fi18n-en%20%7C%20zh--CN-161b22?style=for-the-badge\">\n\u003C\u002Fp>\n\n\u003Cp>\n  Skill Doctor is a local-first inspector for coding-agent skills. It shows what is installed,\n  which definition wins, where risk accumulates, and how a workspace behaves across project,\n  global, and system scopes.\n\u003C\u002Fp>\n\n\u003C\u002Fdiv>\n\n> Find the skill that actually wins, the trigger that overlaps, and the risky instruction that should not stay hidden.\n\n## Navigate\n\n- [Why People Install It](#why-people-install-it)\n- [Quick Proof](#quick-proof)\n- [Highlights](#highlights)\n- [Installation](#installation)\n- [Quick Start](#quick-start)\n- [CLI](#cli)\n- [What It Detects](#what-it-detects)\n- [Model Analysis](#model-analysis)\n- [Architecture](#architecture)\n- [Development](#development)\n\n## Why People Install It\n\nSkill Doctor is for the moment when your local agent setup stops being obvious.\n\n- \"Why did Codex or OpenClaw trigger this skill instead of the other one?\"\n- \"Which project skill overrides the global one I thought was active?\"\n- \"Which skills contain shell, secret, subprocess, network, or destructive patterns?\"\n- \"What changed between yesterday's scan and today's workspace state?\"\n\nIt gives you a local inspector for precedence, conflicts, risky patterns, and scan history before those problems turn into invisible prompt behavior.\n\n## Quick Proof\n\nRun the UI for the current project:\n\n```bash\nnpx --package @xiguawang\u002Fskill-doctor skill-doctor\n```\n\nThen click `Run new scan`.\n\nWithout any model configuration, you can already inspect:\n\n- discovered skill roots\n- precedence winners and competing definitions\n- duplicate names and trigger overlap\n- local static risk signals\n- stored scan snapshots and history\n\nIf you later configure a model provider, Skill Doctor adds summarized findings and recommendations on top of the same local scan.\n\n## Highlights\n\n| Inspect | Explain | Operate |\n| --- | --- | --- |\n| Scans OpenClaw, Codex, Claude, Cursor, Copilot, GitHub, and generic skill roots | Shows precedence chains, overrides, duplicate names, and trigger overlap | Stores snapshots and config globally in `~\u002F.skill-doctor\u002F` |\n| Flags shell, network, subprocess, secret, and destructive patterns | Adds model-assisted findings on top of local static analysis | Provides a local React UI with history, filtering, deletion, and bilingual support |\n\n## At A Glance\n\n```text\nscan local skill roots\n        ->\nderive precedence, conflicts, and risk signals\n        ->\nbuild a structured model-analysis payload\n        ->\nstore immutable snapshots globally\n        ->\ninspect everything in a local React UI\n```\n\n## Why Skill Doctor\n\nAs local and project-level agent skills grow, it becomes difficult to answer simple operational questions:\n\n- Which skill is actually active?\n- Why did one skill override another?\n- Which trigger phrase is ambiguous?\n- Which skill definitions deserve closer review?\n\nSkill Doctor treats skills as inspectable infrastructure instead of hidden behavior.\n\n## Installation\n\n### One-line app launch\n\n```bash\nnpx --package @xiguawang\u002Fskill-doctor skill-doctor\n```\n\n### Use as an npm package\n\n```bash\nnpm install -g @xiguawang\u002Fskill-doctor\nskill-doctor\n```\n\nOr run it without a global install:\n\n```bash\nnpx --package @xiguawang\u002Fskill-doctor skill-doctor\n```\n\nBy default, `skill-doctor`:\n\n- uses the current working directory as the default project context\n- binds the local server to `127.0.0.1`\n- starts the local UI on `http:\u002F\u002Flocalhost:4173`\n- attempts to open the browser\n- does not run a scan until you trigger one in the UI or pass `--scan`\n\n### Run from this repository\n\n```bash\nnpm install\nnpm run build\nnpm run serve\n```\n\n## Quick Start\n\n### Start the local UI\n\n```bash\nskill-doctor\n```\n\n### Start the UI and run an initial scan\n\n```bash\nskill-doctor --scan\n```\n\n### Scan a project from the CLI only\n\n```bash\nskill-doctor-scan --project \u002Fpath\u002Fto\u002Fproject\n```\n\n### Generate a Markdown report\n\n```bash\nskill-doctor-scan --project \u002Fpath\u002Fto\u002Fproject --markdown .\u002Fskill-report.md\n```\n\n## Product Surface\n\n| Surface | Purpose |\n| --- | --- |\n| `skill-doctor` | Starts the local UI for the current project context |\n| `skill-doctor --scan` | Starts the UI and performs an initial scan |\n| `skill-doctor-scan` | Runs scans without starting the UI |\n| React dashboard | History, settings, roots, analysis, and skill inspection |\n| Global storage | Config and immutable snapshots outside the target project |\n\n## CLI\n\n### `skill-doctor`\n\nStarts the local web application.\n\n```bash\nskill-doctor [--project \u003Cpath>] [--port \u003Cnumber>] [--app-home \u003Cpath>] [--no-open] [--scan]\n```\n\nCommon examples:\n\n```bash\nskill-doctor\nskill-doctor --scan\nskill-doctor --project \u002Fpath\u002Fto\u002Fproject\nskill-doctor --no-open\nskill-doctor --host 0.0.0.0\n```\n\n### `skill-doctor-scan`\n\nRuns a scan without starting the UI.\n\n```bash\nskill-doctor-scan [--project \u003Cpath>] [--output \u003Cfile>] [--markdown \u003Cfile>] [--analysis-language \u003Cen|zh-CN>] [--app-home \u003Cpath>]\n```\n\nCommon examples:\n\n```bash\nskill-doctor-scan --project .\nskill-doctor-scan --project . --output .\u002Fscan.json\nskill-doctor-scan --project . --markdown .\u002Freport.md\nskill-doctor-scan --project . --analysis-language zh-CN\n```\n\n## What It Detects\n\n- Installed skills across project, global, and system scopes\n- Standard OpenClaw roots including `\u003Cworkspace>\u002Fskills`, `\u003Cworkspace>\u002F.agents\u002Fskills`, `~\u002F.agents\u002Fskills`, and `~\u002F.openclaw\u002Fskills`\n- OpenClaw `skills.load.extraDirs` imported automatically from `~\u002F.openclaw\u002Fopenclaw.json` when present\n- Root discovery confidence and discovery method\n- Precedence chains and likely winners\n- Duplicate normalized skill names\n- Trigger overlaps and ambiguous activations\n- Static local risk patterns in skill files\n- Missing or weak metadata such as absent trigger phrases\n\nFor OpenClaw, Skill Doctor now discovers the standard roots above and also imports `skills.load.extraDirs` from `~\u002F.openclaw\u002Fopenclaw.json` when that file is present. Manual `extraRoots` still work as an override for custom or non-standard layouts. Bundled OpenClaw install-time skills are not modeled yet.\n\n## Screenshots\n\nThe repository currently describes the key views below, but still needs committed screenshot or GIF assets. That is the next documentation upgrade for conversion.\n\n### Overview\n\nThe main dashboard is built around a single reading path: current workspace context, top-level metrics, history access, settings, and scan entry points. The hero panel keeps the product value obvious, while the right-hand summary block surfaces the current dataset and key counts without forcing the user into drawers first.\n\n### Analysis And Roots\n\nThe analysis view focuses on two things side by side: model-generated findings on the left and concrete scanned roots on the right. This keeps conclusions and evidence in the same viewport, which is especially useful when reviewing multi-agent workspaces with mixed confidence levels across project and global roots.\n\n## Model Analysis\n\nSkill Doctor can enrich each scan with model analysis through an OpenAI-compatible `chat\u002Fcompletions` endpoint.\n\nThe flow is:\n\n1. Skill Doctor performs a local static scan.\n2. It builds a structured compact payload from the scan.\n3. If model configuration is present, it sends that payload to the configured model endpoint.\n4. It stores the model summary, findings, recommendations, and spotlights in the snapshot.\n\nImportant details:\n\n- Configure `apiKey`, `baseUrl`, and `model` in the UI when you want model-assisted review\n- The UI does not read back the full stored API key; it only shows configured state and a masked hint\n- The local scanner ranks skills before sending them to the model\n- UI-triggered scans request model output in the current UI language\n- CLI scans default to English and support `--analysis-language zh-CN`\n- If model config is missing or the provider fails, the local scan still completes and records the analysis state\n\n## Storage\n\nSkill Doctor keeps its state outside the inspected project by default:\n\n```bash\n~\u002F.skill-doctor\u002F\n```\n\nThis includes:\n\n- `config.json`\n- scan snapshots\n- local history used by the UI\n\n## Architecture\n\nSkill Doctor is a local-first application with four runtime layers:\n\n```text\nCurrent project\n    |\n    v\nRoot discovery + local static scanner\n    |\n    +--> precedence \u002F conflicts \u002F risk signals \u002F local priority\n    |\n    v\nStructured analysis payload\n    |\n    +--> OpenAI-compatible model analysis\n    |\n    v\nGlobal storage (~\u002F.skill-doctor\u002F)\n    |\n    +--> config.json\n    +--> scan snapshots\n    +--> history metadata\n    |\n    v\nLocal Node API\n    |\n    v\nReact UI\n```\n\n### Runtime Layers\n\n- `src-core\u002Fscanner\u002F`: discovers roots, parses skills, computes precedence, conflicts, issues, and local risk signals\n- `src-core\u002Fanalysis\u002F`: builds the structured compact payload, calls the configured model endpoint, and normalizes analysis output\n- `src-core\u002Fstorage\u002F`: manages global config and immutable scan snapshots under `~\u002F.skill-doctor\u002F`\n- `scripts\u002Fdev-server.ts`: serves the built frontend and exposes local APIs for config, scans, history, and directory browsing\n- `src\u002F`: renders the React UI for history, settings, scan creation, analysis, and skill inspection\n\n### Data Flow\n\n1. The user opens the local UI with the current directory as the default project context.\n2. A scan request triggers root discovery and local static analysis.\n3. The scanner builds a typed snapshot and a structured payload for the model.\n4. Model analysis returns summary, findings, recommendations, and skill spotlights.\n5. The final snapshot is stored in `~\u002F.skill-doctor\u002F` and immediately becomes available in the history-backed UI.\n\n## UI Features\n\n- English and Simplified Chinese interface\n- Top-bar language switcher\n- History drawer with filtering, deletion, and broken-record handling\n- Settings drawer for global model config and extra scan roots\n- Project path input and home-directory-based folder picker\n- Recent project paths from local history\n- Skill detail view with local priority breakdown\n\n## Supported Roots\n\nBuilt-in discovery currently covers common project and global roots for:\n\n- OpenClaw\n- Codex\n- Claude\n- Cursor\n- Copilot\n- GitHub\n\nYou can also define extra absolute scan roots in settings when your environment uses custom paths.\n\n## OpenClaw Support\n\nSkill Doctor supports lightweight OpenClaw integration out of the box.\n\nCovered OpenClaw roots:\n\n- `\u003Cworkspace>\u002Fskills`\n- `\u003Cworkspace>\u002F.agents\u002Fskills`\n- `~\u002F.agents\u002Fskills`\n- `~\u002F.openclaw\u002Fskills`\n- `skills.load.extraDirs` imported automatically from `~\u002F.openclaw\u002Fopenclaw.json`\n\nCurrent OpenClaw coverage:\n\n- scans OpenClaw workspace, project-agent, personal-agent, managed, and config-driven extra skill roots\n- models the common precedence chain across those roots\n- shows conflicts, override chains, risks, and skill details in the same UI as other agent ecosystems\n- does not yet model bundled OpenClaw install-time skills\n\nFastest way to use it from an OpenClaw workspace:\n\n```bash\nnpx skill-doctor --scan\n```\n\nOr scan only and keep the output local:\n\n```bash\nnpx skill-doctor-scan --project . --output .\u002Fskill-doctor-openclaw-scan.json\n```\n\n## OpenClaw Onboarding Prompt\n\nCopy this prompt into OpenClaw when you want a lightweight Skill Doctor integration in the current workspace:\n\n```text\nIntegrate Skill Doctor into the current OpenClaw workspace with the lightest possible setup.\n\nRequirements:\n1. Treat the current directory as the target workspace.\n2. Do not modify existing OpenClaw skills unless absolutely necessary.\n3. Use Skill Doctor as an external inspector, not as a replacement for the current skill layout.\n4. Prefer one-command usage first: `npx skill-doctor --scan`.\n5. If a scan-only artifact is more appropriate, run `npx skill-doctor-scan --project . --output .\u002Fskill-doctor-openclaw-scan.json`.\n6. Preserve any existing OpenClaw `skills.load.extraDirs` behavior.\n7. After setup, summarize:\n   - which OpenClaw roots were detected\n   - which skill copy wins in each precedence chain\n   - any high-risk skills or trigger conflicts\n   - the exact command to rerun the inspection later\n\nConstraints:\n- Keep the integration local-first.\n- Do not add unnecessary dependencies.\n- Do not rewrite the repository structure.\n- If configuration is missing for model analysis, still complete the local scan and report that model analysis was skipped or failed.\n```\n\n## Demo Workspace\n\nThis repository includes a demo workspace for validation:\n\n```bash\nexamples\u002Fdemo-workspace\u002F\n```\n\nIt is useful for testing:\n\n- override behavior\n- trigger overlap detection\n- high-risk and medium-risk local patterns\n- missing metadata issues\n- local-priority ranking before model analysis\n- OpenClaw precedence across workspace, project agent, personal agent, managed local, and config-driven extra roots\n\nRun it with:\n\n```bash\nnpm run scan:demo\n```\n\nRun the OpenClaw-specific fixture with:\n\n```bash\nnpm run scan:demo:openclaw\n```\n\n## Development\n\nInstall dependencies:\n\n```bash\nnpm install\n```\n\nType-check:\n\n```bash\nnpm run typecheck\n```\n\nBuild the frontend:\n\n```bash\nnpm run build\n```\n\nRun the local app from the repository:\n\n```bash\nnpm run serve\n```\n\nBuild package artifacts:\n\n```bash\nnpm run build:package\n```\n\n## Project Structure\n\n```text\nsrc\u002F          React frontend\nsrc-core\u002F     scanner, analysis, storage, validation\nscripts\u002F      CLI and local server entry points\npublic\u002F       demo data and static assets\ndocs\u002F         plans, reports, and product notes\nexamples\u002F     demo workspace for validation\n```\n\n## Roadmap\n\n- Per-agent precedence rules instead of a single generic precedence model\n- Better diffing across projects or machines\n- Stronger repair suggestions and fix generation\n- More portable packaging and installation workflows\n\n## License\n\nNo license file is included in this repository snapshot yet.\n","Skill Doctor 是一个本地优先的编码代理技能检查工具，用于审计技能、冲突、优先级以及风险分析。其核心功能包括检测安装的技能、确定哪个定义生效、识别风险积累点，并展示工作区在项目、全局和系统范围内的行为。采用TypeScript编写，支持React UI界面与本地静态分析，能够发现shell、网络、子进程、秘密信息及破坏性模式等风险信号。适用于需要清晰了解本地代理设置、解决技能冲突或优先级问题、以及进行风险评估的开发场景。","2026-06-11 02:42:03","CREATED_QUERY"]