MCPcopy
hub / github.com/anomalyco/opencode / createGlobalSkill

Function createGlobalSkill

packages/opencode/test/skill/skill.test.ts:35–50  ·  view source on GitHub ↗
(homeDir: string)

Source from the content-addressed store, hash-verified

33)
34
35async function createGlobalSkill(homeDir: string) {
36 const skillDir = path.join(homeDir, ".claude", "skills", "global-test-skill")
37 await fs.mkdir(skillDir, { recursive: true })
38 await Bun.write(
39 path.join(skillDir, "SKILL.md"),
40 `---
41name: global-test-skill
42description: A global skill from ~/.claude/skills for testing.
43---
44
45# Global Test Skill
46
47This skill is loaded from the global home directory.
48`,
49 )
50}
51
52const withHome = <A, E, R>(home: string, self: Effect.Effect<A, E, R>) =>
53 Effect.acquireUseRelease(

Callers 1

skill.test.tsFile · 0.85

Calls 1

writeMethod · 0.80

Tested by

no test coverage detected