2626public class SkillsInstallationTargetResolver {
2727
2828 private static final String [] LOCAL_SKILLS_PATH = {".agents" , "skills" };
29+ private static final String [] CLAUDE_PATH = {".claude" , "skills" };
30+ private static final String [] GITHUB_PATH = {".github" , "skills" };
31+ private static final String [] CURSOR_PATH = {".cursor" , "skills" };
32+ private static final String [] OPENCODE_PATH = {".opencode" , "skills" };
33+ private static final String [] GEMINI_PATH = {".gemini" , "skills" };
34+ private static final String [] WINDSURF_PATH = {".windsurf" , "skills" };
35+ private static final String [] PI_PATH = {".pi" , "skills" };
2936 private static final String GLOBAL_MODE_NOT_IMPLEMENTED =
3037 "Global skills installation is not implemented yet. Run 'flamingock install-skills' to install into ./.agents/skills." ;
3138
@@ -40,18 +47,65 @@ public SkillsInstallationTargetResolver() {
4047 }
4148
4249 /**
43- * Resolves the skills installation targets for the requested mode.
50+ * Resolves the skills installation targets for the requested mode (default agent) .
4451 *
4552 * @param workingDirectory current command working directory
4653 * @param global whether global mode was requested
4754 * @return resolved installation targets
4855 */
4956 public List <SkillsInstallationTarget > resolveTargets (Path workingDirectory , boolean global ) {
57+ return resolveTargets (workingDirectory , global , null );
58+ }
59+
60+ /**
61+ * Resolves the skills installation targets for the requested mode and agent.
62+ *
63+ * @param workingDirectory current command working directory
64+ * @param global whether global mode was requested
65+ * @param agent target AI assistant identifier (claude, github, cursor, opencode, gemini, windsurf, pi)
66+ * @return resolved installation targets
67+ */
68+ public List <SkillsInstallationTarget > resolveTargets (Path workingDirectory , boolean global , String agent ) {
5069 if (global ) {
5170 throw new IllegalStateException (GLOBAL_MODE_NOT_IMPLEMENTED );
5271 }
5372
54- Path destination = directoryResolver .resolveDirectory (workingDirectory , LOCAL_SKILLS_PATH );
55- return List .of (SkillsInstallationTarget .local (destination ));
73+ if (agent == null ) {
74+ Path destination = directoryResolver .resolveDirectory (workingDirectory , LOCAL_SKILLS_PATH );
75+ return List .of (SkillsInstallationTarget .agents (destination ));
76+ }
77+
78+ return switch (agent ) {
79+ case "claude" -> {
80+ Path destination = directoryResolver .resolveDirectory (workingDirectory , CLAUDE_PATH );
81+ yield List .of (SkillsInstallationTarget .claude (destination ));
82+ }
83+ case "github" -> {
84+ Path destination = directoryResolver .resolveDirectory (workingDirectory , GITHUB_PATH );
85+ yield List .of (SkillsInstallationTarget .github (destination ));
86+ }
87+ case "cursor" -> {
88+ Path destination = directoryResolver .resolveDirectory (workingDirectory , CURSOR_PATH );
89+ yield List .of (SkillsInstallationTarget .cursor (destination ));
90+ }
91+ case "opencode" -> {
92+ Path destination = directoryResolver .resolveDirectory (workingDirectory , OPENCODE_PATH );
93+ yield List .of (SkillsInstallationTarget .opencode (destination ));
94+ }
95+ case "gemini" -> {
96+ Path destination = directoryResolver .resolveDirectory (workingDirectory , GEMINI_PATH );
97+ yield List .of (SkillsInstallationTarget .gemini (destination ));
98+ }
99+ case "windsurf" -> {
100+ Path destination = directoryResolver .resolveDirectory (workingDirectory , WINDSURF_PATH );
101+ yield List .of (SkillsInstallationTarget .windsurf (destination ));
102+ }
103+ case "pi" -> {
104+ Path destination = directoryResolver .resolveDirectory (workingDirectory , PI_PATH );
105+ yield List .of (SkillsInstallationTarget .pi (destination ));
106+ }
107+ default -> throw new IllegalStateException (
108+ "Unsupported agent: '" + agent + "'. Supported values: claude, github, cursor, opencode, gemini, windsurf, pi." );
109+ };
56110 }
57111}
0 commit comments