Give every hook plugin an on/off setting per the hook-enablement convention

Abierto
#18,921 6 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
42/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
json, shell, yaml

Línea de trabajo

Read docs/contracts/hook-enablement/README.md and ADR 0131 first for the precedence and default rules, then open a plugin that already complies (one of the 20 not listed) to copy its userConfig shape, hook-script resolution and test. Pick one listed plugin, e.g. plugins/toolchain/.claude-plugin/plugin.json plus its hooks/hooks.json and script, and repeat per hook. Done means the count script reports no plugin and each hook's test covers the three precedence cases.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Context

The hook-enablement convention (docs/contracts/hook-enablement/README.md, added by the pull request that refs this issue) requires every hook a plugin ships to have its own <name>_enabled on/off setting, at the user layer (userConfig) and the repository layer (docs/conventions/<plugin>.yaml), read by the hook's own script. Claude Code has no per-hook off switch, so without the setting an operator who wants one hook off must disable the whole plugin or every hook.

Of the 31 plugins under plugins/ that ship hooks/hooks.json, these 11 declare no *_enabled option in .claude-plugin/plugin.json:

  • animation
  • context-budget
  • discovery
  • display-redaction
  • explainer-video
  • multi-agent
  • playwright
  • plugin-profiles
  • speech
  • themes
  • toolchain

Count from a script over plugins/*/hooks/hooks.json and each plugin's userConfig keys, run on main at 3b46e0b4c71 (2026-11-24).

Proposed work

For each plugin listed, one change per plugin:

  1. Add one boolean <name>_enabled userConfig option per hook it ships, with the default the convention's "The per-hook setting" section describes and the title text plugin-option-naming sets.
  2. Make each hook's script resolve the plugin default, the user layer and the repository layer before doing any work, in the convention's precedence, and exit quietly when the result is off.
  3. Document the key in the plugin's config reference and repository-layer schema.

Acceptance criteria

Precedence follows the owner decision of 2026-11-24 recorded in ADR 0131: the user's explicit value wins for that user, and the repository value is the default for everyone who has not set their own.

  • Each of the 11 plugins declares a <name>_enabled option for every hook in its hooks/hooks.json.
  • With the option set to false at the user layer, each hook does nothing, whatever docs/conventions/<plugin>.yaml says; with the user layer unset and false in docs/conventions/<plugin>.yaml, it does nothing; with the user layer unset and true there, it runs.
  • A test per hook covers those three cases.
  • Rerunning the count script lists no plugin.

References

Lenguaje dominante
Shell
Estrellas
22
Forks
2
Merge medio
2 h 1 min
PR fusionados (30 d)
972

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de melodic-software/claude-code-plugins

Todos los issues de melodic-software/claude-code-plugins

Issues similares

Más issues de Shell/Bash

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.