@robosoft/skillhub-cli 0.3.2 → 0.3.3

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/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.3
4
+
5
+ - Changed skill attach output so skill packages do not copy internal `rules/` folders into `.cursor/skills/<name>` or other target skill folders.
6
+ - Kept rules as explicit top-level artifacts installed by `skillhub rule <category/name>`.
7
+ - Updated local skill creation so `skillhub create skill <name>` creates `SKILL.md`, `skill.json`, and `templates/`, but not `rules/`.
8
+
9
+
3
10
  ## 0.3.2
4
11
 
5
12
  - Changed Cursor rule attachment path from `.cursor/rules/skillhub/<name>.md` to `.cursor/rules/<name>.md`.
package/README.md CHANGED
@@ -4,7 +4,7 @@ Fetch reusable SkillHub knowledge from a web app or registry and attach it to an
4
4
 
5
5
  SkillHub has three knowledge sections:
6
6
 
7
- - **Skills**: capability/workflow packages, usually folders with `SKILL.md`, templates, examples, and supporting rules.
7
+ - **Skills**: capability/workflow packages, usually folders with `SKILL.md`, `skill.json`, templates, and examples. Rules are attached separately with `skillhub rule ...`.
8
8
  - **Rules**: focused `.md` rule files such as `frontend/antipattern.md` or `backend/security.md`.
9
9
  - **Domain**: product, business, architecture, or platform knowledge in `.md` files.
10
10
 
@@ -44,7 +44,6 @@ Cursor output uses only `.md` files. Registry/category prefixes like `frontend/`
44
44
  app/
45
45
  SKILL.md
46
46
  skill.json
47
- rules/
48
47
  templates/
49
48
  rules/
50
49
  skillhub.md
@@ -165,7 +164,6 @@ skillhub-registry/
165
164
  app/
166
165
  skill.json
167
166
  SKILL.md
168
- rules/
169
167
  templates/
170
168
  rules/
171
169
  frontend/
package/bin/skillhub.mjs CHANGED
@@ -622,7 +622,17 @@ async function writeArtifactFiles(projectRoot, config, section, artifactName, fi
622
622
  const targetDir = path.join(projectRoot, baseDir, artifactName);
623
623
  await fs.rm(targetDir, { recursive: true, force: true });
624
624
  await ensureDir(targetDir);
625
- for (const file of files) {
625
+
626
+ // Skills are capability packages. Project rules must be attached explicitly with
627
+ // `skillhub rule ...`, so we do not copy a skill package's internal rules folder
628
+ // into the IDE skill folder. This keeps .cursor/skills/app focused on the skill
629
+ // itself while .cursor/rules remains the single place for rules.
630
+ const skillFiles = files.filter((file) => {
631
+ const relativePath = normalizeSlashes(file.path);
632
+ return relativePath !== "rules" && !relativePath.startsWith("rules/");
633
+ });
634
+
635
+ for (const file of skillFiles) {
626
636
  const targetPath = safeJoin(targetDir, file.path);
627
637
  await ensureDir(path.dirname(targetPath));
628
638
  await fs.writeFile(targetPath, file.content, "utf8");
@@ -982,7 +992,6 @@ async function commandCreate(projectRoot, positional, flags = {}) {
982
992
  if (section === "skills") {
983
993
  const packageDir = path.join(sectionDir, name);
984
994
  if (await exists(packageDir)) throw new Error(`Skill already exists: ${packageDir}`);
985
- await ensureDir(path.join(packageDir, "rules"));
986
995
  await ensureDir(path.join(packageDir, "templates"));
987
996
  await writeJson(path.join(packageDir, "skill.json"), {
988
997
  name,
@@ -996,7 +1005,6 @@ async function commandCreate(projectRoot, positional, flags = {}) {
996
1005
  compatibleWith: ["cursor", "claude", "codex", "gemini", "opencode"],
997
1006
  });
998
1007
  await fs.writeFile(path.join(packageDir, "SKILL.md"), `# ${titleFromName(name)}\n\n## Description\n\n${description}\n\n## When to Use\n\nUse this skill when the user asks for ${titleFromName(name).toLowerCase()} work.\n\n## Workflow\n\n1. Understand the requirement and constraints.\n2. Inspect the existing project structure before changing code.\n3. Propose the smallest safe implementation plan.\n4. Implement using project conventions.\n5. Validate with build, lint, tests, or manual checks.\n\n## Rules\n\n- Follow installed project rules first.\n- Use installed domain knowledge when relevant.\n- Do not invent APIs, paths, or product behavior.\n- Keep changes scoped to the user request.\n\n## Output\n\nExplain changed files, validation performed, and any remaining risks.\n`, "utf8");
999
- await fs.writeFile(path.join(packageDir, "rules/main.md"), `# ${titleFromName(name)} Rules\n\n- Add skill-specific rules here.\n`, "utf8");
1000
1008
  ok(`Created skill ${name}@${version}`);
1001
1009
  info(`Location: ${packageDir}`);
1002
1010
  return;
@@ -22,7 +22,6 @@ A skill is a reusable workflow/capability package.
22
22
  skills/frontend/app/
23
23
  skill.json
24
24
  SKILL.md
25
- rules/
26
25
  templates/
27
26
  examples/
28
27
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@robosoft/skillhub-cli",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "description": "SkillHub CLI for fetching SkillHub web-app knowledge packages into IDE projects: skills, rules, and domain knowledge.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,6 +0,0 @@
1
- # Frontend App Skill Rules
2
-
3
- - Follow the installed frontend anti-pattern rules.
4
- - Keep components focused and typed.
5
- - Respect existing project architecture.
6
- - Add accessible labels and keyboard-friendly interactions.
@@ -1,6 +0,0 @@
1
- # Frontend App Skill Rules
2
-
3
- - Read installed rules before writing code.
4
- - Read installed domain knowledge if the feature touches business behavior.
5
- - Prefer small composable components over giant screen files.
6
- - Keep mutation and data fetching logic easy to test.