I’m not sure that’s such a great idea:
- addons don’t run until Anki is restarted, so it wouldn’t simply be a case of running a hook as an add-on is installed
- on update, the old hook code would run, not the new code
- for uninstalling, I’m not sure users expect actions to be performed when removing an add-on, and an explicit action like roxgib mentioned might be a better approach there.