-
Notifications
You must be signed in to change notification settings - Fork 3
refactor(skills): unify cursor rules and claude skills #180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Replace separate Cursor rules with symlinks to Claude skills, making skills the single source of truth for both AI tools. Changes: - Add globs/alwaysApply fields to SKILL.md for Cursor compatibility - Improve skill descriptions to clarify when each should be used - Replace .cursor/rules/*.mdc files with symlinks to .claude/skills/ - Add PR title guidelines to development-workflow skill - Consolidate clean-code patterns into typescript-patterns skill - Simplify CLAUDE.md to reference unified skill structure This eliminates content duplication and ensures consistent guidance across Cursor and Claude Code. Fixes #156
commit: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR refactors the project's documentation structure by consolidating Cursor rules and Claude skills into a unified system. Claude skills (.claude/skills/) become the single source of truth, with Cursor rules (.cursor/rules/) implemented as symlinks for compatibility.
Key Changes:
- Replaced 9 standalone Cursor rule files with 5 symlinked skill files
- Added Cursor-specific metadata (
globs,alwaysApply) to Claude SKILL.md files - Consolidated redundant rules (clean-code, json-schema) into typescript-patterns skill
- Simplified CLAUDE.md to reference consolidated skills with a quick-lookup table
Reviewed changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| CLAUDE.md | Simplified to reference unified skills with quick-lookup table instead of duplicated content |
| .cursor/rules/vitest-mocks.mdc | Removed - consolidated into typescript-testing skill |
| .cursor/rules/typescript-testing.mdc | Created symlink to typescript-testing skill |
| .cursor/rules/typescript-patterns.mdc | Created symlink to typescript-patterns skill |
| .cursor/rules/typescript-best-practices.mdc | Removed - consolidated into typescript-patterns skill |
| .cursor/rules/release-please-standards.mdc | Removed - covered in development-workflow skill |
| .cursor/rules/pnpm-standards.mdc | Removed - covered in development-workflow skill |
| .cursor/rules/orama-integration.mdc | Created symlink to orama-integration skill |
| .cursor/rules/native-fetch.mdc | Removed - consolidated into file-operations skill |
| .cursor/rules/json-schema-handling.mdc | Removed - consolidated into typescript-patterns skill |
| .cursor/rules/file-utils.mdc | Removed - consolidated into file-operations skill |
| .cursor/rules/file-operations.mdc | Created symlink to file-operations skill |
| .cursor/rules/examples-standards.mdc | Removed (not replaced - examples guidance consolidated elsewhere) |
| .cursor/rules/development-workflow.mdc | Created symlink to development-workflow skill |
| .cursor/rules/cursor-rules-location.mdc | Removed (no longer relevant with symlink approach) |
| .cursor/rules/clean-code.mdc | Removed - consolidated into typescript-patterns skill |
| .claude/skills/typescript-testing/SKILL.md | Added Cursor metadata and improved description |
| .claude/skills/typescript-patterns/SKILL.md | Added Cursor metadata, improved description, consolidated clean-code and json-schema content |
| .claude/skills/orama-integration/SKILL.md | Added Cursor metadata and improved description |
| .claude/skills/file-operations/SKILL.md | Added Cursor metadata and improved description |
| .claude/skills/development-workflow/SKILL.md | Added Cursor metadata, PR guidelines, file naming conventions |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| name: development-workflow | ||
| description: Build, development, and code quality commands for StackOne SDK | ||
| description: Build commands, testing, linting, git workflow, commit conventions, and file naming standards. (project) | ||
| globs: "" |
Copilot
AI
Dec 9, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The globs field is set to an empty string, but for Cursor compatibility, it should either specify file patterns or be omitted. Since this skill is about development workflow (commands, testing, linting, git), consider using globs: "**/*" to apply to all files, or just remove the field entirely if alwaysApply: true is sufficient.
| globs: "" |
| name: orama-integration | ||
| description: Orama API integration reference for StackOne | ||
| description: Use when integrating with Orama. Links to official docs for search, indexing, answer engine. (project) | ||
| globs: "" |
Copilot
AI
Dec 9, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The globs field is set to an empty string, which may not be handled correctly by Cursor. Since this skill applies to Orama integration code, consider specifying relevant file patterns (e.g., globs: "*.ts") or removing the field entirely since you have alwaysApply: false.
| globs: "" |
|
|
||
| Refer to `.claude/skills/orama-integration/SKILL.md` for complete details. | ||
| | Skill | When to Use | | ||
| |-------|-------------| |
Copilot
AI
Dec 9, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Inconsistent table formatting: The header row has spaces around the pipes (| Skill | When to Use |) but the separator row doesn't (|-------|-------------|). For proper Markdown rendering, add spaces: | ----- | ----------- |.
| |-------|-------------| | |
| | ----- | ----------- | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 issue found across 21 files
Prompt for AI agents (all 1 issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name=".claude/skills/typescript-testing/SKILL.md">
<violation number="1" location=".claude/skills/typescript-testing/SKILL.md:4">
P2: Glob pattern `*.spec.ts` won't match test files in subdirectories. Use `**/*.spec.ts` for recursive matching since all test files are in paths like `src/tests/` and `src/`.</violation>
</file>
Reply to cubic to teach it or ask questions. Re-run a review with @cubic-dev-ai review this PR
| name: typescript-testing | ||
| description: Vitest test runner and MSW-based testing patterns for StackOne SDK | ||
| description: Use when writing or running tests. Covers Vitest commands, MSW HTTP mocking, fs-fixture for file system tests. (project) | ||
| globs: "*.spec.ts" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P2: Glob pattern *.spec.ts won't match test files in subdirectories. Use **/*.spec.ts for recursive matching since all test files are in paths like src/tests/ and src/.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .claude/skills/typescript-testing/SKILL.md, line 4:
<comment>Glob pattern `*.spec.ts` won't match test files in subdirectories. Use `**/*.spec.ts` for recursive matching since all test files are in paths like `src/tests/` and `src/`.</comment>
<file context>
@@ -1,6 +1,8 @@
name: typescript-testing
-description: Vitest test runner and MSW-based testing patterns for StackOne SDK
+description: Use when writing or running tests. Covers Vitest commands, MSW HTTP mocking, fs-fixture for file system tests. (project)
+globs: "*.spec.ts"
+alwaysApply: false
---
</file context>
| globs: "*.spec.ts" | |
| globs: "**/*.spec.ts" |
- Update file-operations skill to HTTP-only (file utils removed upstream) - Keep unified skills/rules structure from this branch
|
this should be merged after #175 |
Summary
globs/alwaysApplyfields to SKILL.md for Cursor compatibilityStructure
Test plan
head .cursor/rules/typescript-patterns.mdcFixes #156
Summary by cubic
Makes .claude/skills the single source of truth and replaces .cursor/rules with symlinks to eliminate duplication. Clarifies skill usage, adds Cursor-compatible fields, and consolidates redundant rules (Fixes #156).
Written for commit 7cd95b2. Summary will update automatically on new commits.