MCPcopy Create free account
hub / github.com/openai/plugins / discoverPluginSkillDirectories

Function discoverPluginSkillDirectories

plugins/plugin-eval/src/core/target.js:68–84  ·  view source on GitHub ↗
(pluginRoot, manifest)

Source from the content-addressed store, hash-verified

66}
67
68export async function discoverPluginSkillDirectories(pluginRoot, manifest) {
69 const configuredPath = manifest?.skills ? manifest.skills.replace(/^\.\//, "") : "skills";
70 const skillsRoot = path.join(pluginRoot, configuredPath);
71 if (!(await isDirectory(skillsRoot))) {
72 return [];
73 }
74
75 const candidates = await listImmediateDirectories(skillsRoot);
76 const directories = [];
77 for (const candidate of candidates) {
78 const skillFile = path.join(candidate, "SKILL.md");
79 if (await pathExists(skillFile)) {
80 directories.push(candidate);
81 }
82 }
83 return directories;
84}
85
86export async function loadPluginManifest(pluginRoot) {
87 const manifestPath = path.join(pluginRoot, ".codex-plugin", "plugin.json");

Callers 1

evaluatePluginFunction · 0.90

Calls 3

isDirectoryFunction · 0.90
listImmediateDirectoriesFunction · 0.90
pathExistsFunction · 0.90

Tested by

no test coverage detected