prompt-skill-armory 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Prompt-SkillArmory contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,112 @@
1
+ # Prompt-SkillArmory
2
+
3
+ CCswitch-style **prompt + skill manager** for the DeepSeek Harness web UI:
4
+ globally injected prompts, skill install (manual / `.md` / directory / zip via
5
+ CLI), agent-preset browsing — all in one panel with enable/disable switches.
6
+
7
+ ```
8
+ ✦ Prompt-SkillArmory [v0.4.0]
9
+ ┌────────────┬─────────────────┬──────────────┐
10
+ │ 提示词 │ 技能 │ Agent预设 │
11
+ │ (全局生效) │ (合并管理) │ (roster) │
12
+ └────────────┴─────────────────┴──────────────┘
13
+ ```
14
+
15
+ ---
16
+
17
+ ## One-command install
18
+
19
+ ```bash
20
+ npx prompt-skill-armory
21
+ ```
22
+
23
+ The installer:
24
+ 1. locates the harness home (`~/.dsh` or `$DSH_HOME`),
25
+ 2. copies the two plugin packages into
26
+ `~/.dsh/profiles/web/node_modules/@deepseek-ai/`,
27
+ 3. adds the Host bundle to the web profile's `dsh.profile.bundles`,
28
+ 4. prints next steps.
29
+
30
+ Then, in your DeepSeek Harness checkout:
31
+
32
+ ```bash
33
+ cd deepseek-harness
34
+ pnpm run build
35
+ pnpm dsh web
36
+ ```
37
+
38
+ Open **Settings** → **Prompt-SkillArmory** (book icon).
39
+
40
+ > **Requirement**: a working DeepSeek Harness runtime (`dsh web`). The plugin
41
+ > plugs into DSH; it does not bundle the runtime.
42
+
43
+ ---
44
+
45
+ ## Features
46
+
47
+ - **Prompts (global)** — add / edit / enable / disable / set default / delete.
48
+ Enabled prompts are injected into every agent's system prompt via
49
+ `ctx.systemPrompt.section`.
50
+ - **Skills** — one merged list: panel-installed (edit / toggle / uninstall)
51
+ and locally scanned (adopt). Per-card invoke hint: `/skill-name`.
52
+ - **Skill install paths**
53
+ - Manual entry (name / description / content)
54
+ - `.md` file picker (browser)
55
+ - CLI in a session:
56
+ - `/armory-skill-dir <dir>` — directory skill (SKILL.md + references)
57
+ - `/armory-install-zip <zip>` — zip bundle
58
+ - **Agent presets** — browse the roster, set default.
59
+ - Bilingual (简体中文 / English).
60
+ - Book icon in the settings sidebar.
61
+
62
+ > Legacy `/sw-*` command aliases still work.
63
+
64
+ ## Using a skill in chat
65
+
66
+ Type `/` then the skill name in the chat input, e.g.:
67
+
68
+ ```
69
+ /code-review
70
+ /mission-keeper
71
+ ```
72
+
73
+ The skill body is injected and the agent follows it. Skills are also visible
74
+ to the model when `modelInvocable`.
75
+
76
+ ---
77
+
78
+ ## Repository layout
79
+
80
+ ```
81
+ prompt-skill-armory/
82
+ ├── package.json # npm installer package (bin: armory)
83
+ ├── cli.mjs # one-command install CLI
84
+ ├── packages/ # shipped plugin builds (lib + src + manifests)
85
+ │ ├── switchblade/ @deepseek-ai/dsh-switchblade (Host)
86
+ │ └── client-ui-switchblade/ @deepseek-ai/dsh-client-ui-switchblade (Web panel)
87
+ ├── plugin-src/ # plugin source mirrors (dev reference)
88
+ ├── scripts/ # dev helpers (link, build)
89
+ ├── demo/demo.html # standalone UI preview (mock data)
90
+ ├── CHANGELOG.md # version history
91
+ └── PUBLISHING.md # npm publish walkthrough
92
+ ```
93
+
94
+ ## Development
95
+
96
+ ```bash
97
+ # after editing plugin-src, rebuild the shipped packages
98
+ node scripts/build-shipped.mjs
99
+ ```
100
+
101
+ Version bumps touch **three places** together:
102
+ 1. `packages/*/package.json` `version`
103
+ 2. panel `ARMORY_VERSION` in `plugin-src/client/src/client/SwitchbladeSection.tsx`
104
+ 3. `CHANGELOG.md`
105
+
106
+ ## Version history
107
+
108
+ See `CHANGELOG.md`. Current: **0.4.0**.
109
+
110
+ ## License
111
+
112
+ MIT
package/cli.cjs ADDED
@@ -0,0 +1,110 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * prompt-skill-armory — one-command installer.
4
+ *
5
+ * npx prompt-skill-armory # install into the DeepSeek Harness web profile
6
+ * npx prompt-skill-armory --postinstall
7
+ *
8
+ * What it does:
9
+ * 1. Locates the harness home (~/.dsh, or $DSH_HOME).
10
+ * 2. Ensures the web profile exists.
11
+ * 3. Copies the bundled plugin packages
12
+ * (@deepseek-ai/dsh-switchblade + @deepseek-ai/dsh-client-ui-switchblade)
13
+ * into the profile's node_modules/@deepseek-ai/.
14
+ * 4. Adds the Host bundle to the profile's dsh.profile.bundles.
15
+ * 5. Prints next steps (build + launch).
16
+ *
17
+ * The plugin packages ship inside this installer under packages/ (built lib +
18
+ * source + manifests), so no separate DSH repo checkout is needed to install
19
+ * the plugin itself — the DSH runtime is still required to RUN it.
20
+ */
21
+ 'use strict'
22
+
23
+ const { cpSync, existsSync, mkdirSync, readFileSync, writeFileSync } = require('node:fs')
24
+ const { homedir } = require('node:os')
25
+ const { join } = require('node:path')
26
+
27
+ const here = __dirname
28
+ const BUNDLED = join(here, 'packages')
29
+
30
+ /** Harness home; default ~/.dsh, overridable via DSH_HOME. */
31
+ const dshHome = process.env.DSH_HOME ?? join(homedir(), '.dsh')
32
+ const profilesDir = join(dshHome, 'profiles')
33
+ const webProfile = join(profilesDir, 'web')
34
+ const scopedDir = join(webProfile, 'node_modules', '@deepseek-ai')
35
+ const manifestPath = join(webProfile, 'package.json')
36
+
37
+ const HOST_BUNDLE = '@deepseek-ai/dsh-switchblade'
38
+
39
+ /** The two plugin packages this installer ships. */
40
+ function bundledPackages() {
41
+ const out = []
42
+ if (existsSync(join(BUNDLED, 'switchblade', 'package.json'))) {
43
+ out.push({ from: join(BUNDLED, 'switchblade'), name: '@deepseek-ai/dsh-switchblade' })
44
+ }
45
+ if (existsSync(join(BUNDLED, 'client-ui-switchblade', 'package.json'))) {
46
+ out.push({ from: join(BUNDLED, 'client-ui-switchblade'), name: '@deepseek-ai/dsh-client-ui-switchblade' })
47
+ }
48
+ return out
49
+ }
50
+
51
+ /** Copy one bundled package into the profile's @deepseek-ai scope. */
52
+ function installPackage(pkg) {
53
+ const short = pkg.name.slice('@deepseek-ai/'.length)
54
+ const dest = join(scopedDir, short)
55
+ mkdirSync(scopedDir, { recursive: true })
56
+ cpSync(pkg.from, dest, { recursive: true, force: true })
57
+ console.log(` ✓ ${pkg.name} → ${dest}`)
58
+ }
59
+
60
+ /** Add the Host bundle to the web profile's dsh.profile.bundles. */
61
+ function addBundle() {
62
+ if (!existsSync(manifestPath)) {
63
+ writeFileSync(manifestPath, JSON.stringify({
64
+ name: 'dsh-profile-web',
65
+ private: true,
66
+ dependencies: {},
67
+ dsh: { profile: { bundles: ['@deepseek-ai/dsh-base', '@deepseek-ai/dsh-web-app'] } },
68
+ }, null, 2))
69
+ }
70
+ const manifest = JSON.parse(readFileSync(manifestPath, 'utf8'))
71
+ const bundles = manifest.dsh?.profile?.bundles ?? []
72
+ if (!bundles.includes(HOST_BUNDLE)) {
73
+ bundles.push(HOST_BUNDLE)
74
+ manifest.dsh = { ...(manifest.dsh ?? {}), profile: { ...(manifest.dsh?.profile ?? {}), bundles } }
75
+ writeFileSync(manifestPath, `${JSON.stringify(manifest, null, 2)}\n`)
76
+ console.log(` ✓ added ${HOST_BUNDLE} to ${manifestPath}`)
77
+ } else {
78
+ console.log(` · ${HOST_BUNDLE} already in bundles`)
79
+ }
80
+ }
81
+
82
+ function main() {
83
+ console.log('Prompt-SkillArmory installer')
84
+ console.log(` harness home: ${dshHome}`)
85
+ if (process.argv.includes('--postinstall')) {
86
+ console.log(' (postinstall hook — no profile install here)')
87
+ return
88
+ }
89
+
90
+ const pkgs = bundledPackages()
91
+ if (pkgs.length === 0) {
92
+ console.error(' ✖ no bundled plugin packages found (installer built incorrectly)')
93
+ process.exit(1)
94
+ }
95
+
96
+ mkdirSync(webProfile, { recursive: true })
97
+ console.log(` profile: ${webProfile}`)
98
+ for (const pkg of pkgs) installPackage(pkg)
99
+ addBundle()
100
+
101
+ console.log('')
102
+ console.log(' Next steps (run in your DeepSeek Harness checkout):')
103
+ console.log(' cd deepseek-harness')
104
+ console.log(' pnpm run build')
105
+ console.log(' pnpm dsh web')
106
+ console.log('')
107
+ console.log(' Open Settings → Prompt-SkillArmory (book icon).')
108
+ }
109
+
110
+ main()
package/package.json ADDED
@@ -0,0 +1,27 @@
1
+ {
2
+ "name": "prompt-skill-armory",
3
+ "version": "0.4.1",
4
+ "description": "One-command installer for Prompt-SkillArmory (prompts + skills manager) into a DeepSeek Harness web profile",
5
+ "type": "module",
6
+ "bin": {
7
+ "armory": "./cli.cjs"
8
+ },
9
+ "files": [
10
+ "cli.cjs",
11
+ "packages/"
12
+ ],
13
+ "license": "MIT",
14
+ "scripts": {
15
+ "postinstall": "node ./cli.cjs --postinstall",
16
+ "build:shipped": "node scripts/build-shipped.mjs",
17
+ "prepublishOnly": "node scripts/build-shipped.mjs"
18
+ },
19
+ "keywords": [
20
+ "deepseek",
21
+ "harness",
22
+ "dsh",
23
+ "prompt",
24
+ "skill",
25
+ "ccswitch"
26
+ ]
27
+ }