MCPcopy
hub / github.com/upstash/context7 / registerSkillCommands

Function registerSkillCommands

packages/cli/src/commands/skill.ts:101–189  ·  view source on GitHub ↗
(program: Command)

Source from the content-addressed store, hash-verified

99}
100
101export function registerSkillCommands(program: Command): void {
102 const skill = program
103 .command("skills", { hidden: true })
104 .alias("skill")
105 .description("Manage AI coding skills")
106 .hook("preAction", () => {
107 warnSkillHubDeprecated();
108 });
109
110 // Register generate subcommand
111 registerGenerateCommand(skill);
112
113 skill
114 .command("install")
115 .alias("i")
116 .alias("add")
117 .argument("<repository>", "GitHub repository (/owner/repo)")
118 .argument("[skill]", "Specific skill name to install")
119 .option("--all", "Install all skills without prompting")
120 .option("--all-agents", "Install to all supported agent locations")
121 .option("-y, --yes", "Skip confirmation prompts")
122 .option("--global", "Install globally instead of current directory")
123 .option("--claude", "Claude Code (.claude/skills/)")
124 .option("--cursor", "Cursor (.cursor/skills/)")
125 .option("--universal", "Universal (.agents/skills/)")
126 .option("--antigravity", "Antigravity (.agent/skills/)")
127 .description("Install skills from a repository")
128 .action(async (project: string, skillName: string | undefined, options: AddOptions) => {
129 await installCommand(project, skillName, options);
130 });
131
132 skill
133 .command("search")
134 .alias("s")
135 .argument("<keywords...>", "Search keywords")
136 .description("Search for skills across all indexed repositories")
137 .action(async (keywords: string[]) => {
138 await searchCommand(keywords.join(" "));
139 });
140
141 skill
142 .command("list")
143 .alias("ls")
144 .option("--json", "Output as JSON")
145 .option("--global", "List global skills")
146 .option("--claude", "Claude Code (.claude/skills/)")
147 .option("--cursor", "Cursor (.cursor/skills/)")
148 .option("--universal", "Universal (.agents/skills/)")
149 .option("--antigravity", "Antigravity (.agent/skills/)")
150 .description("List installed skills")
151 .action(async (options: ListOptions) => {
152 await listCommand(options);
153 });
154
155 skill
156 .command("remove")
157 .alias("rm")
158 .alias("delete")

Callers 2

index.tsFile · 0.85
runCommandFunction · 0.85

Calls 8

warnSkillHubDeprecatedFunction · 0.85
registerGenerateCommandFunction · 0.85
installCommandFunction · 0.85
searchCommandFunction · 0.85
listCommandFunction · 0.85
infoCommandFunction · 0.85
suggestCommandFunction · 0.85
removeCommandFunction · 0.70

Tested by 1

runCommandFunction · 0.68