How this command is triggered — by the user, by Claude, or both
Slash command
/jira:auto-approveThis command is limited to the following tools:
The summary Claude sees in its command listing — used to decide when to auto-load this command
You are helping the user set up auto-approval hooks for the jira plugin to reduce the number of permission prompts during JIRA workflows. ## Context The jira plugin frequently needs to: - Read configuration files (.claude/jira.local.md) - Search for content patterns (Grep) - Find files by patterns (Glob) - Run plugin scripts from scripts/jira_client.py Without auto-approval hooks, each of these operations may require manual approval, which significantly slows down the workflow. ## Task ### Step 0: Resolve Plugin Root Extract `PLUGIN_ROOT` from the `<jira-context>` system reminder inje...
You are helping the user set up auto-approval hooks for the jira plugin to reduce the number of permission prompts during JIRA workflows.
The jira plugin frequently needs to:
Without auto-approval hooks, each of these operations may require manual approval, which significantly slows down the workflow.
Extract PLUGIN_ROOT from the <jira-context> system reminder
injected by the UserPromptSubmit hook. Use the value from <plugin-root>.
Ask the user whether they want to configure auto-approval:
~/.claude/settings.json) - affects all projects.claude/settings.local.json) - affects only this projectRead the current settings file(s) to check if hooks already exist
Merge or create hooks configuration with these auto-approvals:
/scripts/run.sh or /scripts/jira_client.py.claude/jira.local.md configuration file/tmp/jira-cache/ pattern (cache operations)Write the updated settings back to the appropriate file(s)
Inform the user that:
/hooks menuinput=$(cat)hookSpecificOutput with hookEventName: "PreToolUse"{
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "input=$(cat); if echo \"$input\" | grep -qE '(/scripts/run\\.sh|/scripts/jira_client\\.py|jira\\.local\\.md|/tmp/jira-cache)'; then echo '{\"hookSpecificOutput\": {\"hookEventName\": \"PreToolUse\", \"permissionDecision\": \"allow\", \"permissionDecisionReason\": \"JIRA plugin script/config auto-approved\"}}'; fi",
"timeout": 5
}
]
},
{
"matcher": "Read",
"hooks": [
{
"type": "command",
"command": "input=$(cat); if echo \"$input\" | grep -qE '\\.(md|txt|json|py|sh)\"'; then echo '{\"hookSpecificOutput\": {\"hookEventName\": \"PreToolUse\", \"permissionDecision\": \"allow\", \"permissionDecisionReason\": \"Configuration/script file read auto-approved\"}}'; fi",
"timeout": 5
}
]
},
{
"matcher": "Grep",
"hooks": [
{
"type": "command",
"command": "echo '{\"hookSpecificOutput\": {\"hookEventName\": \"PreToolUse\", \"permissionDecision\": \"allow\", \"permissionDecisionReason\": \"Grep operations auto-approved\"}}'",
"timeout": 5
}
]
},
{
"matcher": "Glob",
"hooks": [
{
"type": "command",
"command": "echo '{\"hookSpecificOutput\": {\"hookEventName\": \"PreToolUse\", \"permissionDecision\": \"allow\", \"permissionDecisionReason\": \"Glob operations auto-approved\"}}'",
"timeout": 5
}
]
}
]
}
}
For PreToolUse hooks, the output must be valid JSON with this exact structure:
{
"hookSpecificOutput": {
"hookEventName": "PreToolUse",
"permissionDecision": "allow" | "deny" | "ask",
"permissionDecisionReason": "Description shown to user"
}
}
Critical Requirements:
hookSpecificOutputhookEventName must be exactly "PreToolUse"The following patterns will be automatically approved:
/scripts/run.sh (plugin script runner)/scripts/jira_client.py (main Python script).claude/jira.local.md (configuration file)/tmp/jira-cache/ (cache directory).md, .txt, .json, .py, .sh filesThese hooks are designed to auto-approve only:
They will NOT auto-approve:
Begin by asking the user which scope they prefer for the auto-approval configuration.
npx claudepluginhub rhuss/cc-jira --plugin jira/jira-assistant-setupGuides conversational setup of JIRA Assistant Skills: checks prerequisites, installs jira-as package, collects credentials and API token, configures environment variables, validates connection.
/install-hooksManages git hooks for Jira smart commit integration: auto-prepends issue keys from branches, validates syntax, processes commands. Supports install, uninstall, list, test, status, configure.
/configure-jiraSets up Jira API credentials interactively, via environment variables, or config file, enabling issue import. Verifies the connection and provides troubleshooting guidance.
/setupInteractively configures MCP servers for Linear, Jira, and GitHub Issues integration, merging settings into project or global config.
/create-hookCreates and configures Claude Code hooks for events like PreToolUse with matcher and command, including ESLint/Prettier templates. Outputs status and hook file path.
/new-hookCreates and configures Claude Code hooks from a natural language description, setting up events, matchers, and shell commands for workflow automation, notifications, formatting, and behavior control.