diff --git a/README.md b/README.md index ce8500e..9c8b37e 100644 --- a/README.md +++ b/README.md @@ -405,8 +405,9 @@ When you run `ai-rules generate`, symlinks are created in the agent's skills dir - `.agents/skills/ai-rules-generated-debugging` → `../../ai-rules/skills/debugging` (AMP) - `.claude/skills/ai-rules-generated-debugging` → `../../ai-rules/skills/debugging` (Claude) - `.codex/skills/ai-rules-generated-debugging` → `../../ai-rules/skills/debugging` (Codex) +- `.cursor/skills/ai-rules-generated-debugging` → `../../ai-rules/skills/debugging` (Cursor) -**Supported Agents:** AMP, Claude Code, Codex +**Supported Agents:** AMP, Claude Code, Codex, Cursor **Note:** Skill folders without a `SKILL.md` file are skipped with a warning. diff --git a/src/agents/cursor.rs b/src/agents/cursor.rs index d3bb618..89ef2d5 100644 --- a/src/agents/cursor.rs +++ b/src/agents/cursor.rs @@ -1,8 +1,10 @@ use crate::agents::command_generator::CommandGeneratorTrait; use crate::agents::cursor_command_generator::CursorCommandGenerator; +use crate::agents::external_skills_generator::ExternalSkillsGenerator; use crate::agents::mcp_generator::{ExternalMcpGenerator, McpGeneratorTrait}; use crate::agents::rule_generator::AgentRuleGenerator; -use crate::constants::{AGENTS_MD_FILENAME, GENERATED_FILE_PREFIX, MCP_JSON}; +use crate::agents::skills_generator::SkillsGeneratorTrait; +use crate::constants::{AGENTS_MD_FILENAME, CURSOR_SKILLS_DIR, GENERATED_FILE_PREFIX, MCP_JSON}; use crate::models::SourceFile; use crate::utils::file_utils::{ check_agents_md_symlink, check_directory_exact_match, create_symlink_to_agents_md, @@ -110,6 +112,10 @@ impl AgentRuleGenerator for CursorGenerator { fn command_generator(&self) -> Option> { Some(Box::new(CursorCommandGenerator)) } + + fn skills_generator(&self) -> Option> { + Some(Box::new(ExternalSkillsGenerator::new(CURSOR_SKILLS_DIR))) + } } fn create_cursor_frontmatter(source_file: &SourceFile) -> String { diff --git a/src/constants.rs b/src/constants.rs index c1d8726..3198b22 100644 --- a/src/constants.rs +++ b/src/constants.rs @@ -13,6 +13,7 @@ pub const CLAUDE_SKILLS_DIR: &str = ".claude/skills"; pub const CODEX_SKILLS_DIR: &str = ".codex/skills"; #[allow(dead_code)] pub const AMP_SKILLS_DIR: &str = ".agents/skills"; +pub const CURSOR_SKILLS_DIR: &str = ".cursor/skills"; pub const FIREBENDER_SKILLS_DIR: &str = ".firebender/skills"; pub const SKILL_FILENAME: &str = "SKILL.md"; pub const SKILLS_DIR: &str = "skills";