Skip to content

Replace Claude skills generation with path-scoped rules#84

Open
Kush Agrawal (kush-duolingo) wants to merge 1 commit into
masterfrom
replace-claude-skills-with-rules
Open

Replace Claude skills generation with path-scoped rules#84
Kush Agrawal (kush-duolingo) wants to merge 1 commit into
masterfrom
replace-claude-skills-with-rules

Conversation

@kush-duolingo
Copy link
Copy Markdown
Contributor

@kush-duolingo Kush Agrawal (kush-duolingo) commented May 18, 2026

Description

  • Replace SkillsGenerator (.claude/skills/generated_*/SKILL.md) with ClaudeRulesGenerator (.claude/rules/generated/*.md) that uses paths frontmatter for file-scoped activation
  • Add auto-symlink from .claude/skills/agents to .agents/skills/ so Claude Code discovers skills from the standard Agent Skills location
  • Skills should now be authored directly in .agents/skills/ following the open standard (supported by Cursor, Codex, Copilot, and 30+ tools) -- no sync needed

Context: https://duolingo.slack.com/archives/C08TV2ZB4SE/p1778708293248929

Verification steps

  • make test passes
  • Run python3 -m sync_ai_rules in a repo with .cursor/rules/ and verify .claude/rules/generated/ is populated with paths frontmatter

Skills follow the Agent Skills open standard (agentskills.io) and should
be authored directly in .agents/skills/ -- no sync needed. This tool now
focuses on rules (guidance/conventions) which still need per-tool sync.

- Replace SkillsGenerator (.claude/skills/generated_*/SKILL.md) with
  ClaudeRulesGenerator (.claude/rules/generated/*.md with paths frontmatter)
- Add symlink from .claude/skills/agents to .agents/skills/ so Claude Code
  discovers skills from the standard location
- Update plugins.yaml, test fixtures, and README

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@clevin95 Carter L (clevin95) left a comment

Choose a reason for hiding this comment

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

Approving under the assumption that we will convert most of our cursor rules to be agent skills before bumping the version.

We should make sure Android does the same before adopting this change.

Copy link
Copy Markdown
Member

@artnc Art Chaidarun (artnc) left a comment

Choose a reason for hiding this comment

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

^ Speaking just as a repo maintainer without strong opinions about AI rule syncing: how backward-compatible is this PR (if that's what Carter L (@clevin95)'s comment is about)? I see that it's already doing some auto-migration, e.g. deleting old generated_*

Copy link
Copy Markdown

@guadalupe-duolingo guadalupe-duolingo left a comment

Choose a reason for hiding this comment

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

Thanks for this! Will leave to other reviewers to approve.

@kush-duolingo
Copy link
Copy Markdown
Contributor Author

Kush Agrawal (kush-duolingo) commented May 21, 2026

^ Speaking just as a repo maintainer without strong opinions about AI rule syncing: how backward-compatible is this PR (if that's what Carter L (Carter L (@clevin95))'s comment is about)? I see that it's already doing some auto-migration, e.g. deleting old generated_*

Anyone who bumps to this version will need to (as part of the version bump PR):

  • Migrate their existing rules to skills as needed
  • Add necessary glob paths to any files they want to keep as rules

So it's bit of a manual version bump. Let me know if that answers the qn!

@kush-duolingo
Copy link
Copy Markdown
Contributor Author

Kush Agrawal (kush-duolingo) commented May 21, 2026

Screenshot 2026-05-21 at 5 21 15 PM

Art Chaidarun (@artnc) looks like you'll need to hit merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants