skillsets 0.7.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)
@@ -3,7 +3,6 @@ import ora from 'ora';
3
3
  import { input, confirm, checkbox } from '@inquirer/prompts';
4
4
  import { existsSync, mkdirSync, copyFileSync, readdirSync, writeFileSync } from 'fs';
5
5
  import { join } from 'path';
6
- import degit from 'degit';
7
6
  import { execSync } from 'child_process';
8
7
  import { CDN_BASE_URL } from '../lib/constants.js';
9
8
  /** Marker files that indicate a directory is a self-contained support stack */
@@ -93,7 +92,7 @@ After installing via \`npx skillsets install {{AUTHOR_HANDLE}}/{{NAME}}\`, custo
93
92
  your-project/
94
93
  ├── .claude/ # Skills, agents, resources
95
94
  ├── CLAUDE.md # Project config ← START HERE
96
- └── README.md # Documentation
95
+ └── README_{{NAME}}.md # Skillset documentation
97
96
  \`\`\`
98
97
 
99
98
  ---
@@ -357,7 +356,7 @@ export async function init(options) {
357
356
  }
358
357
  // Auto-detect existing files — core skillset files and primitives
359
358
  const coreFiles = [
360
- 'CLAUDE.md', 'README.md', 'QUICKSTART.md', 'INSTALL_NOTES.md',
359
+ 'CLAUDE.md', 'QUICKSTART.md', 'INSTALL_NOTES.md',
361
360
  '.claude/', '.mcp.json',
362
361
  ];
363
362
  const detectedCore = coreFiles.filter((f) => {
@@ -417,13 +416,15 @@ export async function init(options) {
417
416
  .replace('{{PRODUCTION_URL}}', productionUrl)
418
417
  .replace('{{TAGS}}', tagsYaml);
419
418
  writeFileSync(join(cwd, 'skillset.yaml'), skillsetYaml);
420
- // Generate content/README.md (if not copying existing)
421
- 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))) {
422
423
  const readme = README_TEMPLATE
423
424
  .replace(/\{\{NAME\}\}/g, name)
424
425
  .replace(/\{\{DESCRIPTION\}\}/g, description)
425
426
  .replace(/\{\{AUTHOR_HANDLE\}\}/g, authorHandle);
426
- writeFileSync(join(cwd, 'content', 'README.md'), readme);
427
+ writeFileSync(join(cwd, 'content', readmeFilename), readme);
427
428
  }
428
429
  // Generate content/QUICKSTART.md (if not copying existing)
429
430
  if (!existsSync(join(cwd, 'content', 'QUICKSTART.md'))) {
@@ -438,21 +439,12 @@ export async function init(options) {
438
439
  .replace(/\{\{NAME\}\}/g, name);
439
440
  writeFileSync(join(cwd, 'content', 'INSTALL_NOTES.md'), installNotes);
440
441
  }
441
- // Install audit-skill from registry
442
- spinner.text = 'Fetching audit-skill...';
443
- const skillDir = join(cwd, '.claude', 'skills', 'audit-skill');
444
- const emitter = degit('skillsets-cc/main/tools/audit-skill', {
445
- cache: false,
446
- force: true,
447
- verbose: false,
448
- });
449
- await emitter.clone(skillDir);
450
442
  spinner.succeed('Skillset structure created');
451
443
  // Summary
452
444
  console.log(chalk.green('\n✓ Initialized skillset submission:\n'));
453
445
  console.log(' skillset.yaml - Manifest (edit as needed)');
454
446
  console.log(' content/ - Installable files');
455
- console.log(' ├── README.md - Documentation');
447
+ console.log(` ├── ${readmeFilename} - Documentation`);
456
448
  console.log(' ├── QUICKSTART.md - Post-install guide');
457
449
  console.log(' ├── INSTALL_NOTES.md - Pre-install notes');
458
450
  if (filesToCopy.length > 0) {
@@ -461,8 +453,6 @@ export async function init(options) {
461
453
  else {
462
454
  console.log(' └── (add your .claude/ and/or CLAUDE.md here)');
463
455
  }
464
- console.log(' .claude/skills/ - Audit skill installed');
465
- console.log(' └── audit-skill/');
466
456
  console.log(chalk.cyan('\nNext steps:'));
467
457
  console.log(' 1. Edit content/INSTALL_NOTES.md with install notes');
468
458
  console.log(' 2. Ensure content/ has your skillset files');
@@ -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.7.0",
3
+ "version": "0.9.0",
4
4
  "description": "CLI tool for discovering and installing verified skillsets",
5
5
  "type": "module",
6
6
  "bin": {