@patricio0312rev/skillset 0.1.0 → 0.1.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@patricio0312rev/skillset",
3
3
  "displayName": "Skillset",
4
- "version": "0.1.0",
4
+ "version": "0.1.2",
5
5
  "description": "CLI tool to import production-ready development skills for Claude Code, Cursor, GitHub Copilot, and other AI coding assistants",
6
6
  "main": "src/index.js",
7
7
  "bin": {
@@ -112,7 +112,12 @@ async function generateSkillFile(domain, skill, domainDir, config) {
112
112
  domain,
113
113
  skill
114
114
  );
115
- const sourceFile = path.join(sourceDir, " SKILL.md");
115
+
116
+ let sourceFile = path.join(sourceDir, "SKILL.md");
117
+
118
+ if (!await fs.pathExists(sourceFile)) {
119
+ sourceFile = path.join(sourceDir, " SKILL.md");
120
+ }
116
121
 
117
122
  // Target file with appropriate extension
118
123
  const targetSkillDir = path.join(domainDir, skill);
@@ -123,7 +128,9 @@ async function generateSkillFile(domain, skill, domainDir, config) {
123
128
  await fs.ensureDir(targetSkillDir);
124
129
 
125
130
  // Check if template exists
126
- if (await fs.pathExists(sourceFile)) {
131
+ const templateExists = await fs.pathExists(sourceFile);
132
+
133
+ if (templateExists) {
127
134
  let content = await fs.readFile(sourceFile, "utf8");
128
135
 
129
136
  // Process content based on tool (e.g., rename SKILL.md to RULE.md for Cursor)
@@ -150,11 +157,22 @@ async function generateSkillFile(domain, skill, domainDir, config) {
150
157
 
151
158
  return targetFile;
152
159
  } else {
153
- console.warn(`Warning: Template not found for ${domain}/${skill}`);
154
- return null;
160
+ console.warn(`⚠️ Warning: Template not found for ${domain}/${skill}`);
161
+ console.warn(` Expected at: ${sourceFile}`);
162
+ console.warn(` Creating placeholder skill file...`);
163
+
164
+ // Create a basic placeholder so the folder isn't empty
165
+ const placeholderContent = `# ${skill}\n\nThis skill template is not yet available.\n\nDomain: ${domain}`;
166
+ await fs.writeFile(targetFile, placeholderContent);
167
+ console.log(` ✓ Created placeholder file: ${targetFile}`);
168
+
169
+ return targetFile;
155
170
  }
156
171
  } catch (error) {
157
- console.error(`Error generating skill ${skill}:`, error.message);
172
+ console.error(`❌ Error generating skill ${skill}:`, error.message);
173
+ console.error(` Source: ${sourceFile}`);
174
+ console.error(` Target: ${targetFile}`);
175
+ console.error(` Full error:`, error);
158
176
  return null;
159
177
  }
160
178
  }