skillkit 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -761,29 +761,6 @@ var init_providers = __esm({
761
761
  }
762
762
  });
763
763
 
764
- // src/cli.ts
765
- import { Cli, Builtins } from "clipanion";
766
-
767
- // src/commands/install.ts
768
- init_providers();
769
- import { existsSync as existsSync24, mkdirSync as mkdirSync2, cpSync, rmSync as rmSync4 } from "fs";
770
- import { join as join24 } from "path";
771
- import chalk from "chalk";
772
- import ora from "ora";
773
- import { Command, Option } from "clipanion";
774
-
775
- // src/core/config.ts
776
- init_types();
777
- import { existsSync as existsSync23, readFileSync as readFileSync2, writeFileSync, mkdirSync } from "fs";
778
- import { join as join23, dirname } from "path";
779
- import { homedir as homedir17 } from "os";
780
- import { parse as parseYaml2, stringify as stringifyYaml } from "yaml";
781
-
782
- // src/agents/claude-code.ts
783
- import { existsSync as existsSync6 } from "fs";
784
- import { join as join6 } from "path";
785
- import { homedir as homedir2 } from "os";
786
-
787
764
  // src/agents/base.ts
788
765
  function createSkillXml(skill) {
789
766
  return `<skill>
@@ -795,20 +772,33 @@ function createSkillXml(skill) {
795
772
  function escapeXml(text) {
796
773
  return text.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&apos;");
797
774
  }
775
+ var init_base2 = __esm({
776
+ "src/agents/base.ts"() {
777
+ "use strict";
778
+ }
779
+ });
798
780
 
799
781
  // src/agents/claude-code.ts
800
- var ClaudeCodeAdapter = class {
801
- type = "claude-code";
802
- name = "Claude Code";
803
- skillsDir = ".claude/skills";
804
- configFile = "AGENTS.md";
805
- generateConfig(skills) {
806
- const enabledSkills = skills.filter((s) => s.enabled);
807
- if (enabledSkills.length === 0) {
808
- return "";
809
- }
810
- const skillsXml = enabledSkills.map(createSkillXml).join("\n\n");
811
- return `<skills_system priority="1">
782
+ import { existsSync as existsSync6 } from "fs";
783
+ import { join as join6 } from "path";
784
+ import { homedir as homedir2 } from "os";
785
+ var ClaudeCodeAdapter;
786
+ var init_claude_code = __esm({
787
+ "src/agents/claude-code.ts"() {
788
+ "use strict";
789
+ init_base2();
790
+ ClaudeCodeAdapter = class {
791
+ type = "claude-code";
792
+ name = "Claude Code";
793
+ skillsDir = ".claude/skills";
794
+ configFile = "AGENTS.md";
795
+ generateConfig(skills) {
796
+ const enabledSkills = skills.filter((s) => s.enabled);
797
+ if (enabledSkills.length === 0) {
798
+ return "";
799
+ }
800
+ const skillsXml = enabledSkills.map(createSkillXml).join("\n\n");
801
+ return `<skills_system priority="1">
812
802
 
813
803
  ## Available Skills
814
804
 
@@ -835,43 +825,50 @@ ${skillsXml}
835
825
  <!-- SKILLS_TABLE_END -->
836
826
 
837
827
  </skills_system>`;
828
+ }
829
+ parseConfig(content) {
830
+ const skillNames = [];
831
+ const skillRegex = /<name>([^<]+)<\/name>/g;
832
+ let match;
833
+ while ((match = skillRegex.exec(content)) !== null) {
834
+ skillNames.push(match[1].trim());
835
+ }
836
+ return skillNames;
837
+ }
838
+ getInvokeCommand(skillName) {
839
+ return `skillkit read ${skillName}`;
840
+ }
841
+ async isDetected() {
842
+ const projectClaude = join6(process.cwd(), ".claude");
843
+ const globalClaude = join6(homedir2(), ".claude");
844
+ const claudeMd = join6(process.cwd(), "CLAUDE.md");
845
+ return existsSync6(projectClaude) || existsSync6(globalClaude) || existsSync6(claudeMd);
846
+ }
847
+ };
838
848
  }
839
- parseConfig(content) {
840
- const skillNames = [];
841
- const skillRegex = /<name>([^<]+)<\/name>/g;
842
- let match;
843
- while ((match = skillRegex.exec(content)) !== null) {
844
- skillNames.push(match[1].trim());
845
- }
846
- return skillNames;
847
- }
848
- getInvokeCommand(skillName) {
849
- return `skillkit read ${skillName}`;
850
- }
851
- async isDetected() {
852
- const projectClaude = join6(process.cwd(), ".claude");
853
- const globalClaude = join6(homedir2(), ".claude");
854
- const claudeMd = join6(process.cwd(), "CLAUDE.md");
855
- return existsSync6(projectClaude) || existsSync6(globalClaude) || existsSync6(claudeMd);
856
- }
857
- };
849
+ });
858
850
 
859
851
  // src/agents/cursor.ts
860
852
  import { existsSync as existsSync7 } from "fs";
861
853
  import { join as join7 } from "path";
862
- var CursorAdapter = class {
863
- type = "cursor";
864
- name = "Cursor";
865
- skillsDir = ".cursor/skills";
866
- configFile = ".cursorrules";
867
- generateConfig(skills) {
868
- const enabledSkills = skills.filter((s) => s.enabled);
869
- if (enabledSkills.length === 0) {
870
- return "";
871
- }
872
- const skillsList = enabledSkills.map((s) => `- **${s.name}**: ${s.description}`).join("\n");
873
- const skillsXml = enabledSkills.map(createSkillXml).join("\n\n");
874
- return `# Skills System
854
+ var CursorAdapter;
855
+ var init_cursor = __esm({
856
+ "src/agents/cursor.ts"() {
857
+ "use strict";
858
+ init_base2();
859
+ CursorAdapter = class {
860
+ type = "cursor";
861
+ name = "Cursor";
862
+ skillsDir = ".cursor/skills";
863
+ configFile = ".cursorrules";
864
+ generateConfig(skills) {
865
+ const enabledSkills = skills.filter((s) => s.enabled);
866
+ if (enabledSkills.length === 0) {
867
+ return "";
868
+ }
869
+ const skillsList = enabledSkills.map((s) => `- **${s.name}**: ${s.description}`).join("\n");
870
+ const skillsXml = enabledSkills.map(createSkillXml).join("\n\n");
871
+ return `# Skills System
875
872
 
876
873
  You have access to specialized skills that can help complete tasks. Use the skillkit CLI to load skill instructions when needed.
877
874
 
@@ -892,42 +889,48 @@ The skill will provide detailed instructions for completing the task.
892
889
  ${skillsXml}
893
890
  <!-- SKILLS_DATA_END -->
894
891
  `;
892
+ }
893
+ parseConfig(content) {
894
+ const skillNames = [];
895
+ const skillRegex = /<name>([^<]+)<\/name>/g;
896
+ let match;
897
+ while ((match = skillRegex.exec(content)) !== null) {
898
+ skillNames.push(match[1].trim());
899
+ }
900
+ return skillNames;
901
+ }
902
+ getInvokeCommand(skillName) {
903
+ return `skillkit read ${skillName}`;
904
+ }
905
+ async isDetected() {
906
+ const cursorRules = join7(process.cwd(), ".cursorrules");
907
+ const cursorDir = join7(process.cwd(), ".cursor");
908
+ return existsSync7(cursorRules) || existsSync7(cursorDir);
909
+ }
910
+ };
895
911
  }
896
- parseConfig(content) {
897
- const skillNames = [];
898
- const skillRegex = /<name>([^<]+)<\/name>/g;
899
- let match;
900
- while ((match = skillRegex.exec(content)) !== null) {
901
- skillNames.push(match[1].trim());
902
- }
903
- return skillNames;
904
- }
905
- getInvokeCommand(skillName) {
906
- return `skillkit read ${skillName}`;
907
- }
908
- async isDetected() {
909
- const cursorRules = join7(process.cwd(), ".cursorrules");
910
- const cursorDir = join7(process.cwd(), ".cursor");
911
- return existsSync7(cursorRules) || existsSync7(cursorDir);
912
- }
913
- };
912
+ });
914
913
 
915
914
  // src/agents/codex.ts
916
915
  import { existsSync as existsSync8 } from "fs";
917
916
  import { join as join8 } from "path";
918
917
  import { homedir as homedir3 } from "os";
919
- var CodexAdapter = class {
920
- type = "codex";
921
- name = "OpenAI Codex CLI";
922
- skillsDir = ".codex/skills";
923
- configFile = "AGENTS.md";
924
- generateConfig(skills) {
925
- const enabledSkills = skills.filter((s) => s.enabled);
926
- if (enabledSkills.length === 0) {
927
- return "";
928
- }
929
- const skillsList = enabledSkills.map((s) => `| ${s.name} | ${s.description} | \`skillkit read ${s.name}\` |`).join("\n");
930
- return `# Skills
918
+ var CodexAdapter;
919
+ var init_codex = __esm({
920
+ "src/agents/codex.ts"() {
921
+ "use strict";
922
+ CodexAdapter = class {
923
+ type = "codex";
924
+ name = "OpenAI Codex CLI";
925
+ skillsDir = ".codex/skills";
926
+ configFile = "AGENTS.md";
927
+ generateConfig(skills) {
928
+ const enabledSkills = skills.filter((s) => s.enabled);
929
+ if (enabledSkills.length === 0) {
930
+ return "";
931
+ }
932
+ const skillsList = enabledSkills.map((s) => `| ${s.name} | ${s.description} | \`skillkit read ${s.name}\` |`).join("\n");
933
+ return `# Skills
931
934
 
932
935
  You have access to specialized skills for completing complex tasks.
933
936
 
@@ -945,50 +948,56 @@ skillkit read <skill-name>
945
948
 
946
949
  Skills are loaded on-demand to keep context clean. Only load skills when relevant to the current task.
947
950
  `;
948
- }
949
- parseConfig(content) {
950
- const skillNames = [];
951
- const tableRegex = /^\|\s*([a-z0-9-]+)\s*\|/gm;
952
- let match;
953
- while ((match = tableRegex.exec(content)) !== null) {
954
- const name = match[1].trim();
955
- if (name && name !== "Skill" && name !== "-------") {
956
- skillNames.push(name);
957
951
  }
958
- }
959
- return skillNames;
960
- }
961
- getInvokeCommand(skillName) {
962
- return `skillkit read ${skillName}`;
963
- }
964
- async isDetected() {
965
- const codexDir = join8(process.cwd(), ".codex");
966
- const globalCodex = join8(homedir3(), ".codex");
967
- return existsSync8(codexDir) || existsSync8(globalCodex);
952
+ parseConfig(content) {
953
+ const skillNames = [];
954
+ const tableRegex = /^\|\s*([a-z0-9-]+)\s*\|/gm;
955
+ let match;
956
+ while ((match = tableRegex.exec(content)) !== null) {
957
+ const name = match[1].trim();
958
+ if (name && name !== "Skill" && name !== "-------") {
959
+ skillNames.push(name);
960
+ }
961
+ }
962
+ return skillNames;
963
+ }
964
+ getInvokeCommand(skillName) {
965
+ return `skillkit read ${skillName}`;
966
+ }
967
+ async isDetected() {
968
+ const codexDir = join8(process.cwd(), ".codex");
969
+ const globalCodex = join8(homedir3(), ".codex");
970
+ return existsSync8(codexDir) || existsSync8(globalCodex);
971
+ }
972
+ };
968
973
  }
969
- };
974
+ });
970
975
 
971
976
  // src/agents/gemini-cli.ts
972
977
  import { existsSync as existsSync9 } from "fs";
973
978
  import { join as join9 } from "path";
974
979
  import { homedir as homedir4 } from "os";
975
- var GeminiCliAdapter = class {
976
- type = "gemini-cli";
977
- name = "Gemini CLI";
978
- skillsDir = ".gemini/skills";
979
- configFile = "GEMINI.md";
980
- generateConfig(skills) {
981
- const enabledSkills = skills.filter((s) => s.enabled);
982
- if (enabledSkills.length === 0) {
983
- return "";
984
- }
985
- const skillsJson = enabledSkills.map((s) => ({
986
- name: s.name,
987
- description: s.description,
988
- invoke: `skillkit read ${s.name}`,
989
- location: s.location
990
- }));
991
- return `# Skills Configuration
980
+ var GeminiCliAdapter;
981
+ var init_gemini_cli = __esm({
982
+ "src/agents/gemini-cli.ts"() {
983
+ "use strict";
984
+ GeminiCliAdapter = class {
985
+ type = "gemini-cli";
986
+ name = "Gemini CLI";
987
+ skillsDir = ".gemini/skills";
988
+ configFile = "GEMINI.md";
989
+ generateConfig(skills) {
990
+ const enabledSkills = skills.filter((s) => s.enabled);
991
+ if (enabledSkills.length === 0) {
992
+ return "";
993
+ }
994
+ const skillsJson = enabledSkills.map((s) => ({
995
+ name: s.name,
996
+ description: s.description,
997
+ invoke: `skillkit read ${s.name}`,
998
+ location: s.location
999
+ }));
1000
+ return `# Skills Configuration
992
1001
 
993
1002
  You have access to specialized skills that extend your capabilities.
994
1003
 
@@ -1011,57 +1020,64 @@ ${JSON.stringify(skillsJson, null, 2)}
1011
1020
  2. Skills provide step-by-step instructions for complex tasks
1012
1021
  3. Each skill is self-contained with its own resources
1013
1022
  `;
1014
- }
1015
- parseConfig(content) {
1016
- const skillNames = [];
1017
- const jsonMatch = content.match(/```json\s*([\s\S]*?)```/);
1018
- if (jsonMatch) {
1019
- try {
1020
- const skills = JSON.parse(jsonMatch[1]);
1021
- if (Array.isArray(skills)) {
1022
- skills.forEach((s) => {
1023
- if (s.name) skillNames.push(s.name);
1024
- });
1023
+ }
1024
+ parseConfig(content) {
1025
+ const skillNames = [];
1026
+ const jsonMatch = content.match(/```json\s*([\s\S]*?)```/);
1027
+ if (jsonMatch) {
1028
+ try {
1029
+ const skills = JSON.parse(jsonMatch[1]);
1030
+ if (Array.isArray(skills)) {
1031
+ skills.forEach((s) => {
1032
+ if (s.name) skillNames.push(s.name);
1033
+ });
1034
+ }
1035
+ } catch {
1036
+ }
1025
1037
  }
1026
- } catch {
1038
+ if (skillNames.length === 0) {
1039
+ const headerRegex = /^### ([a-z0-9-]+)$/gm;
1040
+ let match;
1041
+ while ((match = headerRegex.exec(content)) !== null) {
1042
+ skillNames.push(match[1].trim());
1043
+ }
1044
+ }
1045
+ return skillNames;
1027
1046
  }
1028
- }
1029
- if (skillNames.length === 0) {
1030
- const headerRegex = /^### ([a-z0-9-]+)$/gm;
1031
- let match;
1032
- while ((match = headerRegex.exec(content)) !== null) {
1033
- skillNames.push(match[1].trim());
1047
+ getInvokeCommand(skillName) {
1048
+ return `skillkit read ${skillName}`;
1034
1049
  }
1035
- }
1036
- return skillNames;
1037
- }
1038
- getInvokeCommand(skillName) {
1039
- return `skillkit read ${skillName}`;
1040
- }
1041
- async isDetected() {
1042
- const geminiMd = join9(process.cwd(), "GEMINI.md");
1043
- const geminiDir = join9(process.cwd(), ".gemini");
1044
- const globalGemini = join9(homedir4(), ".gemini");
1045
- return existsSync9(geminiMd) || existsSync9(geminiDir) || existsSync9(globalGemini);
1050
+ async isDetected() {
1051
+ const geminiMd = join9(process.cwd(), "GEMINI.md");
1052
+ const geminiDir = join9(process.cwd(), ".gemini");
1053
+ const globalGemini = join9(homedir4(), ".gemini");
1054
+ return existsSync9(geminiMd) || existsSync9(geminiDir) || existsSync9(globalGemini);
1055
+ }
1056
+ };
1046
1057
  }
1047
- };
1058
+ });
1048
1059
 
1049
1060
  // src/agents/opencode.ts
1050
1061
  import { existsSync as existsSync10 } from "fs";
1051
1062
  import { join as join10 } from "path";
1052
1063
  import { homedir as homedir5 } from "os";
1053
- var OpenCodeAdapter = class {
1054
- type = "opencode";
1055
- name = "OpenCode";
1056
- skillsDir = ".opencode/skills";
1057
- configFile = "AGENTS.md";
1058
- generateConfig(skills) {
1059
- const enabledSkills = skills.filter((s) => s.enabled);
1060
- if (enabledSkills.length === 0) {
1061
- return "";
1062
- }
1063
- const skillsXml = enabledSkills.map(createSkillXml).join("\n\n");
1064
- return `<!-- SKILLKIT_START -->
1064
+ var OpenCodeAdapter;
1065
+ var init_opencode = __esm({
1066
+ "src/agents/opencode.ts"() {
1067
+ "use strict";
1068
+ init_base2();
1069
+ OpenCodeAdapter = class {
1070
+ type = "opencode";
1071
+ name = "OpenCode";
1072
+ skillsDir = ".opencode/skills";
1073
+ configFile = "AGENTS.md";
1074
+ generateConfig(skills) {
1075
+ const enabledSkills = skills.filter((s) => s.enabled);
1076
+ if (enabledSkills.length === 0) {
1077
+ return "";
1078
+ }
1079
+ const skillsXml = enabledSkills.map(createSkillXml).join("\n\n");
1080
+ return `<!-- SKILLKIT_START -->
1065
1081
  # Skills
1066
1082
 
1067
1083
  The following skills are available to help complete tasks:
@@ -1081,44 +1097,50 @@ skillkit read <skill-name>
1081
1097
  This loads the skill's instructions into context.
1082
1098
 
1083
1099
  <!-- SKILLKIT_END -->`;
1100
+ }
1101
+ parseConfig(content) {
1102
+ const skillNames = [];
1103
+ const skillRegex = /<name>([^<]+)<\/name>/g;
1104
+ let match;
1105
+ while ((match = skillRegex.exec(content)) !== null) {
1106
+ skillNames.push(match[1].trim());
1107
+ }
1108
+ return skillNames;
1109
+ }
1110
+ getInvokeCommand(skillName) {
1111
+ return `skillkit read ${skillName}`;
1112
+ }
1113
+ async isDetected() {
1114
+ const opencodeDir = join10(process.cwd(), ".opencode");
1115
+ const globalOpencode = join10(homedir5(), ".opencode");
1116
+ return existsSync10(opencodeDir) || existsSync10(globalOpencode);
1117
+ }
1118
+ };
1084
1119
  }
1085
- parseConfig(content) {
1086
- const skillNames = [];
1087
- const skillRegex = /<name>([^<]+)<\/name>/g;
1088
- let match;
1089
- while ((match = skillRegex.exec(content)) !== null) {
1090
- skillNames.push(match[1].trim());
1091
- }
1092
- return skillNames;
1093
- }
1094
- getInvokeCommand(skillName) {
1095
- return `skillkit read ${skillName}`;
1096
- }
1097
- async isDetected() {
1098
- const opencodeDir = join10(process.cwd(), ".opencode");
1099
- const globalOpencode = join10(homedir5(), ".opencode");
1100
- return existsSync10(opencodeDir) || existsSync10(globalOpencode);
1101
- }
1102
- };
1120
+ });
1103
1121
 
1104
1122
  // src/agents/antigravity.ts
1105
1123
  import { existsSync as existsSync11 } from "fs";
1106
1124
  import { join as join11 } from "path";
1107
1125
  import { homedir as homedir6 } from "os";
1108
- var AntigravityAdapter = class {
1109
- type = "antigravity";
1110
- name = "Antigravity";
1111
- skillsDir = ".antigravity/skills";
1112
- configFile = "AGENTS.md";
1113
- generateConfig(skills) {
1114
- const enabledSkills = skills.filter((s) => s.enabled);
1115
- if (enabledSkills.length === 0) {
1116
- return "";
1117
- }
1118
- const skillsYaml = enabledSkills.map((s) => ` - name: ${s.name}
1126
+ var AntigravityAdapter;
1127
+ var init_antigravity = __esm({
1128
+ "src/agents/antigravity.ts"() {
1129
+ "use strict";
1130
+ AntigravityAdapter = class {
1131
+ type = "antigravity";
1132
+ name = "Antigravity";
1133
+ skillsDir = ".antigravity/skills";
1134
+ configFile = "AGENTS.md";
1135
+ generateConfig(skills) {
1136
+ const enabledSkills = skills.filter((s) => s.enabled);
1137
+ if (enabledSkills.length === 0) {
1138
+ return "";
1139
+ }
1140
+ const skillsYaml = enabledSkills.map((s) => ` - name: ${s.name}
1119
1141
  description: "${s.description}"
1120
1142
  invoke: skillkit read ${s.name}`).join("\n");
1121
- return `# Antigravity Skills Configuration
1143
+ return `# Antigravity Skills Configuration
1122
1144
 
1123
1145
  <!-- skills:
1124
1146
  ${skillsYaml}
@@ -1139,53 +1161,60 @@ ${s.description}
1139
1161
  2. Load a skill when the current task matches its description
1140
1162
  3. Skills are loaded on-demand to preserve context window
1141
1163
  `;
1142
- }
1143
- parseConfig(content) {
1144
- const skillNames = [];
1145
- const yamlMatch = content.match(/<!-- skills:\s*([\s\S]*?)-->/);
1146
- if (yamlMatch) {
1147
- const nameRegex = /name:\s*([a-z0-9-]+)/g;
1148
- let match;
1149
- while ((match = nameRegex.exec(yamlMatch[1])) !== null) {
1150
- skillNames.push(match[1].trim());
1151
1164
  }
1152
- }
1153
- if (skillNames.length === 0) {
1154
- const headerRegex = /^### ([a-z0-9-]+)$/gm;
1155
- let match;
1156
- while ((match = headerRegex.exec(content)) !== null) {
1157
- skillNames.push(match[1].trim());
1165
+ parseConfig(content) {
1166
+ const skillNames = [];
1167
+ const yamlMatch = content.match(/<!-- skills:\s*([\s\S]*?)-->/);
1168
+ if (yamlMatch) {
1169
+ const nameRegex = /name:\s*([a-z0-9-]+)/g;
1170
+ let match;
1171
+ while ((match = nameRegex.exec(yamlMatch[1])) !== null) {
1172
+ skillNames.push(match[1].trim());
1173
+ }
1174
+ }
1175
+ if (skillNames.length === 0) {
1176
+ const headerRegex = /^### ([a-z0-9-]+)$/gm;
1177
+ let match;
1178
+ while ((match = headerRegex.exec(content)) !== null) {
1179
+ skillNames.push(match[1].trim());
1180
+ }
1181
+ }
1182
+ return skillNames;
1158
1183
  }
1159
- }
1160
- return skillNames;
1161
- }
1162
- getInvokeCommand(skillName) {
1163
- return `skillkit read ${skillName}`;
1164
- }
1165
- async isDetected() {
1166
- const agDir = join11(process.cwd(), ".antigravity");
1167
- const globalAg = join11(homedir6(), ".antigravity");
1168
- return existsSync11(agDir) || existsSync11(globalAg);
1184
+ getInvokeCommand(skillName) {
1185
+ return `skillkit read ${skillName}`;
1186
+ }
1187
+ async isDetected() {
1188
+ const agDir = join11(process.cwd(), ".antigravity");
1189
+ const globalAg = join11(homedir6(), ".antigravity");
1190
+ return existsSync11(agDir) || existsSync11(globalAg);
1191
+ }
1192
+ };
1169
1193
  }
1170
- };
1194
+ });
1171
1195
 
1172
1196
  // src/agents/amp.ts
1173
1197
  import { existsSync as existsSync12 } from "fs";
1174
1198
  import { join as join12 } from "path";
1175
1199
  import { homedir as homedir7 } from "os";
