instrlint 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/dist/cli.cjs CHANGED
@@ -2790,14 +2790,13 @@ var import_os = require("os");
2790
2790
  var import_url = require("url");
2791
2791
  function resolveSkillFile(target) {
2792
2792
  const thisFile = (0, import_url.fileURLToPath)(importMetaUrl);
2793
- const packageRoot = (0, import_path11.join)(thisFile, "..", "..", "..");
2794
- const skillPath = (0, import_path11.join)(
2795
- packageRoot,
2796
- "skills",
2797
- target === "claude-code" ? "claude-code" : "codex",
2798
- "SKILL.md"
2799
- );
2800
- return skillPath;
2793
+ const subDir = target === "claude-code" ? "claude-code" : "codex";
2794
+ for (const levels of [2, 3]) {
2795
+ const parts = Array(levels).fill("..");
2796
+ const candidate = (0, import_path11.join)(thisFile, ...parts, "skills", subDir, "SKILL.md");
2797
+ if ((0, import_fs12.existsSync)(candidate)) return candidate;
2798
+ }
2799
+ return (0, import_path11.join)(thisFile, "..", "..", "skills", subDir, "SKILL.md");
2801
2800
  }
2802
2801
  function readSkillContent(target) {
2803
2802
  const skillPath = resolveSkillFile(target);
@@ -2810,8 +2809,8 @@ function readSkillContent(target) {
2810
2809
  }
2811
2810
  }
2812
2811
  function installClaudeCode(content, projectRoot, isProject, force, output) {
2813
- const targetDir = isProject ? (0, import_path11.join)(projectRoot, ".claude", "skills", "instrlint") : (0, import_path11.join)((0, import_os.homedir)(), ".claude", "skills", "instrlint");
2814
- const targetPath = (0, import_path11.join)(targetDir, "SKILL.md");
2812
+ const targetDir = isProject ? (0, import_path11.join)(projectRoot, ".claude", "commands") : (0, import_path11.join)((0, import_os.homedir)(), ".claude", "commands");
2813
+ const targetPath = (0, import_path11.join)(targetDir, "instrlint.md");
2815
2814
  if ((0, import_fs12.existsSync)(targetPath) && !force) {
2816
2815
  output.error(t("install.alreadyExists", { path: targetPath }));
2817
2816
  return { exitCode: 1, errorMessage: "file already exists" };