[FEATURE] Plugins - Add postInstall, postUpdate and postUninstall hooks in plugin.json

Status Closed — not planned
Maintainer reply None cached
Activity 13 comments · opened Oct 11, 2025 · closed Feb 7, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

I just created a plugin that executes Node.js from CC hooks.

Unfortunately, it requires 2 Node.js dependencies.

Proposed Solution

I would be useful to declare 3 more fields in plugin.json:

{
    ...
   "postInstall": "npm install",
   "postUpdate": "npm install",
   "postUninstall": "./script/postUpdate.sh"
   ...
}

Alternative Solutions

_No response_

Priority

High - Significant impact on productivity

Feature Category

Developer tools/SDK

Use Case Example

_No response_

Additional Context

_No response_

View original on GitHub ↗

13 Comments

amcdnl · 10 months ago

I would also like this - trying to package my MCP server in my plugin and would love to not have to publish it on npm and just do it through the marketplace.

@samber - What was your work around you mentioned?

samber · 10 months ago

@amcdnl In the meantime, i'm going to use npx in my hooks.

https://github.com/samber/cc-caffeine/blob/main/hooks/hooks.json

amcdnl · 10 months ago
@amcdnl In the meantime, i'm going to use npx in my hooks. https://github.com/samber/cc-caffeine/blob/main/hooks/hooks.json

Gotcha, requires publishing a package. Thats what I'm trying to get around here. Thanks for the quick feedback.

lanmower · 10 months ago

npx is also slow...

github-actions[bot] · 8 months ago

This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

amcdnl · 8 months ago

Still relevant.

Martinsos · 8 months ago

+1 for this! Our use case for "post install" hook is:

  • Printing some useful first-time instructions, so they are not just left "hanging" after installing the plugin. And yeah you can put stuff in the plugin description, but it is not the same.
  • Doing some initial setup, in our case creation of a file + small automatic addition to Claude.md. Yeah we can do it on SessionStart but then that happens only after they restart CC, or we can try doing it on any command run from plugin but then we need to add that logic and checks to every command, ... .

Post install hook would make this stuff simple.

psukumarupgrade · 8 months ago

+1 for this, we have started to use plugins extensively for tooling and we need to be able to setup interactive setup on plugin installation, right now we have a plugin command for that but it looks out of place.

robtaylor · 7 months ago

This is going to be critical! At the moment there's going to be a big mess when plugins update, change names, everything..
It's probably worth stealing a lifecycle from something like npm, pip, apt, etc.

I'd be happy to make a patch if the dev team is interested? @bcherny @claude ? I have extensive experience developing packaging systems...

github-actions[bot] · 6 months ago

This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.

marcindulak · 6 months ago

This issue was closed incorrectly despite recent human comments. This behavior of the bot is reported at https://github.com/anthropics/claude-code/issues/16497. Please upvote that issue, so maybe it gets noticed.

Mirajjj · 6 months ago

Was kinda a bummer that I can't add anything after user has successfully installed my plugin.

Plugins should support a postInstall field (message string or script path) that displays output after installation. Currently /plugin install shows (no content) with no way for plugin authors to confirm success or show usage instructions to users.

        __
     /フ   フ
    |  .   .|
    /`ミ__xノ
    /     |
   /  ヽ  ノ
   │   | | |
/ ̄|   | | |
| ( ̄ヽ_ヽ)_)__)
\二つ
github-actions[bot] · 6 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.