Skip to content

refactor(hooks-plugin): extract hook skill inline commands to standalone scripts #985

@laurigates

Description

@laurigates

Problem

Three skills in hooks-plugin use 4-5 shell utility Bash patterns (test, jq, cat, mkdir, chmod) in their allowed-tools frontmatter. This forces Claude to generate inline bash commands that each require individual user approval, since complex/compound commands can't be allowlisted via Bash(command *) patterns.

Affected skills

Skill Shell utility patterns Count
hooks-permission-request-hook test, jq, cat, mkdir, chmod 5
hooks-session-start-hook test, jq, cat, mkdir, chmod 5
hooks-session-end-issue-hook test, jq, mkdir, chmod 4

Expected behavior

Consolidate shell utility operations into standalone scripts in each skill's scripts/ directory and use Bash(bash *) permission pattern. Since all three skills share similar patterns (hook creation/validation), consider shared scripts at the plugin level.

Reference

  • See health-plugin/skills/health-check/ for the correct pattern
  • Rule: .claude/rules/agentic-permissions.md → "Scripts for Compound Operations"
  • Detected by: scripts/plugin-compliance-check.sh Check 6 (check_bash_patterns)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions