skillsets 0.8.0 → 0.9.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.
@@ -70,9 +70,18 @@ function isBinaryFile(filePath) {
70
70
  return false;
71
71
  }
72
72
  }
73
+ /** Find the README_<NAME>.md file in content/ */
74
+ function findReadme(cwd) {
75
+ const contentDir = join(cwd, 'content');
76
+ if (!existsSync(contentDir))
77
+ return null;
78
+ const entries = readdirSync(contentDir);
79
+ const readme = entries.find(f => /^README_[^/]+\.md$/i.test(f));
80
+ return readme ? join(contentDir, readme) : null;
81
+ }
73
82
  function scanReadmeLinks(cwd) {
74
- const readmePath = join(cwd, 'content', 'README.md');
75
- if (!existsSync(readmePath))
83
+ const readmePath = findReadme(cwd);
84
+ if (!readmePath)
76
85
  return [];
77
86
  const relativeLinks = [];
78
87
  const content = readFileSync(readmePath, 'utf-8');
@@ -270,7 +279,7 @@ export async function audit(options = {}) {
270
279
  // 2. Required files
271
280
  spinner.text = 'Checking required files...';
272
281
  const hasContent = existsSync(join(cwd, 'content'));
273
- const hasReadme = existsSync(join(cwd, 'content', 'README.md'));
282
+ const hasReadme = !!findReadme(cwd);
274
283
  const hasQuickstart = existsSync(join(cwd, 'content', 'QUICKSTART.md'));
275
284
  const hasInstallNotes = existsSync(join(cwd, 'content', 'INSTALL_NOTES.md'));
276
285
  const hasSkillsetYaml = existsSync(join(cwd, 'skillset.yaml'));
@@ -280,7 +289,7 @@ export async function audit(options = {}) {
280
289
  if (!hasContent)
281
290
  missingFiles.push('content/');
282
291
  if (!hasReadme)
283
- missingFiles.push('content/README.md');
292
+ missingFiles.push('content/README_<NAME>.md');
284
293
  if (!hasQuickstart)
285
294
  missingFiles.push('content/QUICKSTART.md');
286
295
  if (!hasInstallNotes)
@@ -92,7 +92,7 @@ After installing via \`npx skillsets install {{AUTHOR_HANDLE}}/{{NAME}}\`, custo
92
92
  your-project/
93
93
  ├── .claude/ # Skills, agents, resources
94
94
  ├── CLAUDE.md # Project config ← START HERE
95
- └── README.md # Documentation
95
+ └── README_{{NAME}}.md # Skillset documentation
96
96
  \`\`\`
97
97
 
98
98
  ---
@@ -356,7 +356,7 @@ export async function init(options) {
356
356
  }
357
357
  // Auto-detect existing files — core skillset files and primitives
358
358
  const coreFiles = [
359
- 'CLAUDE.md', 'README.md', 'QUICKSTART.md', 'INSTALL_NOTES.md',
359
+ 'CLAUDE.md', 'QUICKSTART.md', 'INSTALL_NOTES.md',
360
360
  '.claude/', '.mcp.json',
361
361
  ];
362
362
  const detectedCore = coreFiles.filter((f) => {
@@ -416,13 +416,15 @@ export async function init(options) {
416
416
  .replace('{{PRODUCTION_URL}}', productionUrl)
417
417
  .replace('{{TAGS}}', tagsYaml);
418
418
  writeFileSync(join(cwd, 'skillset.yaml'), skillsetYaml);
419
- // Generate content/README.md (if not copying existing)
420
- if (!existsSync(join(cwd, 'content', 'README.md'))) {
419
+ // Generate content/README_<NAME>.md (if not copying existing)
420
+ // Named README avoids clobbering the user's own README.md on install
421
+ const readmeFilename = `README_${name.toUpperCase()}.md`;
422
+ if (!existsSync(join(cwd, 'content', readmeFilename))) {
421
423
  const readme = README_TEMPLATE
422
424
  .replace(/\{\{NAME\}\}/g, name)
423
425
  .replace(/\{\{DESCRIPTION\}\}/g, description)
424
426
  .replace(/\{\{AUTHOR_HANDLE\}\}/g, authorHandle);
425
- writeFileSync(join(cwd, 'content', 'README.md'), readme);
427
+ writeFileSync(join(cwd, 'content', readmeFilename), readme);
426
428
  }
427
429
  // Generate content/QUICKSTART.md (if not copying existing)
428
430
  if (!existsSync(join(cwd, 'content', 'QUICKSTART.md'))) {
@@ -442,7 +444,7 @@ export async function init(options) {
442
444
  console.log(chalk.green('\n✓ Initialized skillset submission:\n'));
443
445
  console.log(' skillset.yaml - Manifest (edit as needed)');
444
446
  console.log(' content/ - Installable files');
445
- console.log(' ├── README.md - Documentation');
447
+ console.log(` ├── ${readmeFilename} - Documentation`);
446
448
  console.log(' ├── QUICKSTART.md - Post-install guide');
447
449
  console.log(' ├── INSTALL_NOTES.md - Pre-install notes');
448
450
  if (filesToCopy.length > 0) {
@@ -234,7 +234,7 @@ Submitted via \`npx skillsets submit\`
234
234
  ### Checklist
235
235
 
236
236
  - [x] \`skillset.yaml\` validated against schema
237
- - [x] \`README.md\` with installation and usage instructions
237
+ - [x] \`README_${skillset.name.toUpperCase()}.md\` with installation and usage instructions
238
238
  - [x] \`content/INSTALL_NOTES.md\` with install notes
239
239
  - [x] \`AUDIT_REPORT.md\` generated and passing
240
240
  - [x] \`content/\` directory with skillset files
@@ -14,7 +14,12 @@ export async function view(skillsetId) {
14
14
  }
15
15
  const [namespace, name] = skillsetId.split('/');
16
16
  const encodedPath = encodeURIComponent(namespace) + '/' + encodeURIComponent(name);
17
- const readmeUrl = `${GITHUB_RAW_BASE}/skillsets/${encodedPath}/content/README.md`;
17
+ const readmeFile = metadata.files
18
+ ? Object.keys(metadata.files).find(f => /^content\/README_[^/]+\.md$/i.test(f))
19
+ : null;
20
+ const readmeUrl = readmeFile
21
+ ? `${GITHUB_RAW_BASE}/skillsets/${encodedPath}/${readmeFile}`
22
+ : `${GITHUB_RAW_BASE}/skillsets/${encodedPath}/content/README.md`;
18
23
  const auditUrl = `${GITHUB_RAW_BASE}/skillsets/${encodedPath}/AUDIT_REPORT.md`;
19
24
  const [readmeResponse, auditResponse] = await Promise.all([
20
25
  fetch(readmeUrl),
@@ -1,4 +1,4 @@
1
1
  export declare const SKILLSET_YAML_TEMPLATE = "schema_version: \"1.0\"\nbatch_id: \"{{BATCH_ID}}\"\n\n# Identity\nname: \"{{NAME}}\"\nversion: \"1.0.0\"\ndescription: \"{{DESCRIPTION}}\"\n\nauthor:\n handle: \"{{AUTHOR_HANDLE}}\"\n url: \"{{AUTHOR_URL}}\"\n\n# Verification\nverification:\n production_links:\n - url: \"{{PRODUCTION_URL}}\"\n audit_report: \"./AUDIT_REPORT.md\"\n\n# Discovery\ntags:\n{{TAGS}}\n\ncompatibility:\n claude_code_version: \">=1.0.0\"\n languages:\n - \"any\"\n\n# Lifecycle\nstatus: \"active\"\n\n# Content\nentry_point: \"./content/CLAUDE.md\"\n";
2
2
  export declare const README_TEMPLATE = "# {{NAME}}\n\n{{DESCRIPTION}}\n\n## Installation\n\n```bash\nnpx skillsets install {{AUTHOR_HANDLE}}/{{NAME}}\n```\n\n## Usage\n\n[Describe how to use your skillset]\n\n## What's Included\n\n[List the key files and their purposes]\n\n## License\n\n[Your license]\n";
3
- export declare const QUICKSTART_TEMPLATE = "# Quickstart\n\nAfter installing via `npx skillsets install {{AUTHOR_HANDLE}}/{{NAME}}`, customize the workflow for your project.\n\n---\n\n## What Was Installed\n\n```\nyour-project/\n\u251C\u2500\u2500 .claude/ # Skills, agents, resources\n\u251C\u2500\u2500 CLAUDE.md # Project config \u2190 START HERE\n\u2514\u2500\u2500 README.md # Documentation\n```\n\n---\n\n## Getting Started\n\n1. **Edit CLAUDE.md** \u2014 Replace placeholder content with your project's specifics\n2. **Customize .claude/** \u2014 Adapt skills, agents, and resources for your stack\n3. **Run** \u2014 `claude` to start using the skillset\n\n---\n\n## Customization Checklist\n\n- [ ] Update Identity & Constraints in CLAUDE.md\n- [ ] Configure style guides in .claude/resources/\n- [ ] Adapt agent definitions in .claude/agents/\n- [ ] Set up any required infrastructure (Docker, API keys, etc.)\n\n---\n\n## Resources\n\n[Add links to documentation, examples, or support channels]\n";
3
+ export declare const QUICKSTART_TEMPLATE = "# Quickstart\n\nAfter installing via `npx skillsets install {{AUTHOR_HANDLE}}/{{NAME}}`, customize the workflow for your project.\n\n---\n\n## What Was Installed\n\n```\nyour-project/\n\u251C\u2500\u2500 .claude/ # Skills, agents, resources\n\u251C\u2500\u2500 CLAUDE.md # Project config \u2190 START HERE\n\u2514\u2500\u2500 README_{{NAME}}.md # Skillset documentation\n```\n\n---\n\n## Getting Started\n\n1. **Edit CLAUDE.md** \u2014 Replace placeholder content with your project's specifics\n2. **Customize .claude/** \u2014 Adapt skills, agents, and resources for your stack\n3. **Run** \u2014 `claude` to start using the skillset\n\n---\n\n## Customization Checklist\n\n- [ ] Update Identity & Constraints in CLAUDE.md\n- [ ] Configure style guides in .claude/resources/\n- [ ] Adapt agent definitions in .claude/agents/\n- [ ] Set up any required infrastructure (Docker, API keys, etc.)\n\n---\n\n## Resources\n\n[Add links to documentation, examples, or support channels]\n";
4
4
  export declare const INSTALL_NOTES_TEMPLATE = "# {{NAME}}\n\n<!--\nInstall notes for pre-install display. Max 4000 characters total.\nWhat does this skillset do? What should users know before installing?\nThe dependency section below is populated by /audit-skill during review.\n-->\n\n## Dependencies\n\n<!-- Populated automatically by /audit-skill -->\n";
@@ -65,7 +65,7 @@ After installing via \`npx skillsets install {{AUTHOR_HANDLE}}/{{NAME}}\`, custo
65
65
  your-project/
66
66
  ├── .claude/ # Skills, agents, resources
67
67
  ├── CLAUDE.md # Project config ← START HERE
68
- └── README.md # Documentation
68
+ └── README_{{NAME}}.md # Skillset documentation
69
69
  \`\`\`
70
70
 
71
71
  ---
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skillsets",
3
- "version": "0.8.0",
3
+ "version": "0.9.0",
4
4
  "description": "CLI tool for discovering and installing verified skillsets",
5
5
  "type": "module",
6
6
  "bin": {