Skip to content

fix(plugin): remove redundant hooks path from manifest - #23

Merged
macminisupport merged 1 commit into
mainfrom
fix/duplicate-hooks-manifest
Jul 7, 2026
Merged

fix(plugin): remove redundant hooks path from manifest#23
macminisupport merged 1 commit into
mainfrom
fix/duplicate-hooks-manifest

Conversation

@kherembourg

@kherembourg kherembourg commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Summary

  • .claude-plugin/plugin.json declared hooks: "./hooks/hooks.json", but Claude Code auto-loads hooks/hooks.json by convention. The explicit reference makes the same file resolve twice, which fails plugin load with:
    Duplicate hooks file detected: ./hooks/hooks.json resolves to already-loaded file ...
  • Removed the redundant hooks key from the manifest.

Test plan

  • Reinstall the plugin from this branch and confirm /doctor no longer reports the duplicate-hooks error
  • Confirm the session-start hook still fires (it's loaded automatically via the standard hooks/hooks.json path, unaffected by this change)

Claude Code auto-loads hooks/hooks.json by convention; declaring it
explicitly in .claude-plugin/plugin.json makes it resolve twice and
fails plugin load with "Duplicate hooks file detected".
@greptile-apps

greptile-apps Bot commented Jul 7, 2026

Copy link
Copy Markdown

Greptile Summary

Removes the "hooks": "./hooks/hooks.json" key from .claude-plugin/plugin.json to fix a duplicate-hooks load error. Claude Code already auto-discovers hooks/hooks.json by convention, so the explicit declaration caused the file to be resolved twice at install time.

  • .claude-plugin/plugin.json: drops the now-redundant hooks manifest key; all other plugin fields (skills, commands, agents, keywords) are unchanged.
  • CHANGELOG.md: adds an accurate [Unreleased] entry describing the fix in the Keep a Changelog format.

Confidence Score: 5/5

Safe to merge — removes a single manifest key that was causing a hard install failure with no other side effects.

The change is a one-line deletion of a duplicate path reference. The hooks file itself is untouched and continues to load automatically via convention. The CHANGELOG entry is accurate. There are no logic changes, no new code paths, and no regressions possible from this fix.

No files require special attention.

Important Files Changed

Filename Overview
.claude-plugin/plugin.json Removes the redundant "hooks": "./hooks/hooks.json" key; Claude Code already auto-loads hooks/hooks.json by convention, so the explicit entry caused a duplicate-load error on install.
CHANGELOG.md Adds a changelog entry under [Unreleased] documenting the hooks-key removal; entry is accurate and follows the Keep a Changelog format used throughout the file.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Claude Code installs plugin] --> B{plugin.json declares hooks?}
    B -- Before PR: YES --> C[Load hooks/hooks.json via explicit path]
    C --> D[Auto-load hooks/hooks.json by convention]
    D --> E[💥 Duplicate hooks file error]
    B -- After PR: NO --> F[Auto-load hooks/hooks.json by convention only]
    F --> G[✅ Session-start hook fires once]
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A[Claude Code installs plugin] --> B{plugin.json declares hooks?}
    B -- Before PR: YES --> C[Load hooks/hooks.json via explicit path]
    C --> D[Auto-load hooks/hooks.json by convention]
    D --> E[💥 Duplicate hooks file error]
    B -- After PR: NO --> F[Auto-load hooks/hooks.json by convention only]
    F --> G[✅ Session-start hook fires once]
Loading

Reviews (1): Last reviewed commit: "fix(plugin): remove redundant hooks path..." | Re-trigger Greptile

@macminisupport
macminisupport merged commit be0da28 into main Jul 7, 2026
3 checks passed
@macminisupport
macminisupport deleted the fix/duplicate-hooks-manifest branch July 7, 2026 10:21
kherembourg added a commit that referenced this pull request Jul 7, 2026
Cordova joins the v6 line. Bumps all marketplace/plugin manifests
and package.json to 2.0.0-rc.6 (CHANGELOG already updated in #18).

Includes PRs #18, #22, #23.
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