ccski 2.3.2 → 2.5.0
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/README.md +57 -9
- package/dist/cli.mjs +89 -5
- package/dist/cli.mjs.map +1 -1
- package/dist/{esm-CWBkGBbQ.mjs → esm-C5JN5Xg3.mjs} +2 -2
- package/dist/{esm-CWBkGBbQ.mjs.map → esm-C5JN5Xg3.mjs.map} +1 -1
- package/dist/index.d.mts +93 -26
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/{server-DwuqhC__.mjs → workflow-install-KvZzb83I.mjs} +455 -312
- package/dist/workflow-install-KvZzb83I.mjs.map +1 -0
- package/package.json +1 -1
- package/dist/server-DwuqhC__.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -8,6 +8,7 @@ Documentation site: https://jixoai-labs.github.io/ccski/
|
|
|
8
8
|
|
|
9
9
|
- [Install](#install)
|
|
10
10
|
- [Quick start](#quick-start)
|
|
11
|
+
- [Connect ccski to your agent prompt](#connect-ccski-to-your-agent-prompt)
|
|
11
12
|
- [Run MCP server](#run-mcp-server)
|
|
12
13
|
- [Core CLI commands](#core-cli-commands)
|
|
13
14
|
- [Install examples](#install-examples)
|
|
@@ -32,6 +33,52 @@ ccski --help
|
|
|
32
33
|
|
|
33
34
|
## Quick start
|
|
34
35
|
|
|
36
|
+
### Connect ccski to your agent prompt
|
|
37
|
+
|
|
38
|
+
ccski works best when your agent is told how to discover local skills at the
|
|
39
|
+
start of a new context. The installer writes a managed English workflow block
|
|
40
|
+
into common agent instruction files:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
npx -y ccski install
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
By default this installs at user scope for known agents:
|
|
47
|
+
|
|
48
|
+
- Codex: `~/.codex/AGENTS.md`
|
|
49
|
+
- Claude Code: `~/.claude/CLAUDE.md`
|
|
50
|
+
- Gemini CLI: `~/.gemini/GEMINI.md`
|
|
51
|
+
- OpenCode: `~/.config/opencode/AGENTS.md`
|
|
52
|
+
|
|
53
|
+
Limit the target or install only into the current project:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
# one agent, user scope
|
|
57
|
+
npx -y ccski install --agent=codex
|
|
58
|
+
|
|
59
|
+
# one project file in the current directory
|
|
60
|
+
npx -y ccski install --agent=gemini --project
|
|
61
|
+
|
|
62
|
+
# preview changes
|
|
63
|
+
npx -y ccski install --dry-run --json
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
The installer is idempotent. It replaces only the managed
|
|
67
|
+
`<workflow name="ccski">...</workflow>` block and preserves the rest of your
|
|
68
|
+
prompt file.
|
|
69
|
+
|
|
70
|
+
Manual install is also fine. Add this block to your user or project instruction
|
|
71
|
+
file, such as `~/.codex/AGENTS.md`, `~/.claude/CLAUDE.md`, or
|
|
72
|
+
`~/.gemini/GEMINI.md`:
|
|
73
|
+
|
|
74
|
+
```md
|
|
75
|
+
<workflow name="ccski">
|
|
76
|
+
When starting a new context, run `bunx ccski list --no-color` to discover extra local skills available on this machine, especially shared `agents:user` skills and agent-specific skills such as `claude:user`, `codex:user`, and `gemini:user`.
|
|
77
|
+
If the user names a skill, or a task clearly matches a skill that is not already exposed in the current session, do not assume the skill is unavailable. First run `bunx ccski list --no-color`, then run `bunx ccski info <name>` and load the `SKILL.md` path reported by the output.
|
|
78
|
+
`ccski` may emit compatibility warnings while reading local agent or plugin metadata, such as `installed_plugins.json`. These warnings do not necessarily block `list` or `info`; prefer `--no-color` for readable output and downstream parsing.
|
|
79
|
+
</workflow>
|
|
80
|
+
```
|
|
81
|
+
|
|
35
82
|
### Run MCP server
|
|
36
83
|
|
|
37
84
|
```bash
|
|
@@ -56,15 +103,16 @@ MCP plugin config example (Codex/Cursor/Windsurf/VS Code):
|
|
|
56
103
|
|
|
57
104
|
### Core CLI commands
|
|
58
105
|
|
|
59
|
-
| Command
|
|
60
|
-
|
|
|
61
|
-
| `ccski list`
|
|
62
|
-
| `ccski info <name>`
|
|
63
|
-
| `ccski install
|
|
64
|
-
| `ccski
|
|
65
|
-
| `ccski
|
|
66
|
-
| `ccski
|
|
67
|
-
| `ccski
|
|
106
|
+
| Command | Purpose |
|
|
107
|
+
| -------------------------------------------- | ----------------------------------------------------------------------- |
|
|
108
|
+
| `ccski list` | List discovered skills (project, user, plugin) |
|
|
109
|
+
| `ccski info <name>` | Show metadata and content preview |
|
|
110
|
+
| `ccski install` | Install the ccski workflow block into agent instruction files |
|
|
111
|
+
| `ccski install <source> [-i\|--all\|--path]` | Install from git/dir/marketplace/SKILL.md; interactive picker available |
|
|
112
|
+
| `ccski enable [names...] [-i\|--all]` | Enable skills (`.SKILL.md` -> `SKILL.md`) |
|
|
113
|
+
| `ccski disable [names...] [-i\|--all]` | Disable skills (`SKILL.md` -> `.SKILL.md`) |
|
|
114
|
+
| `ccski validate <path>` | Validate SKILL.md or skill directory |
|
|
115
|
+
| `ccski mcp` | Start MCP server (stdio/http/sse) |
|
|
68
116
|
|
|
69
117
|
### Install examples
|
|
70
118
|
|
package/dist/cli.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { x as __require } from "./create-prompt-CIJV_96B.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { A as colors, B as success, C as resolveSkill, D as parseFilters, E as computeDuplicateGroups, F as heading, H as warn, I as highlight, L as info, M as duplicateBadge, N as error, O as SkillRegistry, P as formatBytes, R as renderList, S as getSkillInfo, T as applyFilters, U as containsCaseInsensitive, V as tone, W as rankStrings, X as providerNamesFromSkills, Y as compareSkillProviders, at as AmbiguousSkillNameError, b as promptMultiSelect, c as ToggleCancelledError, ct as SkillNotFoundError, f as startMCPServer, g as createConsoleInstallOutput, h as MultiSkillSelectionError, i as listAgentInstructionTargets, j as dim, k as formatSkillLabel, l as toggleSkills, m as InstallCancelledError, o as validateSkill, p as listSkills, r as installCcskiWorkflow, s as MultiSelectError, u as searchSkills, v as installSkills, w as buildRegistryOptions, y as registerInstallCleanupHandlers, z as setColorEnabled } from "./workflow-install-KvZzb83I.mjs";
|
|
4
4
|
import { readFileSync, statSync } from "node:fs";
|
|
5
5
|
import { readFileSync as readFileSync$1, readdirSync as readdirSync$1, statSync as statSync$1, writeFile } from "fs";
|
|
6
6
|
import { homedir } from "node:os";
|
|
@@ -4193,6 +4193,68 @@ async function infoCommand(argv) {
|
|
|
4193
4193
|
}
|
|
4194
4194
|
}
|
|
4195
4195
|
|
|
4196
|
+
//#endregion
|
|
4197
|
+
//#region src/cli/commands/install-workflow.ts
|
|
4198
|
+
async function installWorkflowCommand(argv) {
|
|
4199
|
+
try {
|
|
4200
|
+
const scope = resolveWorkflowScope(argv);
|
|
4201
|
+
const explicitAgents = [...normalizeArray(argv.agents), ...normalizeArray(argv.agent)];
|
|
4202
|
+
const agents = explicitAgents.length > 0 ? explicitAgents : await maybePromptAgents(argv);
|
|
4203
|
+
const result = installCcskiWorkflow({
|
|
4204
|
+
...agents.length > 0 ? { agents } : {},
|
|
4205
|
+
scope,
|
|
4206
|
+
...argv.userDir !== void 0 ? { userDir: argv.userDir } : {},
|
|
4207
|
+
...argv.dryRun !== void 0 ? { dryRun: argv.dryRun } : {}
|
|
4208
|
+
});
|
|
4209
|
+
if (argv.json) console.log(JSON.stringify(result, null, 2));
|
|
4210
|
+
else printWorkflowInstallSummary(result);
|
|
4211
|
+
if (result.failed > 0) process.exitCode = 1;
|
|
4212
|
+
} catch (err) {
|
|
4213
|
+
console.error(error(`Install failed: ${err instanceof Error ? err.message : String(err)}`));
|
|
4214
|
+
process.exitCode = 1;
|
|
4215
|
+
}
|
|
4216
|
+
}
|
|
4217
|
+
function resolveWorkflowScope(argv) {
|
|
4218
|
+
if (argv.project && argv.user) throw new Error("Use only one of --project or --user.");
|
|
4219
|
+
if (argv.project) return "project";
|
|
4220
|
+
if (argv.user) return "user";
|
|
4221
|
+
return argv.scope ?? "user";
|
|
4222
|
+
}
|
|
4223
|
+
function normalizeArray(values) {
|
|
4224
|
+
if (!values) return [];
|
|
4225
|
+
return Array.isArray(values) ? values.map(String) : [String(values)];
|
|
4226
|
+
}
|
|
4227
|
+
async function maybePromptAgents(argv) {
|
|
4228
|
+
if (!argv.interactive) return [];
|
|
4229
|
+
if (!process.stdin.isTTY || !process.stdout.isTTY) throw new Error("Interactive workflow install requires a TTY. Use --agent instead.");
|
|
4230
|
+
return promptMultiSelect({
|
|
4231
|
+
message: "Select agent prompt target(s)",
|
|
4232
|
+
choices: listAgentInstructionTargets().map((target) => ({
|
|
4233
|
+
value: target.id,
|
|
4234
|
+
label: `${tone.bold(target.label)} ${dim(target.id)}`,
|
|
4235
|
+
description: `${target.userPath.join("/")} / ${target.projectPath.join("/")}`,
|
|
4236
|
+
checked: true
|
|
4237
|
+
})),
|
|
4238
|
+
defaultChecked: true,
|
|
4239
|
+
command: {
|
|
4240
|
+
base: "ccski install",
|
|
4241
|
+
label: "Command",
|
|
4242
|
+
argPrefix: "--agent"
|
|
4243
|
+
}
|
|
4244
|
+
});
|
|
4245
|
+
}
|
|
4246
|
+
function printWorkflowInstallSummary(summary) {
|
|
4247
|
+
console.log(info(`Installing ccski workflow instructions (${summary.scope} scope)\n`));
|
|
4248
|
+
for (const result of summary.results) {
|
|
4249
|
+
const status = result.status === "installed" ? tone.success("✓ installed") : result.status === "updated" ? tone.warning("↻ updated") : result.status === "unchanged" ? dim("○ unchanged") : tone.danger("✗ failed");
|
|
4250
|
+
const errorText = result.error ? ` ${tone.danger(result.error)}` : "";
|
|
4251
|
+
console.log(`${tone.bold(result.label)}: ${status} ${dim(result.path)}${errorText}`);
|
|
4252
|
+
}
|
|
4253
|
+
console.log();
|
|
4254
|
+
console.log(dim(`Known targets: ${listAgentInstructionTargets().map((target) => target.id).join(", ")}`));
|
|
4255
|
+
console.log(dim("Use --agent=<name> to limit targets, --project for the current directory, or --dry-run."));
|
|
4256
|
+
}
|
|
4257
|
+
|
|
4196
4258
|
//#endregion
|
|
4197
4259
|
//#region src/cli/commands/install.ts
|
|
4198
4260
|
async function installCommand(argv) {
|
|
@@ -4200,8 +4262,13 @@ async function installCommand(argv) {
|
|
|
4200
4262
|
if (argv.color) setColorEnabled(true);
|
|
4201
4263
|
registerInstallCleanupHandlers();
|
|
4202
4264
|
const skills = Array.isArray(argv._) ? argv._.slice(1).map(String) : [];
|
|
4265
|
+
const source = typeof argv.source === "string" ? argv.source : skills.shift();
|
|
4266
|
+
if (!source) {
|
|
4267
|
+
await installWorkflowCommand(argv);
|
|
4268
|
+
return;
|
|
4269
|
+
}
|
|
4203
4270
|
const options = {
|
|
4204
|
-
source
|
|
4271
|
+
source,
|
|
4205
4272
|
skills,
|
|
4206
4273
|
...argv.force !== void 0 ? { force: argv.force } : {},
|
|
4207
4274
|
...argv.override !== void 0 ? { override: argv.override } : {},
|
|
@@ -4756,11 +4823,28 @@ const mcpModule = {
|
|
|
4756
4823
|
handler: mcpCommand
|
|
4757
4824
|
};
|
|
4758
4825
|
const installModule = {
|
|
4759
|
-
command: "install
|
|
4760
|
-
describe: "Install
|
|
4826
|
+
command: "install [source]",
|
|
4827
|
+
describe: "Install ccski workflow instructions, or install skills from a source",
|
|
4761
4828
|
builder: (cmd) => cmd.positional("source", {
|
|
4762
4829
|
type: "string",
|
|
4763
|
-
|
|
4830
|
+
description: "Optional git/dir/marketplace/SKILL.md source. Omit to install ccski workflow instructions."
|
|
4831
|
+
}).option("agent", {
|
|
4832
|
+
alias: "A",
|
|
4833
|
+
type: "array",
|
|
4834
|
+
string: true,
|
|
4835
|
+
description: "Agent prompt target for workflow install (repeatable, default: all)"
|
|
4836
|
+
}).option("scope", {
|
|
4837
|
+
choices: ["user", "project"],
|
|
4838
|
+
default: "user",
|
|
4839
|
+
description: "Workflow install scope when no source is provided"
|
|
4840
|
+
}).option("user", {
|
|
4841
|
+
type: "boolean",
|
|
4842
|
+
default: false,
|
|
4843
|
+
description: "Install workflow instructions at user scope"
|
|
4844
|
+
}).option("project", {
|
|
4845
|
+
type: "boolean",
|
|
4846
|
+
default: false,
|
|
4847
|
+
description: "Install workflow instructions in the current project"
|
|
4764
4848
|
}).option("out-dir", {
|
|
4765
4849
|
type: "array",
|
|
4766
4850
|
string: true,
|