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.js CHANGED
@@ -2763,14 +2763,13 @@ import { homedir } from "os";
2763
2763
  import { fileURLToPath } from "url";
2764
2764
  function resolveSkillFile(target) {
2765
2765
  const thisFile = fileURLToPath(import.meta.url);
2766
- const packageRoot = join8(thisFile, "..", "..", "..");
2767
- const skillPath = join8(
2768
- packageRoot,
2769
- "skills",
2770
- target === "claude-code" ? "claude-code" : "codex",
2771
- "SKILL.md"
2772
- );
2773
- return skillPath;
2766
+ const subDir = target === "claude-code" ? "claude-code" : "codex";
2767
+ for (const levels of [2, 3]) {
2768
+ const parts = Array(levels).fill("..");
2769
+ const candidate = join8(thisFile, ...parts, "skills", subDir, "SKILL.md");
2770
+ if (existsSync8(candidate)) return candidate;
2771
+ }
2772
+ return join8(thisFile, "..", "..", "skills", subDir, "SKILL.md");
2774
2773
  }
2775
2774
  function readSkillContent(target) {
2776
2775
  const skillPath = resolveSkillFile(target);
@@ -2783,8 +2782,8 @@ function readSkillContent(target) {
2783
2782
  }
2784
2783
  }
2785
2784
  function installClaudeCode(content, projectRoot, isProject, force, output) {
2786
- const targetDir = isProject ? join8(projectRoot, ".claude", "skills", "instrlint") : join8(homedir(), ".claude", "skills", "instrlint");
2787
- const targetPath = join8(targetDir, "SKILL.md");
2785
+ const targetDir = isProject ? join8(projectRoot, ".claude", "commands") : join8(homedir(), ".claude", "commands");
2786
+ const targetPath = join8(targetDir, "instrlint.md");
2788
2787
  if (existsSync8(targetPath) && !force) {
2789
2788
  output.error(t("install.alreadyExists", { path: targetPath }));
2790
2789
  return { exitCode: 1, errorMessage: "file already exists" };