ccski 1.0.1 → 1.0.2
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/dist/cli.mjs +24 -17
- package/dist/cli.mjs.map +1 -1
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -22775,33 +22775,40 @@ async function startMCPServer(options = {}) {
|
|
|
22775
22775
|
});
|
|
22776
22776
|
}
|
|
22777
22777
|
function buildSkillDescription(registry) {
|
|
22778
|
-
|
|
22778
|
+
const skills = registry.getAll();
|
|
22779
|
+
const diagnostics = registry.getDiagnostics();
|
|
22780
|
+
const exampleCommands = skills.slice(0, 2).map((skill) => ` - command: "${skill.name}"`);
|
|
22781
|
+
const skillBlocks = skills.map((skill) => {
|
|
22782
|
+
const location = skill.location === "user" ? "global" : skill.location;
|
|
22783
|
+
return [
|
|
22784
|
+
"<skill>",
|
|
22785
|
+
`<name>${skill.name}</name>`,
|
|
22786
|
+
`<description>${skill.description}</description>`,
|
|
22787
|
+
`<location>${location}</location>`,
|
|
22788
|
+
"</skill>"
|
|
22789
|
+
].join("\n");
|
|
22790
|
+
}).join("\n");
|
|
22791
|
+
const discoveryLines = ["- `<available_skills>` is generated from the skills discovered on this machine at runtime.", "- Discovery scans project and user skill directories"];
|
|
22792
|
+
if (diagnostics.pluginSources.length > 0) discoveryLines.push(`- Plugin skills loaded from: ${diagnostics.pluginSources.join(", ")}`);
|
|
22793
|
+
const exampleSection = exampleCommands.length > 0 ? ["- Examples:", ...exampleCommands].join("\n") : "";
|
|
22794
|
+
return `${`Execute a skill within the main conversation
|
|
22779
22795
|
|
|
22780
22796
|
<skills_instructions>
|
|
22781
22797
|
When users ask you to perform tasks, check if any of the available skills below can help complete the task more effectively. Skills provide specialized capabilities and domain knowledge.
|
|
22782
22798
|
|
|
22799
|
+
Source of truth:
|
|
22800
|
+
${discoveryLines.join("\n")}
|
|
22801
|
+
|
|
22783
22802
|
How to use skills:
|
|
22784
|
-
- Invoke
|
|
22803
|
+
- Invoke this tool with the skill name only (case-insensitive)
|
|
22785
22804
|
- The skill's prompt will expand and provide detailed instructions on how to complete the task
|
|
22786
|
-
|
|
22787
|
-
- command: "pdf" - invoke the pdf skill
|
|
22788
|
-
- command: "xlsx" - invoke the xlsx skill
|
|
22789
|
-
- command: "plugin:pdf" - invoke using fully qualified name
|
|
22805
|
+
${exampleSection}
|
|
22790
22806
|
|
|
22791
22807
|
Important:
|
|
22792
|
-
- Only use skills listed in <available_skills> below
|
|
22808
|
+
- Only use skills listed in <available_skills> below (this list reflects what is actually installed)
|
|
22793
22809
|
- Do not invoke a skill that is already running
|
|
22794
22810
|
- Do not use this tool for built-in CLI commands (like /help, /clear, etc.)
|
|
22795
|
-
</skills_instructions
|
|
22796
|
-
const location = skill.location === "user" ? "global" : skill.location;
|
|
22797
|
-
return [
|
|
22798
|
-
"<skill>",
|
|
22799
|
-
`<name>${skill.name}</name>`,
|
|
22800
|
-
`<description>${skill.description}</description>`,
|
|
22801
|
-
`<location>${location}</location>`,
|
|
22802
|
-
"</skill>"
|
|
22803
|
-
].join("\n");
|
|
22804
|
-
}).join("\n") || "<skill>\n<name>none</name>\n<description>No skills discovered</description>\n<location>none</location>\n</skill>"}\n</available_skills>`}`;
|
|
22811
|
+
</skills_instructions>`}\n\n${`<available_skills>\n${skillBlocks || "<skill>\n<name>none</name>\n<description>No skills discovered</description>\n<location>none</location>\n</skill>"}\n</available_skills>`}`;
|
|
22805
22812
|
}
|
|
22806
22813
|
function formatSkillContent(skill) {
|
|
22807
22814
|
return `${[
|