Skip to content
dsh.fish
Bundle

dsh-skill-cockpit

DSH web plugin: Skill Cockpit panel in Settings. See all skills (system/project/pool) with Chinese notes, search, enable/disable/delete/import, local test-fire scoring, and per-skill usage stats to spot zombie skills.

Source
Itailang2333
License
MIT
Updated
Updated 19 days ago

Readme

# dsh-skill-cockpit (Skill Cockpit)

English | [中文](README.zh.md)

A DeepSeek Harness (DSH) web plugin: see, manage, and test-fire all your skills (Agent Skills / SKILL.md) in one **Settings → Skill Cockpit** panel.

What it adds over existing skill managers: **Chinese notes** (English skill names hard to remember? write your own one-line note, searchable), **usage stats** (which installed skills never fire?), and a **test-fire bench** (which skill would this sentence trigger? check overlaps before writing a new one).

## Features

- **Full view**: system-level (`~/.dsh/skills`), project-level (`<project>/.dsh/skills`, `.agents/skills`, read-only), and pool (`~/.dsh/skill-pool`) sections; bundle/flat shape and scope tags.
- **Search**: filters by name / description / your note.
- **Notes**: one-line note per skill (local JSON) — solves "installed it, forgot what it does".
- **Enable / disable / delete / import**: pool ↔ enabled moves; delete limited to user-level dirs with confirmation (path-escape guards + audit log); import handles single dir / batch folder / dry-run conflict preview with kebab-case normalization (strips `-main`/`-master` GitHub suffixes).
- **Usage stats**: host-side listener on skill tool invocations records count + last-used per skill; the panel shows "used N times / never recorded" to spot zombie skills.
- **Test-fire bench**: type the sentence you expect to trigger a skill; local lexical scoring (name weight 3, description/note weight 2; English words + Chinese 2-grams) returns top-5 with hit tokens. **Local approximation, not a real model run** — for overlap checks and trigger-word self-review.

## Install

```
dsh plugin --profile web add <repo path or git+https URL>
```

Follow the `dsh` prompts for `pnpm-workspace.yaml` allowBuilds, restart DSH, hard-refresh the browser (Ctrl+Shift+R), then open **Settings → Skill Cockpit**.

## Data files (all local, zero network)

| File | Content |
|---|---|
| `~/.dsh/skill-cockpit.notes.json` | notes |
| `~/.dsh/skill-cockpit.stats.json` | usage stats |
| `~/.dsh/skill-cockpit.log` | JSONL audit log |

## HTTP API (host, loopback same-origin)

| Method | Path | Description |
|---|---|---|
| GET | `/api/skill-cockpit/state?cwd=` | full snapshot |
| POST | `/api/skill-cockpit/enable` `{name}` | pool → enabled |
| POST | `/api/skill-cockpit/disable` `{name}` | enabled → pool |
| POST | `/api/skill-cockpit/delete` `{name, scope}` | delete (user-level only) |
| POST | `/api/skill-cockpit/note` `{name, note}` | set/clear note |
| POST | `/api/skill-cockpit/test-fire` `{query}` | local top-5 scoring |
| POST | `/api/skill-cockpit/import` `{source, target, conflict, dryRun}` | import |
| GET | `/api/skill-cockpit/list-dir?path=` | directory browsing |

## Config (optional)

Top-level key in `$DSH_HOME/settings.yaml` (surface projects that never opened a session):

```yaml
skill-cockpit:
  projectRoots:
    - /path/to/project1
```

## Tests

```
node test/core-test.mjs   # 28 checks: scan / enable / delete guards / import / notes / stats / scoring / project-root
```

## Compatibility

- Profile: `web` (DSH Web GUI). Developed and unit-tested on Windows (PowerShell 5.1 + Node 20+); zero third-party deps in host/client.
- Coexists with dsh-skill-manager-ytxue etc. (independent id/routes/data files).

## License

MIT

Install

dsh plugin --profile web add github:Itailang2333/dsh-skill-cockpit

Profile: web

  • This source has no pinned commit, so a later push upstream changes what installs. Prefer pinning a commit.
Source