1176
- var AmpAdapter = class {
1177
- type = "amp";
1178
- name = "Amp";
1179
- skillsDir = ".agents/skills";
1180
- configFile = "AGENTS.md";
1181
- globalSkillsDir = join12(homedir7(), ".config", "agents", "skills");
1182
- generateConfig(skills) {
1183
- const enabledSkills = skills.filter((s) => s.enabled);
1184
- if (enabledSkills.length === 0) {
1185
- return "";
1186
- }
1187
- const skillsXml = enabledSkills.map(createSkillXml).join("\n\n");
1188
- return `<skills_system priority="1">
1200
+ var AmpAdapter;
1201
+ var init_amp = __esm({
1202
+ "src/agents/amp.ts"() {
1203
+ "use strict";
1204
+ init_base2();
1205
+ AmpAdapter = class {
1206
+ type = "amp";
1207
+ name = "Amp";
1208
+ skillsDir = ".agents/skills";
1209
+ configFile = "AGENTS.md";
1210
+ globalSkillsDir = join12(homedir7(), ".config", "agents", "skills");
1211
+ generateConfig(skills) {
1212
+ const enabledSkills = skills.filter((s) => s.enabled);
1213
+ if (enabledSkills.length === 0) {
1214
+ return "";
1215
+ }
1216
+ const skillsXml = enabledSkills.map(createSkillXml).join("\n\n");
1217
+ return `<skills_system priority="1">
1189
1218
 
1190
1219
  ## Available Skills
1191
1220
 
@@ -1212,43 +1241,50 @@ ${skillsXml}
1212
1241
  <!-- SKILLS_TABLE_END -->
1213
1242
 
1214
1243
  </skills_system>`;
1244
+ }
1245
+ parseConfig(content) {
1246
+ const skillNames = [];
1247
+ const skillRegex = /<name>([^<]+)<\/name>/g;
1248
+ let match;
1249
+ while ((match = skillRegex.exec(content)) !== null) {
1250
+ skillNames.push(match[1].trim());
1251
+ }
1252
+ return skillNames;
1253
+ }
1254
+ getInvokeCommand(skillName) {
1255
+ return `skillkit read ${skillName}`;
1256
+ }
1257
+ async isDetected() {
1258
+ const projectAgents = join12(process.cwd(), ".agents");
1259
+ const globalAgents = join12(homedir7(), ".config", "agents");
1260
+ return existsSync12(projectAgents) || existsSync12(globalAgents);
1261
+ }
1262
+ };
1215
1263
  }
1216
- parseConfig(content) {
1217
- const skillNames = [];
1218
- const skillRegex = /<name>([^<]+)<\/name>/g;
1219
- let match;
1220
- while ((match = skillRegex.exec(content)) !== null) {
1221
- skillNames.push(match[1].trim());
1222
- }
1223
- return skillNames;
1224
- }
1225
- getInvokeCommand(skillName) {
1226
- return `skillkit read ${skillName}`;
1227
- }
1228
- async isDetected() {
1229
- const projectAgents = join12(process.cwd(), ".agents");
1230
- const globalAgents = join12(homedir7(), ".config", "agents");
1231
- return existsSync12(projectAgents) || existsSync12(globalAgents);
1232
- }
1233
- };
1264
+ });
1234
1265
 
1235
1266
  // src/agents/clawdbot.ts
1236
1267
  import { existsSync as existsSync13 } from "fs";
1237
1268
  import { join as join13 } from "path";
1238
1269
  import { homedir as homedir8 } from "os";
1239
- var ClawdbotAdapter = class {
1240
- type = "clawdbot";
1241
- name = "Clawdbot";
1242
- skillsDir = "skills";
1243
- configFile = "AGENTS.md";
1244
- globalSkillsDir = join13(homedir8(), ".clawdbot", "skills");
1245
- generateConfig(skills) {
1246
- const enabledSkills = skills.filter((s) => s.enabled);
1247
- if (enabledSkills.length === 0) {
1248
- return "";
1249
- }
1250
- const skillsXml = enabledSkills.map(createSkillXml).join("\n\n");
1251
- return `<skills_system priority="1">
1270
+ var ClawdbotAdapter;
1271
+ var init_clawdbot = __esm({
1272
+ "src/agents/clawdbot.ts"() {
1273
+ "use strict";
1274
+ init_base2();
1275
+ ClawdbotAdapter = class {
1276
+ type = "clawdbot";
1277
+ name = "Clawdbot";
1278
+ skillsDir = "skills";
1279
+ configFile = "AGENTS.md";
1280
+ globalSkillsDir = join13(homedir8(), ".clawdbot", "skills");
1281
+ generateConfig(skills) {
1282
+ const enabledSkills = skills.filter((s) => s.enabled);
1283
+ if (enabledSkills.length === 0) {
1284
+ return "";
1285
+ }
1286
+ const skillsXml = enabledSkills.map(createSkillXml).join("\n\n");
1287
+ return `<skills_system priority="1">
1252
1288
 
1253
1289
  ## Available Skills
1254
1290
 
@@ -1275,43 +1311,50 @@ ${skillsXml}
1275
1311
  <!-- SKILLS_TABLE_END -->
1276
1312
 
1277
1313
  </skills_system>`;
1314
+ }
1315
+ parseConfig(content) {
1316
+ const skillNames = [];
1317
+ const skillRegex = /<name>([^<]+)<\/name>/g;
1318
+ let match;
1319
+ while ((match = skillRegex.exec(content)) !== null) {
1320
+ skillNames.push(match[1].trim());
1321
+ }
1322
+ return skillNames;
1323
+ }
1324
+ getInvokeCommand(skillName) {
1325
+ return `skillkit read ${skillName}`;
1326
+ }
1327
+ async isDetected() {
1328
+ const projectSkills = join13(process.cwd(), "skills");
1329
+ const globalClawdbot = join13(homedir8(), ".clawdbot");
1330
+ return existsSync13(globalClawdbot) || existsSync13(projectSkills) && existsSync13(join13(process.cwd(), ".clawdbot"));
1331
+ }
1332
+ };
1278
1333
  }
1279
- parseConfig(content) {
1280
- const skillNames = [];
1281
- const skillRegex = /<name>([^<]+)<\/name>/g;
1282
- let match;
1283
- while ((match = skillRegex.exec(content)) !== null) {
1284
- skillNames.push(match[1].trim());
1285
- }
1286
- return skillNames;
1287
- }
1288
- getInvokeCommand(skillName) {
1289
- return `skillkit read ${skillName}`;
1290
- }
1291
- async isDetected() {
1292
- const projectSkills = join13(process.cwd(), "skills");
1293
- const globalClawdbot = join13(homedir8(), ".clawdbot");
1294
- return existsSync13(globalClawdbot) || existsSync13(projectSkills) && existsSync13(join13(process.cwd(), ".clawdbot"));
1295
- }
1296
- };
1334
+ });
1297
1335
 
1298
1336
  // src/agents/droid.ts
1299
1337
  import { existsSync as existsSync14 } from "fs";
1300
1338
  import { join as join14 } from "path";
1301
1339
  import { homedir as homedir9 } from "os";
1302
- var DroidAdapter = class {
1303
- type = "droid";
1304
- name = "Droid (Factory)";
1305
- skillsDir = ".factory/skills";
1306
- configFile = "AGENTS.md";
1307
- globalSkillsDir = join14(homedir9(), ".factory", "skills");
1308
- generateConfig(skills) {
1309
- const enabledSkills = skills.filter((s) => s.enabled);
1310
- if (enabledSkills.length === 0) {
1311
- return "";
1312
- }
1313
- const skillsXml = enabledSkills.map(createSkillXml).join("\n\n");
1314
- return `<skills_system priority="1">
1340
+ var DroidAdapter;
1341
+ var init_droid = __esm({
1342
+ "src/agents/droid.ts"() {
1343
+ "use strict";
1344
+ init_base2();
1345
+ DroidAdapter = class {
1346
+ type = "droid";
1347
+ name = "Droid (Factory)";
1348
+ skillsDir = ".factory/skills";
1349
+ configFile = "AGENTS.md";
1350
+ globalSkillsDir = join14(homedir9(), ".factory", "skills");
1351
+ generateConfig(skills) {
1352
+ const enabledSkills = skills.filter((s) => s.enabled);
1353
+ if (enabledSkills.length === 0) {
1354
+ return "";
1355
+ }
1356
+ const skillsXml = enabledSkills.map(createSkillXml).join("\n\n");
1357
+ return `<skills_system priority="1">
1315
1358
 
1316
1359
  ## Available Skills
1317
1360
 
@@ -1338,43 +1381,50 @@ ${skillsXml}
1338
1381
  <!-- SKILLS_TABLE_END -->
1339
1382
 
1340
1383
  </skills_system>`;
1384
+ }
1385
+ parseConfig(content) {
1386
+ const skillNames = [];
1387
+ const skillRegex = /<name>([^<]+)<\/name>/g;
1388
+ let match;
1389
+ while ((match = skillRegex.exec(content)) !== null) {
1390
+ skillNames.push(match[1].trim());
1391
+ }
1392
+ return skillNames;
1393
+ }
1394
+ getInvokeCommand(skillName) {
1395
+ return `skillkit read ${skillName}`;
1396
+ }
1397
+ async isDetected() {
1398
+ const projectFactory = join14(process.cwd(), ".factory");
1399
+ const globalFactory = join14(homedir9(), ".factory");
1400
+ return existsSync14(projectFactory) || existsSync14(globalFactory);
1401
+ }
1402
+ };
1341
1403
  }
1342
- parseConfig(content) {
1343
- const skillNames = [];
1344
- const skillRegex = /<name>([^<]+)<\/name>/g;
1345
- let match;
1346
- while ((match = skillRegex.exec(content)) !== null) {
1347
- skillNames.push(match[1].trim());
1348
- }
1349
- return skillNames;
1350
- }
1351
- getInvokeCommand(skillName) {
1352
- return `skillkit read ${skillName}`;
1353
- }
1354
- async isDetected() {
1355
- const projectFactory = join14(process.cwd(), ".factory");
1356
- const globalFactory = join14(homedir9(), ".factory");
1357
- return existsSync14(projectFactory) || existsSync14(globalFactory);
1358
- }
1359
- };
1404
+ });
1360
1405
 
1361
1406
  // src/agents/github-copilot.ts
1362
1407
  import { existsSync as existsSync15 } from "fs";
1363
1408
  import { join as join15 } from "path";
1364
1409
  import { homedir as homedir10 } from "os";
1365
- var GitHubCopilotAdapter = class {
1366
- type = "github-copilot";
1367
- name = "GitHub Copilot";
1368
- skillsDir = ".github/skills";
1369
- configFile = "AGENTS.md";
1370
- globalSkillsDir = join15(homedir10(), ".copilot", "skills");
1371
- generateConfig(skills) {
1372
- const enabledSkills = skills.filter((s) => s.enabled);
1373
- if (enabledSkills.length === 0) {
1374
- return "";
1375
- }
1376
- const skillsXml = enabledSkills.map(createSkillXml).join("\n\n");
1377
- return `<skills_system priority="1">
1410
+ var GitHubCopilotAdapter;
1411
+ var init_github_copilot = __esm({
1412
+ "src/agents/github-copilot.ts"() {
1413
+ "use strict";
1414
+ init_base2();
1415
+ GitHubCopilotAdapter = class {
1416
+ type = "github-copilot";
1417
+ name = "GitHub Copilot";
1418
+ skillsDir = ".github/skills";
1419
+ configFile = "AGENTS.md";
1420
+ globalSkillsDir = join15(homedir10(), ".copilot", "skills");
1421
+ generateConfig(skills) {
1422
+ const enabledSkills = skills.filter((s) => s.enabled);
1423
+ if (enabledSkills.length === 0) {
1424
+ return "";
1425
+ }
1426
+ const skillsXml = enabledSkills.map(createSkillXml).join("\n\n");
1427
+ return `<skills_system priority="1">
1378
1428
 
1379
1429
  ## Available Skills
1380
1430
 
@@ -1401,43 +1451,50 @@ ${skillsXml}
1401
1451
  <!-- SKILLS_TABLE_END -->
1402
1452
 
1403
1453
  </skills_system>`;
1454
+ }
1455
+ parseConfig(content) {
1456
+ const skillNames = [];
1457
+ const skillRegex = /<name>([^<]+)<\/name>/g;
1458
+ let match;
1459
+ while ((match = skillRegex.exec(content)) !== null) {
1460
+ skillNames.push(match[1].trim());
1461
+ }
1462
+ return skillNames;
1463
+ }
1464
+ getInvokeCommand(skillName) {
1465
+ return `skillkit read ${skillName}`;
1466
+ }
1467
+ async isDetected() {
1468
+ const projectGithub = join15(process.cwd(), ".github", "skills");
1469
+ const globalCopilot = join15(homedir10(), ".copilot");
1470
+ return existsSync15(projectGithub) || existsSync15(globalCopilot);
1471
+ }
1472
+ };
1404
1473
  }
1405
- parseConfig(content) {
1406
- const skillNames = [];
1407
- const skillRegex = /<name>([^<]+)<\/name>/g;
1408
- let match;
1409
- while ((match = skillRegex.exec(content)) !== null) {
1410
- skillNames.push(match[1].trim());
1411
- }
1412
- return skillNames;
1413
- }
1414
- getInvokeCommand(skillName) {
1415
- return `skillkit read ${skillName}`;
1416
- }
1417
- async isDetected() {
1418
- const projectGithub = join15(process.cwd(), ".github", "skills");
1419
- const globalCopilot = join15(homedir10(), ".copilot");
1420
- return existsSync15(projectGithub) || existsSync15(globalCopilot);
1421
- }
1422
- };
1474
+ });
1423
1475
 
1424
1476
  // src/agents/goose.ts
1425
1477
  import { existsSync as existsSync16 } from "fs";
1426
1478
  import { join as join16 } from "path";
1427
1479
  import { homedir as homedir11 } from "os";
1428
- var GooseAdapter = class {
1429
- type = "goose";
1430
- name = "Goose";
1431
- skillsDir = ".goose/skills";
1432
- configFile = "AGENTS.md";
1433
- globalSkillsDir = join16(homedir11(), ".config", "goose", "skills");
1434
- generateConfig(skills) {
1435
- const enabledSkills = skills.filter((s) => s.enabled);
1436
- if (enabledSkills.length === 0) {
1437
- return "";
1438
- }
1439
- const skillsXml = enabledSkills.map(createSkillXml).join("\n\n");
1440
- return `<skills_system priority="1">
1480
+ var GooseAdapter;
1481
+ var init_goose = __esm({
1482
+ "src/agents/goose.ts"() {
1483
+ "use strict";
1484
+ init_base2();
1485
+ GooseAdapter = class {
1486
+ type = "goose";
1487
+ name = "Goose";
1488
+ skillsDir = ".goose/skills";
1489
+ configFile = "AGENTS.md";
1490
+ globalSkillsDir = join16(homedir11(), ".config", "goose", "skills");
1491
+ generateConfig(skills) {
1492
+ const enabledSkills = skills.filter((s) => s.enabled);
1493
+ if (enabledSkills.length === 0) {
1494
+ return "";
1495
+ }
1496
+ const skillsXml = enabledSkills.map(createSkillXml).join("\n\n");
1497
+ return `<skills_system priority="1">
1441
1498
 
1442
1499
  ## Available Skills
1443
1500
 
@@ -1464,43 +1521,50 @@ ${skillsXml}
1464
1521
  <!-- SKILLS_TABLE_END -->
1465
1522
 
1466
1523
  </skills_system>`;
1524
+ }
1525
+ parseConfig(content) {
1526
+ const skillNames = [];
1527
+ const skillRegex = /<name>([^<]+)<\/name>/g;
1528
+ let match;
1529
+ while ((match = skillRegex.exec(content)) !== null) {
1530
+ skillNames.push(match[1].trim());
1531
+ }
1532
+ return skillNames;
1533
+ }
1534
+ getInvokeCommand(skillName) {
1535
+ return `skillkit read ${skillName}`;
1536
+ }
1537
+ async isDetected() {
1538
+ const projectGoose = join16(process.cwd(), ".goose");
1539
+ const globalGoose = join16(homedir11(), ".config", "goose");
1540
+ return existsSync16(projectGoose) || existsSync16(globalGoose);
1541
+ }
1542
+ };
1467
1543
  }
1468
- parseConfig(content) {
1469
- const skillNames = [];
1470
- const skillRegex = /<name>([^<]+)<\/name>/g;
1471
- let match;
1472
- while ((match = skillRegex.exec(content)) !== null) {
1473
- skillNames.push(match[1].trim());
1474
- }
1475
- return skillNames;
1476
- }
1477
- getInvokeCommand(skillName) {
1478
- return `skillkit read ${skillName}`;
1479
- }
1480
- async isDetected() {
1481
- const projectGoose = join16(process.cwd(), ".goose");
1482
- const globalGoose = join16(homedir11(), ".config", "goose");
1483
- return existsSync16(projectGoose) || existsSync16(globalGoose);
1484
- }
1485
- };
1544
+ });
1486
1545
 
1487
1546
  // src/agents/kilo.ts
1488
1547
  import { existsSync as existsSync17 } from "fs";
1489
1548
  import { join as join17 } from "path";
1490
1549
  import { homedir as homedir12 } from "os";
1491
- var KiloAdapter = class {
1492
- type = "kilo";
1493
- name = "Kilo Code";
1494
- skillsDir = ".kilocode/skills";
1495
- configFile = "AGENTS.md";
1496
- globalSkillsDir = join17(homedir12(), ".kilocode", "skills");
1497
- generateConfig(skills) {
1498
- const enabledSkills = skills.filter((s) => s.enabled);
1499
- if (enabledSkills.length === 0) {
1500
- return "";
1501
- }
1502
- const skillsXml = enabledSkills.map(createSkillXml).join("\n\n");
1503
- return `<skills_system priority="1">
1550
+ var KiloAdapter;
1551
+ var init_kilo = __esm({
1552
+ "src/agents/kilo.ts"() {
1553
+ "use strict";
1554
+ init_base2();
1555
+ KiloAdapter = class {
1556
+ type = "kilo";
1557
+ name = "Kilo Code";
1558
+ skillsDir = ".kilocode/skills";
1559
+ configFile = "AGENTS.md";
1560
+ globalSkillsDir = join17(homedir12(), ".kilocode", "skills");
1561
+ generateConfig(skills) {
1562
+ const enabledSkills = skills.filter((s) => s.enabled);
1563
+ if (enabledSkills.length === 0) {
1564
+ return "";
1565
+ }
1566
+ const skillsXml = enabledSkills.map(createSkillXml).join("\n\n");
1567
+ return `<skills_system priority="1">
1504
1568
 
1505
1569
  ## Available Skills
1506
1570
 
@@ -1527,43 +1591,50 @@ ${skillsXml}
1527
1591
  <!-- SKILLS_TABLE_END -->
1528
1592
 
1529
1593
  </skills_system>`;
1594
+ }
1595
+ parseConfig(content) {
1596
+ const skillNames = [];
1597
+ const skillRegex = /<name>([^<]+)<\/name>/g;
1598
+ let match;
1599
+ while ((match = skillRegex.exec(content)) !== null) {
1600
+ skillNames.push(match[1].trim());
1601
+ }
1602
+ return skillNames;
1603
+ }
1604
+ getInvokeCommand(skillName) {
1605
+ return `skillkit read ${skillName}`;
1606
+ }
1607
+ async isDetected() {
1608
+ const projectKilo = join17(process.cwd(), ".kilocode");
1609
+ const globalKilo = join17(homedir12(), ".kilocode");
1610
+ return existsSync17(projectKilo) || existsSync17(globalKilo);
1611
+ }
1612
+ };
1530
1613
  }
1531
- parseConfig(content) {
1532
- const skillNames = [];
1533
- const skillRegex = /<name>([^<]+)<\/name>/g;
1534
- let match;
1535
- while ((match = skillRegex.exec(content)) !== null) {
1536
- skillNames.push(match[1].trim());
1537
- }
1538
- return skillNames;
1539
- }
1540
- getInvokeCommand(skillName) {
1541
- return `skillkit read ${skillName}`;
1542
- }
1543
- async isDetected() {
1544
- const projectKilo = join17(process.cwd(), ".kilocode");
1545
- const globalKilo = join17(homedir12(), ".kilocode");
1546
- return existsSync17(projectKilo) || existsSync17(globalKilo);
1547
- }
1548
- };
1614
+ });
1549
1615
 
1550
1616
  // src/agents/kiro-cli.ts
1551
1617
  import { existsSync as existsSync18 } from "fs";
1552
1618
  import { join as join18 } from "path";
1553
1619
  import { homedir as homedir13 } from "os";
1554
- var KiroCliAdapter = class {
1555
- type = "kiro-cli";
1556
- name = "Kiro CLI";
1557
- skillsDir = ".kiro/skills";
1558
- configFile = "AGENTS.md";
1559
- globalSkillsDir = join18(homedir13(), ".kiro", "skills");
1560
- generateConfig(skills) {
1561
- const enabledSkills = skills.filter((s) => s.enabled);
1562
- if (enabledSkills.length === 0) {
1563
- return "";
1564
- }
1565
- const skillsXml = enabledSkills.map(createSkillXml).join("\n\n");
1566
- return `<skills_system priority="1">
1620
+ var KiroCliAdapter;
1621
+ var init_kiro_cli = __esm({
1622
+ "src/agents/kiro-cli.ts"() {
1623
+ "use strict";
1624
+ init_base2();
1625
+ KiroCliAdapter = class {
1626
+ type = "kiro-cli";
1627
+ name = "Kiro CLI";
1628
+ skillsDir = ".kiro/skills";
1629
+ configFile = "AGENTS.md";
1630
+ globalSkillsDir = join18(homedir13(), ".kiro", "skills");
1631
+ generateConfig(skills) {
1632
+ const enabledSkills = skills.filter((s) => s.enabled);
1633
+ if (enabledSkills.length === 0) {
1634
+ return "";
1635
+ }
1636
+ const skillsXml = enabledSkills.map(createSkillXml).join("\n\n");
1637
+ return `<skills_system priority="1">
1567
1638
 
1568
1639
  ## Available Skills
1569
1640
 
@@ -1600,43 +1671,50 @@ ${skillsXml}
1600
1671
  ]
1601
1672
  }
1602
1673
  \`\`\``;
1674
+ }
1675
+ parseConfig(content) {
1676
+ const skillNames = [];
1677
+ const skillRegex = /<name>([^<]+)<\/name>/g;
1678
+ let match;
1679
+ while ((match = skillRegex.exec(content)) !== null) {
1680
+ skillNames.push(match[1].trim());
1681
+ }
1682
+ return skillNames;
1683
+ }
1684
+ getInvokeCommand(skillName) {
1685
+ return `skillkit read ${skillName}`;
1686
+ }
1687
+ async isDetected() {
1688
+ const projectKiro = join18(process.cwd(), ".kiro");
1689
+ const globalKiro = join18(homedir13(), ".kiro");
1690
+ return existsSync18(projectKiro) || existsSync18(globalKiro);
1691
+ }
1692
+ };
1603
1693
  }
