@pigcloud/skills 1.0.9 → 1.0.10

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.
Files changed (2) hide show
  1. package/bin/cli.js +15 -9
  2. package/package.json +1 -1
package/bin/cli.js CHANGED
@@ -69,15 +69,21 @@ const TOOL_CONFIGS = {
69
69
  windsurf: { dir: '.', rootFile: '.windsurfrules', markers: ['.windsurfrules'] }
70
70
  };
71
71
 
72
- function colorize(code, text) {
73
- const value = String(text);
74
- if (!process.stdout.isTTY) return value;
75
- return `${code}${value}${COLORS.reset}`;
76
- }
77
-
78
- function normalizeSkillName(skill) {
79
- return String(skill || '').trim();
80
- }
72
+ function colorize(code, text) {
73
+ const value = String(text);
74
+ if (!process.stdout.isTTY) return value;
75
+ return `${code}${value}${COLORS.reset}`;
76
+ }
77
+
78
+ function commandAvailable(command) {
79
+ const { spawnSync } = require('child_process');
80
+ const result = spawnSync(command, ['--version'], { stdio: 'ignore' });
81
+ return !result.error && result.status === 0;
82
+ }
83
+
84
+ function normalizeSkillName(skill) {
85
+ return String(skill || '').trim();
86
+ }
81
87
 
82
88
  function normalizeToolName(tool) {
83
89
  if (!tool) return null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pigcloud/skills",
3
- "version": "1.0.9",
3
+ "version": "1.0.10",
4
4
  "description": "面向 Codex、Trae 和 Claude Code 的 AI 技能包,提供共享技能、规则约束、工作流路由和 Pig Cloud 专属覆盖层。",
5
5
  "author": "Pig Skills Maintainers",
6
6
  "license": "MIT",