MCPcopy Create free account
hub / github.com/Effect-TS/effect / isSafeSkillFilePath

Function isSafeSkillFilePath

packages/effect/src/ai/Skill.ts:75–80  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

73export type Frontmatter = typeof Frontmatter.Type
74
75const isSafeSkillFilePath = (path: string): boolean =>
76 path !== "" &&
77 path !== "SKILL.md" &&
78 !path.includes("\\") &&
79 !/^[A-Za-z]:/.test(path) &&
80 path.split("/").every((segment) => segment !== "" && segment !== "." && segment !== "..")
81
82const Bytes = Schema.Uint8Array.annotate({
83 toCodecJson: () =>

Callers 1

Skill.tsFile · 0.85

Calls 1

splitMethod · 0.45

Tested by

no test coverage detected