1604
- parseConfig(content) {
1605
- const skillNames = [];
1606
- const skillRegex = /<name>([^<]+)<\/name>/g;
1607
- let match;
1608
- while ((match = skillRegex.exec(content)) !== null) {
1609
- skillNames.push(match[1].trim());
1610
- }
1611
- return skillNames;
1612
- }
1613
- getInvokeCommand(skillName) {
1614
- return `skillkit read ${skillName}`;
1615
- }
1616
- async isDetected() {
1617
- const projectKiro = join18(process.cwd(), ".kiro");
1618
- const globalKiro = join18(homedir13(), ".kiro");
1619
- return existsSync18(projectKiro) || existsSync18(globalKiro);
1620
- }
1621
- };
1694
+ });
1622
1695
 
1623
1696
  // src/agents/roo.ts
1624
1697
  import { existsSync as existsSync19 } from "fs";
1625
1698
  import { join as join19 } from "path";
1626
1699
  import { homedir as homedir14 } from "os";
1627
- var RooAdapter = class {
1628
- type = "roo";
1629
- name = "Roo Code";
1630
- skillsDir = ".roo/skills";
1631
- configFile = "AGENTS.md";
1632
- globalSkillsDir = join19(homedir14(), ".roo", "skills");
1633
- generateConfig(skills) {
1634
- const enabledSkills = skills.filter((s) => s.enabled);
1635
- if (enabledSkills.length === 0) {
1636
- return "";
1637
- }
1638
- const skillsXml = enabledSkills.map(createSkillXml).join("\n\n");
1639
- return `<skills_system priority="1">
1700
+ var RooAdapter;
1701
+ var init_roo = __esm({
1702
+ "src/agents/roo.ts"() {
1703
+ "use strict";
1704
+ init_base2();
1705
+ RooAdapter = class {
1706
+ type = "roo";
1707
+ name = "Roo Code";
1708
+ skillsDir = ".roo/skills";
1709
+ configFile = "AGENTS.md";
1710
+ globalSkillsDir = join19(homedir14(), ".roo", "skills");
1711
+ generateConfig(skills) {
1712
+ const enabledSkills = skills.filter((s) => s.enabled);
1713
+ if (enabledSkills.length === 0) {
1714
+ return "";
1715
+ }
1716
+ const skillsXml = enabledSkills.map(createSkillXml).join("\n\n");
1717
+ return `<skills_system priority="1">
1640
1718
 
1641
1719
  ## Available Skills
1642
1720
 
@@ -1663,43 +1741,50 @@ ${skillsXml}
1663
1741
  <!-- SKILLS_TABLE_END -->
1664
1742
 
1665
1743
  </skills_system>`;
1744
+ }
1745
+ parseConfig(content) {
1746
+ const skillNames = [];
1747
+ const skillRegex = /<name>([^<]+)<\/name>/g;
1748
+ let match;
1749
+ while ((match = skillRegex.exec(content)) !== null) {
1750
+ skillNames.push(match[1].trim());
1751
+ }
1752
+ return skillNames;
1753
+ }
1754
+ getInvokeCommand(skillName) {
1755
+ return `skillkit read ${skillName}`;
1756
+ }
1757
+ async isDetected() {
1758
+ const projectRoo = join19(process.cwd(), ".roo");
1759
+ const globalRoo = join19(homedir14(), ".roo");
1760
+ return existsSync19(projectRoo) || existsSync19(globalRoo);
1761
+ }
1762
+ };
1666
1763
  }
1667
- parseConfig(content) {
1668
- const skillNames = [];
1669
- const skillRegex = /<name>([^<]+)<\/name>/g;
1670
- let match;
1671
- while ((match = skillRegex.exec(content)) !== null) {
1672
- skillNames.push(match[1].trim());
1673
- }
1674
- return skillNames;
1675
- }
1676
- getInvokeCommand(skillName) {
1677
- return `skillkit read ${skillName}`;
1678
- }
1679
- async isDetected() {
1680
- const projectRoo = join19(process.cwd(), ".roo");
1681
- const globalRoo = join19(homedir14(), ".roo");
1682
- return existsSync19(projectRoo) || existsSync19(globalRoo);
1683
- }
1684
- };
1764
+ });
1685
1765
 
1686
1766
  // src/agents/trae.ts
1687
1767
  import { existsSync as existsSync20 } from "fs";
1688
1768
  import { join as join20 } from "path";
1689
1769
  import { homedir as homedir15 } from "os";
1690
- var TraeAdapter = class {
1691
- type = "trae";
1692
- name = "Trae";
1693
- skillsDir = ".trae/skills";
1694
- configFile = "AGENTS.md";
1695
- globalSkillsDir = join20(homedir15(), ".trae", "skills");
1696
- generateConfig(skills) {
1697
- const enabledSkills = skills.filter((s) => s.enabled);
1698
- if (enabledSkills.length === 0) {
1699
- return "";
1700
- }
1701
- const skillsXml = enabledSkills.map(createSkillXml).join("\n\n");
1702
- return `<skills_system priority="1">
1770
+ var TraeAdapter;
1771
+ var init_trae = __esm({
1772
+ "src/agents/trae.ts"() {
1773
+ "use strict";
1774
+ init_base2();
1775
+ TraeAdapter = class {
1776
+ type = "trae";
1777
+ name = "Trae";
1778
+ skillsDir = ".trae/skills";
1779
+ configFile = "AGENTS.md";
1780
+ globalSkillsDir = join20(homedir15(), ".trae", "skills");
1781
+ generateConfig(skills) {
1782
+ const enabledSkills = skills.filter((s) => s.enabled);
1783
+ if (enabledSkills.length === 0) {
1784
+ return "";
1785
+ }
1786
+ const skillsXml = enabledSkills.map(createSkillXml).join("\n\n");
1787
+ return `<skills_system priority="1">
1703
1788
 
1704
1789
  ## Available Skills
1705
1790
 
@@ -1726,43 +1811,50 @@ ${skillsXml}
1726
1811
  <!-- SKILLS_TABLE_END -->
1727
1812
 
1728
1813
  </skills_system>`;
1814
+ }
1815
+ parseConfig(content) {
1816
+ const skillNames = [];
1817
+ const skillRegex = /<name>([^<]+)<\/name>/g;
1818
+ let match;
1819
+ while ((match = skillRegex.exec(content)) !== null) {
1820
+ skillNames.push(match[1].trim());
1821
+ }
1822
+ return skillNames;
1823
+ }
1824
+ getInvokeCommand(skillName) {
1825
+ return `skillkit read ${skillName}`;
1826
+ }
1827
+ async isDetected() {
1828
+ const projectTrae = join20(process.cwd(), ".trae");
1829
+ const globalTrae = join20(homedir15(), ".trae");
1830
+ return existsSync20(projectTrae) || existsSync20(globalTrae);
1831
+ }
1832
+ };
1729
1833
  }
1730
- parseConfig(content) {
1731
- const skillNames = [];
1732
- const skillRegex = /<name>([^<]+)<\/name>/g;
1733
- let match;
1734
- while ((match = skillRegex.exec(content)) !== null) {
1735
- skillNames.push(match[1].trim());
1736
- }
1737
- return skillNames;
1738
- }
1739
- getInvokeCommand(skillName) {
1740
- return `skillkit read ${skillName}`;
1741
- }
1742
- async isDetected() {
1743
- const projectTrae = join20(process.cwd(), ".trae");
1744
- const globalTrae = join20(homedir15(), ".trae");
1745
- return existsSync20(projectTrae) || existsSync20(globalTrae);
1746
- }
1747
- };
1834
+ });
1748
1835
 
1749
1836
  // src/agents/windsurf.ts
1750
1837
  import { existsSync as existsSync21 } from "fs";
1751
1838
  import { join as join21 } from "path";
1752
1839
  import { homedir as homedir16 } from "os";
1753
- var WindsurfAdapter = class {
1754
- type = "windsurf";
1755
- name = "Windsurf";
1756
- skillsDir = ".windsurf/skills";
1757
- configFile = "AGENTS.md";
1758
- globalSkillsDir = join21(homedir16(), ".codeium", "windsurf", "skills");
1759
- generateConfig(skills) {
1760
- const enabledSkills = skills.filter((s) => s.enabled);
1761
- if (enabledSkills.length === 0) {
1762
- return "";
1763
- }
1764
- const skillsXml = enabledSkills.map(createSkillXml).join("\n\n");
1765
- return `<skills_system priority="1">
1840
+ var WindsurfAdapter;
1841
+ var init_windsurf = __esm({
1842
+ "src/agents/windsurf.ts"() {
1843
+ "use strict";
1844
+ init_base2();
1845
+ WindsurfAdapter = class {
1846
+ type = "windsurf";
1847
+ name = "Windsurf";
1848
+ skillsDir = ".windsurf/skills";
1849
+ configFile = "AGENTS.md";
1850
+ globalSkillsDir = join21(homedir16(), ".codeium", "windsurf", "skills");
1851
+ generateConfig(skills) {
1852
+ const enabledSkills = skills.filter((s) => s.enabled);
1853
+ if (enabledSkills.length === 0) {
1854
+ return "";
1855
+ }
1856
+ const skillsXml = enabledSkills.map(createSkillXml).join("\n\n");
1857
+ return `<skills_system priority="1">
1766
1858
 
1767
1859
  ## Available Skills
1768
1860
 
@@ -1789,42 +1881,49 @@ ${skillsXml}
1789
1881
  <!-- SKILLS_TABLE_END -->
1790
1882
 
1791
1883
  </skills_system>`;
1884
+ }
1885
+ parseConfig(content) {
1886
+ const skillNames = [];
1887
+ const skillRegex = /<name>([^<]+)<\/name>/g;
1888
+ let match;
1889
+ while ((match = skillRegex.exec(content)) !== null) {
1890
+ skillNames.push(match[1].trim());
1891
+ }
1892
+ return skillNames;
1893
+ }
1894
+ getInvokeCommand(skillName) {
1895
+ return `skillkit read ${skillName}`;
1896
+ }
1897
+ async isDetected() {
1898
+ const projectWindsurf = join21(process.cwd(), ".windsurf");
1899
+ const globalWindsurf = join21(homedir16(), ".codeium", "windsurf");
1900
+ return existsSync21(projectWindsurf) || existsSync21(globalWindsurf);
1901
+ }
1902
+ };
1792
1903
  }
1793
- parseConfig(content) {
1794
- const skillNames = [];
1795
- const skillRegex = /<name>([^<]+)<\/name>/g;
1796
- let match;
1797
- while ((match = skillRegex.exec(content)) !== null) {
1798
- skillNames.push(match[1].trim());
1799
- }
1800
- return skillNames;
1801
- }
1802
- getInvokeCommand(skillName) {
1803
- return `skillkit read ${skillName}`;
1804
- }
1805
- async isDetected() {
1806
- const projectWindsurf = join21(process.cwd(), ".windsurf");
1807
- const globalWindsurf = join21(homedir16(), ".codeium", "windsurf");
1808
- return existsSync21(projectWindsurf) || existsSync21(globalWindsurf);
1809
- }
1810
- };
1904
+ });
1811
1905
 
1812
1906
  // src/agents/universal.ts
1813
1907
  import { existsSync as existsSync22 } from "fs";
1814
1908
  import { join as join22 } from "path";
1815
- var UniversalAdapter = class {
1816
- type = "universal";
1817
- name = "Universal (Any Agent)";
1818
- skillsDir = ".agent/skills";
1819
- configFile = "AGENTS.md";
1820
- generateConfig(skills) {
1821
- const enabledSkills = skills.filter((s) => s.enabled);
1822
- if (enabledSkills.length === 0) {
1823
- return "";
1824
- }
1825
- const skillsXml = enabledSkills.map(createSkillXml).join("\n\n");
1826
- const skillsList = enabledSkills.map((s) => `- **${s.name}**: ${s.description}`).join("\n");
1827
- return `# Skills System
1909
+ var UniversalAdapter;
1910
+ var init_universal = __esm({
1911
+ "src/agents/universal.ts"() {
1912
+ "use strict";
1913
+ init_base2();
1914
+ UniversalAdapter = class {
1915
+ type = "universal";
1916
+ name = "Universal (Any Agent)";
1917
+ skillsDir = ".agent/skills";
1918
+ configFile = "AGENTS.md";
1919
+ generateConfig(skills) {
1920
+ const enabledSkills = skills.filter((s) => s.enabled);
1921
+ if (enabledSkills.length === 0) {
1922
+ return "";
1923
+ }
1924
+ const skillsXml = enabledSkills.map(createSkillXml).join("\n\n");
1925
+ const skillsList = enabledSkills.map((s) => `- **${s.name}**: ${s.description}`).join("\n");
1926
+ return `# Skills System
1828
1927
 
1829
1928
  <!-- SKILLKIT_SKILLS_START -->
1830
1929
 
@@ -1866,52 +1965,35 @@ ${skillsXml}
1866
1965
 
1867
1966
  <!-- SKILLKIT_SKILLS_END -->
1868
1967
  `;
1869
- }
1870
- parseConfig(content) {
1871
- const skillNames = [];
1872
- const skillRegex = /<name>([^<]+)<\/name>/g;
1873
- let match;
1874
- while ((match = skillRegex.exec(content)) !== null) {
1875
- skillNames.push(match[1].trim());
1876
- }
1877
- if (skillNames.length === 0) {
1878
- const listRegex = /^- \*\*([a-z0-9-]+)\*\*:/gm;
1879
- while ((match = listRegex.exec(content)) !== null) {
1880
- skillNames.push(match[1].trim());
1881
1968
  }
1882
- }
1883
- return skillNames;
1884
- }
1885
- getInvokeCommand(skillName) {
1886
- return `skillkit read ${skillName}`;
1887
- }
1888
- async isDetected() {
1889
- const agentDir = join22(process.cwd(), ".agent");
1890
- const agentsMd = join22(process.cwd(), "AGENTS.md");
1891
- return existsSync22(agentDir) || existsSync22(agentsMd);
1969
+ parseConfig(content) {
1970
+ const skillNames = [];
1971
+ const skillRegex = /<name>([^<]+)<\/name>/g;
1972
+ let match;
1973
+ while ((match = skillRegex.exec(content)) !== null) {
1974
+ skillNames.push(match[1].trim());
1975
+ }
1976
+ if (skillNames.length === 0) {
1977
+ const listRegex = /^- \*\*([a-z0-9-]+)\*\*:/gm;
1978
+ while ((match = listRegex.exec(content)) !== null) {
1979
+ skillNames.push(match[1].trim());
1980
+ }
1981
+ }
1982
+ return skillNames;
1983
+ }
1984
+ getInvokeCommand(skillName) {
1985
+ return `skillkit read ${skillName}`;
1986
+ }
1987
+ async isDetected() {
1988
+ const agentDir = join22(process.cwd(), ".agent");
1989
+ const agentsMd = join22(process.cwd(), "AGENTS.md");
1990
+ return existsSync22(agentDir) || existsSync22(agentsMd);
1991
+ }
1992
+ };
1892
1993
  }
1893
- };
1994
+ });
1894
1995
 
1895
1996
  // src/agents/index.ts
1896
- var adapters = {
1897
- "claude-code": new ClaudeCodeAdapter(),
1898
- cursor: new CursorAdapter(),
1899
- codex: new CodexAdapter(),
1900
- "gemini-cli": new GeminiCliAdapter(),
1901
- opencode: new OpenCodeAdapter(),
1902
- antigravity: new AntigravityAdapter(),
1903
- amp: new AmpAdapter(),
1904
- clawdbot: new ClawdbotAdapter(),
1905
- droid: new DroidAdapter(),
1906
- "github-copilot": new GitHubCopilotAdapter(),
1907
- goose: new GooseAdapter(),
1908
- kilo: new KiloAdapter(),
1909
- "kiro-cli": new KiroCliAdapter(),
1910
- roo: new RooAdapter(),
1911
- trae: new TraeAdapter(),
1912
- windsurf: new WindsurfAdapter(),
1913
- universal: new UniversalAdapter()
1914
- };
1915
1997
  function getAdapter(type) {
1916
1998
  return adapters[type];
1917
1999
  }
@@ -1946,10 +2028,72 @@ async function detectAgent() {
1946
2028
  }
1947
2029
  return "universal";
1948
2030
  }
2031
+ var adapters;
2032
+ var init_agents = __esm({
2033
+ "src/agents/index.ts"() {
2034
+ "use strict";
2035
+ init_claude_code();
2036
+ init_cursor();
2037
+ init_codex();
2038
+ init_gemini_cli();
2039
+ init_opencode();
2040
+ init_antigravity();
2041
+ init_amp();
2042
+ init_clawdbot();
2043
+ init_droid();
2044
+ init_github_copilot();
2045
+ init_goose();
2046
+ init_kilo();
2047
+ init_kiro_cli();
2048
+ init_roo();
2049
+ init_trae();
2050
+ init_windsurf();
2051
+ init_universal();
2052
+ init_base2();
2053
+ init_claude_code();
2054
+ init_cursor();
2055
+ init_codex();
2056
+ init_gemini_cli();
2057
+ init_opencode();
2058
+ init_antigravity();
2059
+ init_amp();
2060
+ init_clawdbot();
2061
+ init_droid();
2062
+ init_github_copilot();
2063
+ init_goose();
2064
+ init_kilo();
2065
+ init_kiro_cli();
2066
+ init_roo();
2067
+ init_trae();
2068
+ init_windsurf();
2069
+ init_universal();
2070
+ adapters = {
2071
+ "claude-code": new ClaudeCodeAdapter(),
2072
+ cursor: new CursorAdapter(),
2073
+ codex: new CodexAdapter(),
2074
+ "gemini-cli": new GeminiCliAdapter(),
2075
+ opencode: new OpenCodeAdapter(),
2076
+ antigravity: new AntigravityAdapter(),
2077
+ amp: new AmpAdapter(),
2078
+ clawdbot: new ClawdbotAdapter(),
2079
+ droid: new DroidAdapter(),
2080
+ "github-copilot": new GitHubCopilotAdapter(),
2081
+ goose: new GooseAdapter(),
2082
+ kilo: new KiloAdapter(),
2083
+ "kiro-cli": new KiroCliAdapter(),
2084
+ roo: new RooAdapter(),
2085
+ trae: new TraeAdapter(),
2086
+ windsurf: new WindsurfAdapter(),
2087
+ universal: new UniversalAdapter()
2088
+ };
2089
+ }
2090
+ });
1949
2091
 
1950
2092
  // src/core/config.ts
1951
- var CONFIG_FILE = "skillkit.yaml";
1952
- var METADATA_FILE = ".skillkit.json";
2093
+ import { existsSync as existsSync23, readFileSync as readFileSync2, writeFileSync, mkdirSync } from "fs";
2094
+ import { join as join23, dirname } from "path";
2095
+ import { homedir as homedir17 } from "os";
2096
+ import { parse as parseYaml2, stringify as stringifyYaml } from "yaml";
1953
2097
  function getProjectConfigPath() {
1954
2098
  return join23(process.cwd(), CONFIG_FILE);
1955
2099
  }
@@ -2065,9 +2209,818 @@ async function initProject(agentType) {
2065
2209
  `, "utf-8");
2066
2210
  }
2067
2211
  }
2212
+ var CONFIG_FILE, METADATA_FILE;
2213
+ var init_config = __esm({
2214
+ "src/core/config.ts"() {
2215
+ "use strict";
2216
+ init_types();
2217
+ init_agents();
2218
+ CONFIG_FILE = "skillkit.yaml";
2219
+ METADATA_FILE = ".skillkit.json";
2220
+ }
2221
+ });
2222
+
2223
+ // src/tui/theme.ts
2224
+ import chalk11 from "chalk";
2225
+ var colors, symbols, logo;
2226
+ var init_theme = __esm({
2227
+ "src/tui/theme.ts"() {
2228
+ "use strict";
2229
+ colors = {
2230
+ primary: "white",
2231
+ secondary: "white",
2232
+ secondaryDim: "gray",
2233
+ success: "white",
2234
+ danger: "white",
2235
+ warning: "white",
2236
+ background: "bgBlack",
2237
+ borderDim: "gray"
2238
+ };
2239
+ symbols = {
2240
+ pointer: chalk11.white("\u276F"),
2241
+ bullet: "\u25CF",
2242
+ checkboxOn: chalk11.white("\u2714"),
2243
+ checkboxOff: chalk11.dim("\u2716"),
2244
+ check: chalk11.white("\u2713"),
2245
+ star: "\u2605",
2246
+ spinner: ["\u280B", "\u2819", "\u2839", "\u2838", "\u283C", "\u2834", "\u2826", "\u2827", "\u2807", "\u280F"]
2247
+ };
2248
+ logo = `
2249
+ \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2557\u2588\u2588\u2557 \u2588\u2588\u2557 \u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557
2250
+ \u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u2588\u2588\u2551 \u2588\u2588\u2554\u255D\u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2554\u255D\u2588\u2588\u2551\u255A\u2550\u2550\u2588\u2588\u2554\u2550\u2550\u255D
2251
+ \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2554\u255D \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2588\u2588\u2588\u2554\u255D \u2588\u2588\u2551 \u2588\u2588\u2551
2252
+ \u255A\u2550\u2550\u2550\u2550\u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2588\u2588\u2557 \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2554\u2550\u2588\u2588\u2557 \u2588\u2588\u2551 \u2588\u2588\u2551
2253
+ \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2557\u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2551 \u2588\u2588\u2557\u2588\u2588\u2551 \u2588\u2588\u2551
2254
+ \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u255D\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D
2255
+ `;
2256
+ }
2257
+ });
2258
+
2259
+ // src/tui/components/Sidebar.tsx
2260
+ import { Box, Text } from "ink";
2261
+ import { jsx, jsxs } from "react/jsx-runtime";
2262
+ function Sidebar({ screen }) {
2263
+ return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", width: 14, borderStyle: "single", paddingX: 1, children: [
2264
+ /* @__PURE__ */ jsx(Text, { bold: true, color: colors.primary, children: "SkillKit" }),
2265
+ NAV.slice(0, 2).map((item) => /* @__PURE__ */ jsxs(Text, { inverse: screen === item.id, children: [
2266
+ screen === item.id ? symbols.bullet : " ",
2267
+ item.label
2268
+ ] }, item.id)),
2269
+ /* @__PURE__ */ jsx(Text, { children: " " }),
2270
+ NAV.slice(2).map((item) => /* @__PURE__ */ jsxs(Text, { inverse: screen === item.id, children: [
2271
+ screen === item.id ? symbols.bullet : " ",
2272
+ item.label
2273
+ ] }, item.id)),
2274
+ /* @__PURE__ */ jsx(Box, { flexGrow: 1 }),
2275
+ /* @__PURE__ */ jsx(Text, { dimColor: true, children: "? Help" }),
2276
+ /* @__PURE__ */ jsx(Text, { dimColor: true, children: "q Quit" })
2277
+ ] });
2278
+ }
2279
+ var NAV;
2280
+ var init_Sidebar = __esm({
2281
+ "src/tui/components/Sidebar.tsx"() {
2282
+ "use strict";
2283
+ init_theme();
2284
+ NAV = [
2285
+ { id: "home", label: "Home" },
2286
+ { id: "browse", label: "Browse" },
2287
+ { id: "installed", label: "List" },
2288
+ { id: "sync", label: "Sync" },
2289
+ { id: "settings", label: "Config" }
2290
+ ];
2291
+ }
2292
+ });
2293
+
2294
+ // src/tui/screens/Home.tsx
2295
+ import { useState, useEffect } from "react";
2296
+ import { Box as Box2, Text as Text2 } from "ink";
2297
+ import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
2298
+ function scramble(target, progress) {
2299
+ return target.split("\n").map((line) => {
2300
+ return line.split("").map((char, i) => {
2301
+ if (char === " ") return char;
2302
+ if (progress > i / line.length * 100) return char;
2303
+ return CHARS[Math.floor(Math.random() * CHARS.length)];
2304
+ }).join("");
2305
+ }).join("\n");
2306
+ }
2307
+ function Home({ cols = 80, rows = 24 }) {
2308
+ const [progress, setProgress] = useState(0);
2309
+ const [display, setDisplay] = useState("");
2310
+ const useLogo = cols < 80 ? logoSmall : logo;
2311
+ useEffect(() => {
2312
+ if (progress >= 100) {
2313
+ setDisplay(useLogo);
2314
+ return;
2315
+ }
2316
+ const t = setInterval(() => {
2317
+ setProgress((p) => {
2318
+ const next = p + 12;
2319
+ setDisplay(scramble(useLogo, next));
2320
+ return next;
2321
+ });
2322
+ }, 35);
2323
+ return () => clearInterval(t);
2324
+ }, [progress, useLogo]);
2325
+ return /* @__PURE__ */ jsxs2(Box2, { flexDirection: "column", children: [
2326
+ /* @__PURE__ */ jsx2(Text2, { color: colors.primary, children: display || useLogo }),
2327
+ /* @__PURE__ */ jsx2(Box2, { marginTop: 1, children: /* @__PURE__ */ jsx2(Text2, { children: "Manage AI agent skills from your terminal." }) }),
2328
+ /* @__PURE__ */ jsxs2(Box2, { marginTop: 1, flexDirection: "column", children: [
2329
+ /* @__PURE__ */ jsx2(Text2, { bold: true, children: "Quick Actions:" }),
2330
+ /* @__PURE__ */ jsx2(Text2, { dimColor: true, children: " [b] Browse skills marketplace" }),
2331
+ /* @__PURE__ */ jsx2(Text2, { dimColor: true, children: " [l] View installed skills" }),
2332
+ /* @__PURE__ */ jsx2(Text2, { dimColor: true, children: " [s] Sync skills across agents" }),
2333
+ /* @__PURE__ */ jsx2(Text2, { dimColor: true, children: " [,] Settings" })
2334
+ ] }),
2335
+ rows >= 18 && /* @__PURE__ */ jsxs2(Box2, { marginTop: 1, flexDirection: "column", children: [
2336
+ /* @__PURE__ */ jsx2(Text2, { bold: true, children: "Navigation:" }),
2337
+ /* @__PURE__ */ jsx2(Text2, { dimColor: true, children: " \u2191\u2193 Navigate lists" }),
2338
+ /* @__PURE__ */ jsx2(Text2, { dimColor: true, children: " Enter Select / Confirm" }),
2339
+ /* @__PURE__ */ jsx2(Text2, { dimColor: true, children: " Esc Go back / Home" }),
2340
+ /* @__PURE__ */ jsx2(Text2, { dimColor: true, children: " q Quit" })
2341
+ ] }),
2342
+ /* @__PURE__ */ jsx2(Box2, { marginTop: 1, children: /* @__PURE__ */ jsx2(Text2, { dimColor: true, children: "v1.1.0 - Works with 17 AI agents" }) })
2343
+ ] });
2344
+ }
2345
+ var CHARS, logoSmall;
2346
+ var init_Home = __esm({
2347
+ "src/tui/screens/Home.tsx"() {
2348
+ "use strict";
2349
+ init_theme();
2350
+ CHARS = "01\u2588\u2593\u2592\u2591\u2554\u2557\u255A\u255D\u2551\u2550";
2351
+ logoSmall = `
2352
+ \u2554\u2550\u2557\u2566\u2554\u2550\u2566\u2566 \u2566 \u2566\u2554\u2550\u2566\u2554\u2566\u2557
2353
+ \u255A\u2550\u2557\u2560\u2569\u2557\u2551\u2551 \u2551 \u2560\u2569\u2557\u2551 \u2551
2354
+ \u255A\u2550\u255D\u2569 \u2569\u2569\u2569\u2550\u255D\u2569\u2550\u255D\u2569 \u2569\u2569 \u2569
2355
+ `.trim();
2356
+ }
2357
+ });
2358
+
2359
+ // src/tui/hooks/useMarketplace.ts
2360
+ import { useState as useState2, useCallback, useEffect as useEffect2 } from "react";
2361
+ function useMarketplace() {
2362
+ const [allSkills, setAllSkills] = useState2([]);
2363
+ const [filteredSkills, setFilteredSkills] = useState2([]);
2364
+ const [loading, setLoading] = useState2(false);
2365
+ const [error, setError] = useState2(null);
2366
+ const [currentRepo, setCurrentRepo] = useState2(null);
2367
+ const [fetchedRepos, setFetchedRepos] = useState2(/* @__PURE__ */ new Set());
2368
+ const fetchRepo = useCallback(async (source) => {
2369
+ if (fetchedRepos.has(source)) return;
2370
+ setLoading(true);
2371
+ setError(null);
2372
+ setCurrentRepo(source);
2373
+ try {
2374
+ const provider = detectProvider(source);
2375
+ if (!provider) {
2376
+ throw new Error(`Could not detect provider for: ${source}`);
2377
+ }
2378
+ const result = await provider.clone(source, "", { depth: 1 });
2379
+ if (!result.success || !result.discoveredSkills) {
2380
+ throw new Error(result.error || "Failed to fetch skills");
2381
+ }
2382
+ const repoName = POPULAR_REPOS.find((r) => r.source === source)?.name || source;
2383
+ const newSkills = result.discoveredSkills.map((skill) => ({
2384
+ name: skill.name,
2385
+ source,
2386
+ repoName,
2387
+ description: void 0
2388
+ }));
2389
+ setAllSkills((prev) => {
2390
+ const updated = [...prev, ...newSkills];
2391
+ return updated.sort((a, b) => a.name.localeCompare(b.name));
2392
+ });
2393
+ setFetchedRepos((prev) => /* @__PURE__ */ new Set([...prev, source]));
2394
+ if (result.tempRoot) {
2395
+ const { rmSync: rmSync8 } = await import("fs");
2396
+ rmSync8(result.tempRoot, { recursive: true, force: true });
2397
+ }
2398
+ } catch (err) {
2399
+ setError(err instanceof Error ? err.message : "Failed to fetch repository");
2400
+ } finally {
2401
+ setLoading(false);
2402
+ setCurrentRepo(null);
2403
+ }
2404
+ }, [fetchedRepos]);
2405
+ const fetchAllRepos = useCallback(async () => {
2406
+ setLoading(true);
2407
+ setError(null);
2408
+ for (const repo of POPULAR_REPOS) {
2409
+ if (!fetchedRepos.has(repo.source)) {
2410
+ setCurrentRepo(repo.source);
2411
+ try {
2412
+ await fetchRepo(repo.source);
2413
+ } catch {
2414
+ }
2415
+ }
2416
+ }
2417
+ setLoading(false);
2418
+ setCurrentRepo(null);
2419
+ }, [fetchRepo, fetchedRepos]);
2420
+ const search = useCallback((query) => {
2421
+ if (!query.trim()) {
2422
+ setFilteredSkills(allSkills);
2423
+ } else {
2424
+ const lowerQuery = query.toLowerCase();
2425
+ setFilteredSkills(
2426
+ allSkills.filter(
2427
+ (s) => s.name.toLowerCase().includes(lowerQuery) || s.source.toLowerCase().includes(lowerQuery) || s.repoName.toLowerCase().includes(lowerQuery) || s.description?.toLowerCase().includes(lowerQuery)
2428
+ )
2429
+ );
2430
+ }
2431
+ }, [allSkills]);
2432
+ const refresh = useCallback(() => {
2433
+ setFetchedRepos(/* @__PURE__ */ new Set());
2434
+ setAllSkills([]);
2435
+ setFilteredSkills([]);
2436
+ }, []);
2437
+ useEffect2(() => {
2438
+ setFilteredSkills(allSkills);
2439
+ }, [allSkills]);
2440
+ const skills = filteredSkills.map((s) => ({
2441
+ name: s.name,
2442
+ description: s.description || s.repoName,
2443
+ source: s.source
2444
+ }));
2445
+ return {
2446
+ skills,
2447
+ loading,
2448
+ error,
2449
+ totalCount: allSkills.length,
2450
+ repos: POPULAR_REPOS,
2451
+ currentRepo,
2452
+ refresh,
2453
+ search,
2454
+ fetchRepo,
2455
+ fetchAllRepos
2456
+ };
2457
+ }
2458
+ var POPULAR_REPOS;
2459
+ var init_useMarketplace = __esm({
2460
+ "src/tui/hooks/useMarketplace.ts"() {
2461
+ "use strict";
2462
+ init_providers();
2463
+ POPULAR_REPOS = [
2464
+ { source: "anthropics/skills", name: "Anthropic Official" },
2465
+ { source: "vercel-labs/agent-skills", name: "Vercel Labs" },
2466
+ { source: "expo/skills", name: "Expo / React Native" },
2467
+ { source: "remotion-dev/skills", name: "Remotion Video" },
2468
+ { source: "ComposioHQ/awesome-claude-skills", name: "Composio Awesome" },
2469
+ { source: "travisvn/awesome-claude-skills", name: "Travis Awesome" },
2470
+ { source: "mhattingpete/claude-skills-marketplace", name: "Skills Marketplace" },
2471
+ { source: "coreyhaines31/marketingskills", name: "Marketing Skills" },
2472
+ { source: "obra/superpowers", name: "Superpowers TDD" },
2473
+ { source: "softaworks/agent-toolkit", name: "Softaworks Toolkit" },
2474
+ { source: "wshobson/agents", name: "Dev Patterns" },
2475
+ { source: "langgenius/dify", name: "Dify Frontend" },
2476
+ { source: "trailofbits/skills", name: "Trail of Bits Security" },
2477
+ { source: "better-auth/skills", name: "Better Auth" },
2478
+ { source: "onmax/nuxt-skills", name: "Nuxt / Vue" },
2479
+ { source: "hyf0/vue-skills", name: "Vue Best Practices" },
2480
+ { source: "jezweb/claude-skills", name: "Cloudflare / TanStack" },
2481
+ { source: "elysiajs/skills", name: "ElysiaJS / Bun" },
2482
+ { source: "kadajett/agent-nestjs-skills", name: "NestJS" },
2483
+ { source: "callstackincubator/agent-skills", name: "React Native" },
2484
+ { source: "cloudai-x/threejs-skills", name: "Three.js" },
2485
+ { source: "emalorenzo/three-agent-skills", name: "Three.js Advanced" },
2486
+ { source: "dimillian/skills", name: "SwiftUI iOS" },
2487
+ { source: "stripe/ai", name: "Stripe Payments" },
2488
+ { source: "waynesutton/convexskills", name: "Convex Backend" },
2489
+ { source: "kepano/obsidian-skills", name: "Obsidian Notes" },
2490
+ { source: "jimliu/baoyu-skills", name: "Baoyu Tools" },
2491
+ { source: "giuseppe-trisciuoglio/developer-kit", name: "Shadcn / Radix" },
2492
+ { source: "openrouterteam/agent-skills", name: "OpenRouter SDK" },
2493
+ { source: "intellectronica/agent-skills", name: "Context7" },
2494
+ { source: "boristane/agent-skills", name: "Logging Patterns" },
2495
+ { source: "f/awesome-chatgpt-prompts", name: "ChatGPT Prompts" },
2496
+ { source: "rohitg00/openskills", name: "OpenSkills" }
2497
+ ];
2498
+ }
2499
+ });
2500
+
2501
+ // src/tui/screens/Browse.tsx
2502
+ import { useState as useState3 } from "react";
2503
+ import { existsSync as existsSync30, mkdirSync as mkdirSync5, cpSync as cpSync3, rmSync as rmSync7 } from "fs";
2504
+ import { join as join28 } from "path";
2505
+ import { Box as Box3, Text as Text3, useInput } from "ink";
2506
+ import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
2507
+ function Browse({ rows = 24 }) {
2508
+ const { repos, skills, loading, currentRepo, fetchRepo, fetchAllRepos } = useMarketplace();
2509
+ const [view, setView] = useState3("repos");
2510
+ const [sel, setSel] = useState3(0);
2511
+ const [installing, setInstalling] = useState3(null);
2512
+ const [message, setMessage] = useState3(null);
2513
+ const [selectedSkill, setSelectedSkill] = useState3(null);
2514
+ const [agents, setAgents] = useState3([]);
2515
+ const items = view === "repos" ? repos : view === "skills" ? skills : agents;
2516
+ const maxVisible = Math.max(5, rows - 8);
2517
+ const start = Math.max(0, Math.min(sel - Math.floor(maxVisible / 2), items.length - maxVisible));
2518
+ const visible = items.slice(start, start + maxVisible);
2519
+ const showAgentSelection = async (skillName, source) => {
2520
+ setSelectedSkill({ name: skillName, source });
2521
+ const adapters2 = getAllAdapters();
2522
+ const agentList = [];
2523
+ for (const a of adapters2) {
2524
+ agentList.push({
2525
+ type: a.type,
2526
+ name: a.name,
2527
+ detected: await a.isDetected()
2528
+ });
2529
+ }
2530
+ setAgents(agentList);
2531
+ setView("agents");
2532
+ setSel(0);
2533
+ };
2534
+ const installSkill = async (skillName, source, agentType) => {
2535
+ setInstalling(skillName);
2536
+ setMessage(null);
2537
+ try {
2538
+ const provider = detectProvider(source);
2539
+ if (!provider) {
2540
+ setMessage(`Error: Unknown provider for ${source}`);
2541
+ setInstalling(null);
2542
+ return;
2543
+ }
2544
+ const result = await provider.clone(source, "", { depth: 1 });
2545
+ if (!result.success || !result.discoveredSkills) {
2546
+ setMessage(`Error: ${result.error || "Failed to fetch"}`);
2547
+ setInstalling(null);
2548
+ return;
2549
+ }
2550
+ const skill = result.discoveredSkills.find((s) => s.name === skillName);
2551
+ if (!skill) {
2552
+ setMessage(`Error: Skill ${skillName} not found`);
2553
+ setInstalling(null);
2554
+ return;
2555
+ }
2556
+ const targetAgentType = agentType || await detectAgent();
2557
+ const adapter = getAdapter(targetAgentType);
2558
+ const installDir = getInstallDir(false, targetAgentType);
2559
+ if (!existsSync30(installDir)) {
2560
+ mkdirSync5(installDir, { recursive: true });
2561
+ }
2562
+ const targetPath = join28(installDir, skillName);
2563
+ if (existsSync30(targetPath)) {
2564
+ rmSync7(targetPath, { recursive: true, force: true });
2565
+ }
2566
+ cpSync3(skill.path, targetPath, { recursive: true, dereference: true });
2567
+ const metadata = {
2568
+ name: skillName,
2569
+ description: "",
2570
+ source,
2571
+ sourceType: provider.type,
2572
+ subpath: skillName,
2573
+ installedAt: (/* @__PURE__ */ new Date()).toISOString(),
2574
+ enabled: true
2575
+ };
2576
+ saveSkillMetadata(targetPath, metadata);
2577
+ if (result.tempRoot) {
2578
+ rmSync7(result.tempRoot, { recursive: true, force: true });
2579
+ }
2580
+ setMessage(`\u2713 Installed ${skillName} to ${adapter.name}`);
2581
+ if (!agentType) {
2582
+ setView("skills");
2583
+ }
2584
+ } catch (err) {
2585
+ setMessage(`Error: ${err instanceof Error ? err.message : "Unknown error"}`);
2586
+ } finally {
2587
+ setInstalling(null);
2588
+ if (agentType) {
2589
+ setSelectedSkill(null);
2590
+ }
2591
+ }
2592
+ };
2593
+ useInput((input, key) => {
2594
+ if (loading || installing) return;
2595
+ if (key.upArrow) setSel((i) => Math.max(0, i - 1));
2596
+ else if (key.downArrow) setSel((i) => Math.min(items.length - 1, i + 1));
2597
+ else if (key.return) {
2598
+ if (view === "repos" && repos[sel]) {
2599
+ fetchRepo(repos[sel].source);
2600
+ setView("skills");
2601
+ setSel(0);
2602
+ setMessage(null);
2603
+ } else if (view === "skills" && skills[sel]?.source) {
2604
+ installSkill(skills[sel].name, skills[sel].source);
2605
+ } else if (view === "agents" && agents[sel]) {
2606
+ installSkill(selectedSkill.name, selectedSkill.source, agents[sel].type);
2607
+ }
2608
+ } else if (input === "m" && view === "skills" && skills[sel]?.source) {
2609
+ showAgentSelection(skills[sel].name, skills[sel].source);
2610
+ } else if (input === "r") {
2611
+ if (view === "skills") {
2612
+ setView("repos");
2613
+ setSel(0);
2614
+ setMessage(null);
2615
+ } else if (view === "agents") {
2616
+ setView("skills");
2617
+ setSel(0);
2618
+ }
2619
+ } else if (input === "a" && view === "repos") {
2620
+ fetchAllRepos();
2621
+ setView("skills");
2622
+ setSel(0);
2623
+ }
2624
+ });
2625
+ if (view === "agents") {
2626
+ return /* @__PURE__ */ jsxs3(Box3, { flexDirection: "column", children: [
2627
+ /* @__PURE__ */ jsx3(Text3, { bold: true, color: colors.primary, children: "SELECT AGENT" }),
2628
+ /* @__PURE__ */ jsxs3(Text3, { dimColor: true, children: [
2629
+ 'Install "',
2630
+ selectedSkill?.name,
2631
+ '" to which agent?'
2632
+ ] }),
2633
+ /* @__PURE__ */ jsx3(Text3, { dimColor: true, children: "(All agents supported - directory created if needed)" }),
2634
+ /* @__PURE__ */ jsx3(Box3, { marginTop: 1, flexDirection: "column", children: visible.map((agent, i) => {
2635
+ const idx = start + i;
2636
+ const isSel = idx === sel;
2637
+ const a = agent;
2638
+ const status = a.detected ? "(ready)" : "(will create)";
2639
+ return /* @__PURE__ */ jsxs3(Text3, { inverse: isSel, children: [
2640
+ isSel ? symbols.pointer : " ",
2641
+ " ",
2642
+ a.name.padEnd(20),
2643
+ " ",
2644
+ /* @__PURE__ */ jsx3(Text3, { color: colors.secondaryDim, children: status })
2645
+ ] }, a.type);
2646
+ }) }),
2647
+ /* @__PURE__ */ jsx3(Box3, { marginTop: 1, children: /* @__PURE__ */ jsx3(Text3, { dimColor: true, children: "Enter=install to selected agent r=back q=quit" }) })
2648
+ ] });
2649
+ }
2650
+ return /* @__PURE__ */ jsxs3(Box3, { flexDirection: "column", children: [
2651
+ /* @__PURE__ */ jsx3(Text3, { bold: true, color: colors.primary, children: view === "repos" ? "REPOSITORIES" : "SKILLS" }),
2652
+ loading && /* @__PURE__ */ jsxs3(Text3, { dimColor: true, children: [
2653
+ "Loading ",
2654
+ currentRepo,
2655
+ "..."
2656
+ ] }),
2657
+ installing && /* @__PURE__ */ jsxs3(Text3, { children: [
2658
+ "Installing ",
2659
+ installing,
2660
+ "..."
2661
+ ] }),
2662
+ message && /* @__PURE__ */ jsx3(Text3, { dimColor: true, children: message }),
2663
+ /* @__PURE__ */ jsxs3(Text3, { dimColor: true, children: [
2664
+ items.length,
2665
+ " items"
2666
+ ] }),
2667
+ /* @__PURE__ */ jsxs3(Box3, { marginTop: 1, flexDirection: "column", children: [
2668
+ start > 0 && /* @__PURE__ */ jsxs3(Text3, { dimColor: true, children: [
2669
+ " \u2191 ",
2670
+ start,
2671
+ " more"
2672
+ ] }),
2673
+ visible.map((item, i) => {
2674
+ const idx = start + i;
2675
+ const isSel = idx === sel;
2676
+ const name = view === "repos" ? item.name : item.name;
2677
+ const src = view === "repos" ? item.source : item.source || "";
2678
+ return /* @__PURE__ */ jsxs3(Text3, { inverse: isSel, children: [
2679
+ isSel ? symbols.pointer : " ",
2680
+ name.padEnd(25),
2681
+ " ",
2682
+ /* @__PURE__ */ jsx3(Text3, { color: colors.secondaryDim, children: src })
2683
+ ] }, src + name);
2684
+ }),
2685
+ start + maxVisible < items.length && /* @__PURE__ */ jsxs3(Text3, { dimColor: true, children: [
2686
+ " \u2193 ",
2687
+ items.length - start - maxVisible,
2688
+ " more"
2689
+ ] })
2690
+ ] }),
2691
+ /* @__PURE__ */ jsx3(Box3, { marginTop: 1, children: /* @__PURE__ */ jsx3(Text3, { dimColor: true, children: view === "repos" ? "Enter=fetch a=all q=quit" : "Enter=quick install m=choose agent r=back q=quit" }) })
2692
+ ] });
2693
+ }
2694
+ var init_Browse = __esm({
2695
+ "src/tui/screens/Browse.tsx"() {
2696
+ "use strict";
2697
+ init_theme();
2698
+ init_useMarketplace();
2699
+ init_providers();
2700
+ init_agents();
2701
+ init_config();
2702
+ }
2703
+ });
2704
+
2705
+ // src/tui/hooks/useSkills.ts
2706
+ import { useState as useState4, useEffect as useEffect3 } from "react";
2707
+ function useSkills() {
2708
+ const [skills, setSkills] = useState4([]);
2709
+ const [loading, setLoading] = useState4(true);
2710
+ const [error, setError] = useState4(null);
2711
+ const refresh = () => {
2712
+ setLoading(true);
2713
+ setError(null);
2714
+ try {
2715
+ const searchDirs = getSearchDirs();
2716
+ const foundSkills = findAllSkills(searchDirs);
2717
+ const skillItems = foundSkills.map((s) => ({
2718
+ name: s.name,
2719
+ description: s.description,
2720
+ source: s.metadata?.source,
2721
+ enabled: s.enabled
2722
+ }));
2723
+ setSkills(skillItems);
2724
+ } catch (err) {
2725
+ setError(err instanceof Error ? err.message : "Failed to load skills");
2726
+ } finally {
2727
+ setLoading(false);
2728
+ }
2729
+ };
2730
+ const remove = async (name) => {
2731
+ const { rmSync: rmSync8 } = await import("fs");
2732
+ const foundSkill = skills.find((s) => s.name === name);
2733
+ if (foundSkill) {
2734
+ const searchDirs = getSearchDirs();
2735
+ const allSkills = findAllSkills(searchDirs);
2736
+ const skill = allSkills.find((s) => s.name === name);
2737
+ if (skill) {
2738
+ rmSync8(skill.path, { recursive: true, force: true });
2739
+ refresh();
2740
+ }
2741
+ }
2742
+ };
2743
+ useEffect3(() => {
2744
+ refresh();
2745
+ }, []);
2746
+ return { skills, loading, error, refresh, remove };
2747
+ }
2748
+ var init_useSkills = __esm({
2749
+ "src/tui/hooks/useSkills.ts"() {
2750
+ "use strict";
2751
+ init_config();
2752
+ init_skills();
2753
+ }
2754
+ });
2755
+
2756
+ // src/tui/screens/Installed.tsx
2757
+ import { useState as useState5 } from "react";
2758
+ import { Box as Box4, Text as Text4, useInput as useInput2 } from "ink";
2759
+ import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
2760
+ function Installed({ rows = 24 }) {
2761
+ const { skills, loading, refresh, remove } = useSkills();
2762
+ const [sel, setSel] = useState5(0);
2763
+ const maxVisible = Math.max(5, rows - 6);
2764
+ const start = Math.max(0, Math.min(sel - Math.floor(maxVisible / 2), skills.length - maxVisible));
2765
+ const visible = skills.slice(start, start + maxVisible);
2766
+ useInput2((input, key) => {
2767
+ if (loading) return;
2768
+ if (key.upArrow) setSel((i) => Math.max(0, i - 1));
2769
+ else if (key.downArrow) setSel((i) => Math.min(skills.length - 1, i + 1));
2770
+ else if (input === "r") refresh();
2771
+ else if (input === "d" && skills[sel]) remove(skills[sel].name);
2772
+ });
2773
+ return /* @__PURE__ */ jsxs4(Box4, { flexDirection: "column", children: [
2774
+ /* @__PURE__ */ jsx4(Text4, { bold: true, color: colors.primary, children: "INSTALLED SKILLS" }),
2775
+ /* @__PURE__ */ jsxs4(Text4, { dimColor: true, children: [
2776
+ skills.length,
2777
+ " skills"
2778
+ ] }),
2779
+ loading && /* @__PURE__ */ jsx4(Text4, { children: "Loading..." }),
2780
+ !loading && skills.length === 0 && /* @__PURE__ */ jsx4(Text4, { dimColor: true, children: "No skills installed. Press b to browse." }),
2781
+ !loading && skills.length > 0 && /* @__PURE__ */ jsxs4(Box4, { marginTop: 1, flexDirection: "column", children: [
2782
+ start > 0 && /* @__PURE__ */ jsxs4(Text4, { dimColor: true, children: [
2783
+ " \u2191 ",
2784
+ start,
2785
+ " more"
2786
+ ] }),
2787
+ visible.map((skill, i) => {
2788
+ const idx = start + i;
2789
+ const isSel = idx === sel;
2790
+ return /* @__PURE__ */ jsxs4(Text4, { inverse: isSel, children: [
2791
+ isSel ? symbols.pointer : " ",
2792
+ skill.name.padEnd(30),
2793
+ " ",
2794
+ skill.source && /* @__PURE__ */ jsx4(Text4, { color: colors.secondaryDim, children: skill.source })
2795
+ ] }, skill.name);
2796
+ }),
2797
+ start + maxVisible < skills.length && /* @__PURE__ */ jsxs4(Text4, { dimColor: true, children: [
2798
+ " \u2193 ",
2799
+ skills.length - start - maxVisible,
2800
+ " more"
2801
+ ] })
2802
+ ] }),
2803
+ /* @__PURE__ */ jsx4(Box4, { marginTop: 1, children: /* @__PURE__ */ jsx4(Text4, { dimColor: true, children: "r=refresh d=delete q=quit" }) })
2804
+ ] });
2805
+ }
2806
+ var init_Installed = __esm({
2807
+ "src/tui/screens/Installed.tsx"() {
2808
+ "use strict";
2809
+ init_theme();
2810
+ init_useSkills();
2811
+ }
2812
+ });
2813
+
2814
+ // src/tui/screens/Sync.tsx
2815
+ import { useState as useState6, useEffect as useEffect4 } from "react";
2816
+ import { Box as Box5, Text as Text5, useInput as useInput3 } from "ink";
2817
+ import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
2818
+ function Sync({ rows = 24 }) {
2819
+ const [agents, setAgents] = useState6([]);
2820
+ const [loading, setLoading] = useState6(true);
2821
+ const [sel, setSel] = useState6(0);
2822
+ const [syncing, setSyncing] = useState6(false);
2823
+ const maxVisible = Math.max(5, rows - 6);
2824
+ const start = Math.max(0, Math.min(sel - Math.floor(maxVisible / 2), agents.length - maxVisible));
2825
+ const visible = agents.slice(start, start + maxVisible);
2826
+ useEffect4(() => {
2827
+ (async () => {
2828
+ const adapters2 = getAllAdapters();
2829
+ const s = [];
2830
+ for (const a of adapters2) {
2831
+ s.push({ name: a.name, type: a.type, detected: await a.isDetected() });
2832
+ }
2833
+ setAgents(s);
2834
+ setLoading(false);
2835
+ })();
2836
+ }, []);
2837
+ useInput3((input, key) => {
2838
+ if (loading || syncing) return;
2839
+ if (key.upArrow) setSel((i) => Math.max(0, i - 1));
2840
+ else if (key.downArrow) setSel((i) => Math.min(agents.length - 1, i + 1));
2841
+ else if (input === "a") {
2842
+ setSyncing(true);
2843
+ setTimeout(() => setSyncing(false), 500);
2844
+ } else if (key.return && agents[sel]?.detected) {
2845
+ setSyncing(true);
2846
+ setTimeout(() => setSyncing(false), 300);
2847
+ }
2848
+ });
2849
+ const detected = agents.filter((a) => a.detected).length;
2850
+ return /* @__PURE__ */ jsxs5(Box5, { flexDirection: "column", children: [
2851
+ /* @__PURE__ */ jsx5(Text5, { bold: true, color: colors.primary, children: "SYNC SKILLS" }),
2852
+ /* @__PURE__ */ jsxs5(Text5, { dimColor: true, children: [
2853
+ detected,
2854
+ "/",
2855
+ agents.length,
2856
+ " agents detected"
2857
+ ] }),
2858
+ loading && /* @__PURE__ */ jsx5(Text5, { children: "Detecting agents..." }),
2859
+ syncing && /* @__PURE__ */ jsx5(Text5, { children: "Syncing..." }),
2860
+ !loading && !syncing && /* @__PURE__ */ jsxs5(Box5, { marginTop: 1, flexDirection: "column", children: [
2861
+ start > 0 && /* @__PURE__ */ jsxs5(Text5, { dimColor: true, children: [
2862
+ " \u2191 ",
2863
+ start,
2864
+ " more"
2865
+ ] }),
2866
+ visible.map((agent, i) => {
2867
+ const idx = start + i;
2868
+ const isSel = idx === sel;
2869
+ return /* @__PURE__ */ jsxs5(Text5, { inverse: isSel, dimColor: !agent.detected, children: [
2870
+ isSel ? symbols.pointer : " ",
2871
+ agent.detected ? symbols.checkboxOn : symbols.checkboxOff,
2872
+ " ",
2873
+ agent.name.padEnd(20),
2874
+ " ",
2875
+ agent.detected ? "Ready" : "N/A"
2876
+ ] }, agent.type);
2877
+ }),
2878
+ start + maxVisible < agents.length && /* @__PURE__ */ jsxs5(Text5, { dimColor: true, children: [
2879
+ " \u2193 ",
2880
+ agents.length - start - maxVisible,
2881
+ " more"
2882
+ ] })
2883
+ ] }),
2884
+ /* @__PURE__ */ jsx5(Box5, { marginTop: 1, children: /* @__PURE__ */ jsx5(Text5, { dimColor: true, children: "Enter=sync a=all q=quit" }) })
2885
+ ] });
2886
+ }
2887
+ var init_Sync = __esm({
2888
+ "src/tui/screens/Sync.tsx"() {
2889
+ "use strict";
2890
+ init_theme();
2891
+ init_agents();
2892
+ }
2893
+ });
2894
+
2895
+ // src/tui/screens/Settings.tsx
2896
+ import { useState as useState7 } from "react";
2897
+ import { Box as Box6, Text as Text6, useInput as useInput4 } from "ink";
2898
+ import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
2899
+ function Settings({}) {
2900
+ const [sel, setSel] = useState7(0);
2901
+ useInput4((_, key) => {
2902
+ if (key.upArrow) setSel((i) => Math.max(0, i - 1));
2903
+ else if (key.downArrow) setSel((i) => Math.min(SETTINGS.length - 1, i + 1));
2904
+ });
2905
+ return /* @__PURE__ */ jsxs6(Box6, { flexDirection: "column", children: [
2906
+ /* @__PURE__ */ jsx6(Text6, { bold: true, color: colors.primary, children: "SETTINGS" }),
2907
+ /* @__PURE__ */ jsx6(Text6, { dimColor: true, children: "Configure SkillKit" }),
2908
+ /* @__PURE__ */ jsx6(Box6, { marginTop: 1, flexDirection: "column", children: SETTINGS.map((s, i) => {
2909
+ const isSel = i === sel;
2910
+ return /* @__PURE__ */ jsxs6(Text6, { inverse: isSel, children: [
2911
+ isSel ? symbols.pointer : " ",
2912
+ s.label.padEnd(16),
2913
+ " ",
2914
+ /* @__PURE__ */ jsx6(Text6, { color: colors.secondaryDim, children: s.value })
2915
+ ] }, s.id);
2916
+ }) }),
2917
+ /* @__PURE__ */ jsx6(Box6, { marginTop: 1, children: /* @__PURE__ */ jsx6(Text6, { dimColor: true, children: "Enter=edit q=quit" }) })
2918
+ ] });
2919
+ }
2920
+ var SETTINGS;
2921
+ var init_Settings = __esm({
2922
+ "src/tui/screens/Settings.tsx"() {
2923
+ "use strict";
2924
+ init_theme();
2925
+ SETTINGS = [
2926
+ { id: "agent", label: "Default Agent", value: "auto-detect" },
2927
+ { id: "sync", label: "Auto Sync", value: "disabled" },
2928
+ { id: "cache", label: "Cache Dir", value: "~/.skillkit/cache" }
2929
+ ];
2930
+ }
2931
+ });
2932
+
2933
+ // src/tui/App.tsx
2934
+ import { useState as useState8 } from "react";
2935
+ import { Box as Box7, Text as Text7, useInput as useInput5, useApp, useStdout } from "ink";
2936
+ import { jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
2937
+ function App() {
2938
+ const [screen, setScreen] = useState8("home");
2939
+ const { exit } = useApp();
2940
+ const { stdout } = useStdout();
2941
+ const cols = stdout?.columns || 80;
2942
+ const rows = stdout?.rows || 24;
2943
+ const showSidebar = cols >= 70;
2944
+ useInput5((input, key) => {
2945
+ if (input === "q") {
2946
+ exit();
2947
+ return;
2948
+ }
2949
+ if (key.escape) {
2950
+ setScreen("home");
2951
+ return;
2952
+ }
2953
+ if (input === "h") setScreen("home");
2954
+ if (input === "b") setScreen("browse");
2955
+ if (input === "l") setScreen("installed");
2956
+ if (input === "s") setScreen("sync");
2957
+ if (input === ",") setScreen("settings");
2958
+ });
2959
+ const renderScreen = () => {
2960
+ switch (screen) {
2961
+ case "home":
2962
+ return /* @__PURE__ */ jsx7(Home, { onNavigate: setScreen, cols, rows });
2963
+ case "browse":
2964
+ return /* @__PURE__ */ jsx7(Browse, { cols, rows });
2965
+ case "installed":
2966
+ return /* @__PURE__ */ jsx7(Installed, { cols, rows });
2967
+ case "sync":
2968
+ return /* @__PURE__ */ jsx7(Sync, { cols, rows });
2969
+ case "settings":
2970
+ return /* @__PURE__ */ jsx7(Settings, { cols, rows });
2971
+ }
2972
+ };
2973
+ return /* @__PURE__ */ jsxs7(Box7, { flexDirection: "column", children: [
2974
+ /* @__PURE__ */ jsxs7(Box7, { flexDirection: "row", flexGrow: 1, children: [
2975
+ showSidebar && /* @__PURE__ */ jsx7(Sidebar, { screen, onNavigate: setScreen }),
2976
+ /* @__PURE__ */ jsx7(Box7, { flexDirection: "column", flexGrow: 1, marginLeft: 1, children: renderScreen() })
2977
+ ] }),
2978
+ /* @__PURE__ */ jsx7(Text7, { dimColor: true, children: "h Home b Browse l List s Sync , Config Esc Back q Quit" })
2979
+ ] });
2980
+ }
2981
+ var init_App = __esm({
2982
+ "src/tui/App.tsx"() {
2983
+ "use strict";
2984
+ init_Sidebar();
2985
+ init_Home();
2986
+ init_Browse();
2987
+ init_Installed();
2988
+ init_Sync();
2989
+ init_Settings();
2990
+ }
2991
+ });
2992
+
2993
+ // src/tui/index.tsx
2994
+ var tui_exports = {};
2995
+ __export(tui_exports, {
2996
+ startTUI: () => startTUI
2997
+ });
2998
+ import { render } from "ink";
2999
+ import { jsx as jsx8 } from "react/jsx-runtime";
3000
+ function startTUI() {
3001
+ const { waitUntilExit } = render(/* @__PURE__ */ jsx8(App, {}));
3002
+ return waitUntilExit();
3003
+ }
3004
+ var init_tui = __esm({
3005
+ "src/tui/index.tsx"() {
3006
+ "use strict";
3007
+ init_App();
3008
+ }
3009
+ });
3010
+
3011
+ // src/cli.ts
3012
+ import { Cli, Builtins } from "clipanion";
2068
3013
 
2069
3014
  // src/commands/install.ts
3015
+ init_providers();
3016
+ init_config();
2070
3017
  init_skills();
3018
+ init_agents();
3019
+ import { existsSync as existsSync24, mkdirSync as mkdirSync2, cpSync, rmSync as rmSync4 } from "fs";
3020
+ import { join as join24 } from "path";
3021
+ import chalk from "chalk";
3022
+ import ora from "ora";
3023
+ import { Command, Option } from "clipanion";
2071
3024
  var InstallCommand = class extends Command {
2072
3025
  static paths = [["install"], ["i"]];
2073
3026
  static usage = Command.Usage({
@@ -2263,11 +3216,13 @@ Installing to ${adapter.name}...`));
2263
3216
  };
2264
3217
 
2265
3218
  // src/commands/sync.ts
3219
+ init_config();
3220
+ init_skills();
3221
+ init_agents();
2266
3222
  import { existsSync as existsSync25, readFileSync as readFileSync3, writeFileSync as writeFileSync2, mkdirSync as mkdirSync3 } from "fs";
2267
3223
  import { dirname as dirname2 } from "path";
2268
3224
  import chalk2 from "chalk";
2269
3225
  import { Command as Command2, Option as Option2 } from "clipanion";
2270
- init_skills();
2271
3226
  var SyncCommand = class extends Command2 {
2272
3227
  static paths = [["sync"], ["s"]];
2273
3228
  static usage = Command2.Usage({
@@ -2379,9 +3334,10 @@ function updateConfigContent(existing, newConfig, agentType) {
2379
3334
  }
2380
3335
 
2381
3336
  // src/commands/read.ts
3337
+ init_config();
3338
+ init_skills();
2382
3339
  import chalk3 from "chalk";
2383
3340
  import { Command as Command3, Option as Option3 } from "clipanion";
2384
- init_skills();
2385
3341
  var ReadCommand = class extends Command3 {
2386
3342
  static paths = [["read"], ["r"]];
2387
3343
  static usage = Command3.Usage({
@@ -2440,9 +3396,10 @@ var ReadCommand = class extends Command3 {
2440
3396
  };
2441
3397
 
2442
3398
  // src/commands/list.ts
3399
+ init_config();
3400
+ init_skills();
2443
3401
  import chalk4 from "chalk";
2444
3402
  import { Command as Command4, Option as Option4 } from "clipanion";
2445
- init_skills();
2446
3403
  var ListCommand = class extends Command4 {
2447
3404
  static paths = [["list"], ["ls"], ["l"]];
2448
3405
  static usage = Command4.Usage({
@@ -2528,9 +3485,10 @@ function truncate(str, maxLen) {
2528
3485
  }
2529
3486
 
2530
3487
  // src/commands/enable.ts
3488
+ init_config();
3489
+ init_skills();
2531
3490
  import chalk5 from "chalk";
2532
3491
  import { Command as Command5, Option as Option5 } from "clipanion";
2533
- init_skills();
2534
3492
  var EnableCommand = class extends Command5 {
2535
3493
  static paths = [["enable"]];
2536
3494
  static usage = Command5.Usage({
@@ -2613,13 +3571,14 @@ var DisableCommand = class extends Command5 {
2613
3571
  };
2614
3572
 
2615
3573
  // src/commands/update.ts
3574
+ init_config();
3575
+ init_skills();
3576
+ init_providers();
2616
3577
  import { existsSync as existsSync26, rmSync as rmSync5, cpSync as cpSync2 } from "fs";
2617
3578
  import { join as join25 } from "path";
2618
3579
  import chalk6 from "chalk";
2619
3580
  import ora2 from "ora";
2620
3581
  import { Command as Command6, Option as Option6 } from "clipanion";
2621
- init_skills();
2622
- init_providers();
2623
3582
  var UpdateCommand = class extends Command6 {
2624
3583
  static paths = [["update"], ["u"]];
2625
3584
  static usage = Command6.Usage({
@@ -2730,10 +3689,11 @@ var UpdateCommand = class extends Command6 {
2730
3689
  };
2731
3690
 
2732
3691
  // src/commands/remove.ts
3692
+ init_config();
3693
+ init_skills();
2733
3694
  import { existsSync as existsSync27, rmSync as rmSync6 } from "fs";
2734
3695
  import chalk7 from "chalk";
2735
3696
  import { Command as Command7, Option as Option7 } from "clipanion";
2736
- init_skills();
2737
3697
  var RemoveCommand = class extends Command7 {
2738
3698
  static paths = [["remove"], ["rm"], ["uninstall"]];
2739
3699
  static usage = Command7.Usage({
@@ -2780,6 +3740,8 @@ var RemoveCommand = class extends Command7 {
2780
3740
  };
2781
3741
 
2782
3742
  // src/commands/init.ts
3743
+ init_config();
3744
+ init_agents();
2783
3745
  import chalk8 from "chalk";
2784
3746
  import { Command as Command8, Option as Option8 } from "clipanion";
2785
3747
  var InitCommand = class extends Command8 {
@@ -3024,11 +3986,29 @@ Instructions for the AI agent on how to use this skill.
3024
3986
  `;
3025
3987
  }
3026
3988
 
3989
+ // src/commands/ui.ts
3990
+ import { Command as Command11 } from "clipanion";
3991
+ var UICommand = class extends Command11 {
3992
+ static paths = [["ui"], ["tui"]];
3993
+ static usage = Command11.Usage({
3994
+ description: "Launch the interactive TUI (Terminal User Interface)",
3995
+ examples: [
3996
+ ["Open interactive TUI", "$0 ui"],
3997
+ ["Alias for TUI", "$0 tui"]
3998
+ ]
3999
+ });
4000
+ async execute() {
4001
+ const { startTUI: startTUI2 } = await Promise.resolve().then(() => (init_tui(), tui_exports));
4002
+ await startTUI2();
4003
+ return 0;
4004
+ }
4005
+ };
4006
+
3027
4007
  // src/cli.ts
3028
4008
  var cli = new Cli({
3029
4009
  binaryLabel: "skillkit",
3030
4010
  binaryName: "skillkit",
3031
- binaryVersion: "1.0.0"
4011
+ binaryVersion: "1.1.0"
3032
4012
  });
3033
4013
  cli.register(Builtins.HelpCommand);
3034
4014
  cli.register(Builtins.VersionCommand);
@@ -3043,5 +4023,6 @@ cli.register(RemoveCommand);
3043
4023
  cli.register(InitCommand);
3044
4024
  cli.register(ValidateCommand);
3045
4025
  cli.register(CreateCommand);
4026
+ cli.register(UICommand);
3046
4027
  cli.runExit(process.argv.slice(2));
3047
4028
  //# sourceMappingURL=cli.js.map