MCPcopy Index your code
hub / github.com/garrytan/gstack / resolveSkillFile

Function resolveSkillFile

bin/gstack-brain-context-load.ts:173–189  ·  view source on GitHub ↗
(args: CliArgs)

Source from the content-addressed store, hash-verified

171// ── Skill manifest resolution ──────────────────────────────────────────────
172
173function resolveSkillFile(args: CliArgs): string | null {
174 if (args.skillFile) {
175 return resolve(args.skillFile);
176 }
177 if (!args.skill) return null;
178 // Look in common gstack skill locations
179 const candidates = [
180 join(HOME, ".claude", "skills", args.skill, "SKILL.md"),
181 join(HOME, ".claude", "skills", "gstack", args.skill, "SKILL.md"),
182 join(process.cwd(), ".claude", "skills", args.skill, "SKILL.md"),
183 join(process.cwd(), args.skill, "SKILL.md"),
184 ];
185 for (const c of candidates) {
186 if (existsSync(c)) return c;
187 }
188 return null;
189}
190
191// ── Dispatchers ────────────────────────────────────────────────────────────
192

Callers 1

loadContextFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected