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

Function hasSkill

packages/cli/src/commands/remove.ts:243–250  ·  view source on GitHub ↗
(agentName: SetupAgent, scope: Scope, skillName: string)

Source from the content-addressed store, hash-verified

241}
242
243async function hasSkill(agentName: SetupAgent, scope: Scope, skillName: string): Promise<boolean> {
244 const agent = getAgent(agentName);
245 const skillsDir =
246 scope === "global"
247 ? agent.skill.dir("global")
248 : join(process.cwd(), agent.skill.dir("project"));
249 return pathExists(join(skillsDir, skillName));
250}
251
252async function detectAvailableModes(agents: SetupAgent[], scope: Scope): Promise<UninstallMode[]> {
253 let hasMcpArtifacts = false;

Callers 2

detectAvailableModesFunction · 0.85
hasAnyContext7ArtifactsFunction · 0.85

Calls 2

getAgentFunction · 0.85
pathExistsFunction · 0.70

Tested by

no test coverage detected