Skip to content

fix skill installation paths#34

Merged
0x7067 merged 2 commits into
ravnhq:mainfrom
Menendez2004:fix/skills-as-rules-from-corvus
May 25, 2026
Merged

fix skill installation paths#34
0x7067 merged 2 commits into
ravnhq:mainfrom
Menendez2004:fix/skills-as-rules-from-corvus

Conversation

@Menendez2004
Copy link
Copy Markdown
Contributor

@Menendez2004 Menendez2004 commented May 13, 2026

Problem

Corvus copies toolkit skills (folders with SKILL.md, optional rules/, references/, etc.) into a target directory chosen per product (Claude Code, Cursor, and others).

Originally, Corvus used rules-style paths for Claude and Cursor:

  • .claude/rules/<skill-name>/
  • ~/.claude/rules/<skill-name>/
  • .cursor/rules/<skill-name>/
  • ~/.cursor/rules/<skill-name>/

Those directories are where Cursor Rules and Claude Code rules (instruction files scoped as rules) are expected to live. The products treat skills/ and rules/ as different concepts:

  • Agent Skills are packaged workflows: a directory per skill with SKILL.md at the root, loaded as skills in the UI and activation model.
  • Rules are separate guidance files (often .mdc or markdown) used as standing rules, not the same as the Agent Skills folder layout.

Putting full skill trees under …/rules/… meant installs looked and behaved like rules, not like installed skills. That blocked the expected “skill plugin” / Agent Skill experience and contradicted how both ecosystems document local skills (e.g. project skills under .claude/skills/, .cursor/skills/).

Change

Corvus now targets Agent Skills locations for Claude Code and Cursor:

Product Project Global (user)
Claude Code .claude/skills/<skill>/ ~/.claude/skills/<skill>/
Cursor .cursor/skills/<skill>/ ~/.cursor/skills/<skill>/

Other targets (OpenCode, Codex) still use each product’s documented rules/ layout where that is the appropriate integration surface.

corvus remove continues to clean up both legacy paths (…/rules/…) and the new …/skills/… paths so older installs are not left behind.

Summary

The change was necessary so installed toolkit content is treated as Agent Skills in Claude Code and Cursor, matching product semantics and documentation, instead of incorrectly landing under rules directories.

image

- Updated installation paths for Claude and Cursor skills from `.claude/rules` and `.cursor/rules` to `.claude/skills` and `.cursor/skills` across various files including CLI completions, commands, and documentation.
- Adjusted test cases to reflect the new installation paths for skills.
".cursor/rules",
".opencode/rules",
".codex/rules",
];
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice that KNOWN_PROJECT_DIRS now includes both skills/ and rules/ paths so project removal cleans up legacy installs.

One gap though: removeGlobal above (lines 47-55) only removes the config entry, it never deletes files from disk. If someone previously ran corvus install --global-claude, those files still sit at ~/.claude/rules/<skill>/ and corvus remove --global won't touch them.

The PR description says removal cleans up both legacy and new paths across both scopes. Worth either adding filesystem cleanup to removeGlobal or adjusting the description to clarify this only applies to project-scoped removals.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good eye on KNOWN_PROJECT_DIRS! On removeGlobal, it actually does handle filesystem cleanup — lines 54–59 iterate over globalSkillInstallParents(), which already includes both the canonical path (/.claude/skills) and the legacy path (/.claude/rules), and calls rmSync on any matching skill directory it finds. So corvus remove --global will clean up files from both locations. The config entry remova happens right after

"project-codex": ".codex/rules",
};
projectConfigSet("install_dir", dirMap[target] ?? ".claude/rules");
projectConfigSet("install_dir", dirMap[target] ?? ".claude/skills");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something to think about: users who already ran corvus install --claude have install_dir: ".claude/rules" saved in their project config. After this update the default changes to .claude/skills, but the stored value is not migrated.

If someone re-runs corvus install without a target flag, it reads the stale config and keeps installing to rules/. That could lead to a split where some skills live in rules/ and newer ones in skills/.

A one-time migration that rewrites install_dir when it matches a known legacy value (e.g. .claude/rules -> .claude/skills) would close the gap.

Copy link
Copy Markdown
Contributor Author

@Menendez2004 Menendez2004 May 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is already covered. migrateLegacyProjectInstallDirIfNeeded runs automatically on every corvus command via the preAction hook in index.ts. It reads install_dir from .corvusrc, and if it finds a known legacy value like .claude/rules, it renames the on-disk skill tree into .claude/skills and rewrites the stored install_dir in one shot. So the split-state scenario you described is prevented the stale config is corrected before any install logic runs.

assert_includes targets, "CHANGELOG.md"
assert_includes targets, "skills/assistant/promptify/SKILL.md"
assert_includes targets, "skills/design/design-frontend/rules/layout-use-spacing-scale.md"
assert_includes targets, "skills/frontend/design-frontend/rules/layout-use-spacing-scale.md"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fix is correct (design-frontend does live under skills/frontend/), but it is unrelated to the skills-vs-rules path change. Would be cleaner as its own commit so the history stays easy to bisect.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair point this is a pre-existing path correction (skills/design/ → skills/frontend/) that's orthogonal to the skills vs rules change. It was bundled in to keep the test suite green in one pass, but agreed it would have been cleaner as a separate commit

Copy link
Copy Markdown
Contributor

@0x7067 0x7067 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Menendez2004 can I merge this or are you still working on it?

@Menendez2004
Copy link
Copy Markdown
Contributor Author

@Menendez2004 can I merge this or are you still working on it?

sure, you can merge it, it's done

@0x7067 0x7067 merged commit 1d4ddc0 into ravnhq:main May 25, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants