Skip to content

Add validation for manifest component existence#891

Open
krataratha wants to merge 1 commit into
EveryInc:mainfrom
krataratha:patch-1
Open

Add validation for manifest component existence#891
krataratha wants to merge 1 commit into
EveryInc:mainfrom
krataratha:patch-1

Conversation

@krataratha
Copy link
Copy Markdown

Added a validation feature to check the existence of manifest components on disk and log warnings for missing components.

Added a validation feature to check the existence of manifest components on disk and log warnings for missing components.
Copilot AI review requested due to automatic review settings June 1, 2026 09:32
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds a manifest-driven validation step when loading a Claude plugin to detect missing component directories early.

Changes:

  • Invoke a new validatePluginStructure() helper before loading agents/commands/skills.
  • Add validatePluginStructure() to warn when manifest-declared components don’t exist on disk.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/parsers/claude.ts
Comment on lines +62 to +63
}
}
Comment thread src/parsers/claude.ts
Comment on lines +46 to +62
async function validatePluginStructure(root: string, manifest: ClaudeManifest): Promise<void> {
const componentsToCheck: Array<{ name: string; declared: any }> = [
{ name: "agents", declared: manifest.agents },
{ name: "commands", declared: manifest.commands },
{ name: "skills", declared: manifest.skills },
]

for (const { name, declared } of componentsToCheck) {
if (declared) {
const dirPath = path.join(root, name)
const exists = await pathExists(dirPath)
if (!exists) {
console.warn(`[Claude Plugin Warning]: "${name}" is defined in manifest but directory missing at: ${dirPath}`)
}
}
}
}
Comment thread src/parsers/claude.ts
* Logs a warning for missing components to assist in debugging.
*/
async function validatePluginStructure(root: string, manifest: ClaudeManifest): Promise<void> {
const componentsToCheck: Array<{ name: string; declared: any }> = [
Comment thread src/parsers/claude.ts
const dirPath = path.join(root, name)
const exists = await pathExists(dirPath)
if (!exists) {
console.warn(`[Claude Plugin Warning]: "${name}" is defined in manifest but directory missing at: ${dirPath}`)
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4a7872939e

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/parsers/claude.ts
}
}
}
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Remove extra closing brace that breaks module parsing

When this parser module is imported, Bun fails to parse it with Unexpected } at this extra brace, so any CLI/test path that loads Claude plugins aborts before running. I checked bun test --filter claude, which fails immediately on this line rather than executing the parser tests.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants