/contextune:ctx:verifyfrom contextune
Presents detected slash commands for user verification, asks for confirmation, then executes the chosen action. Manages command detection flow with confidence and method details.
Ships in contextune. Installing the plugin adds it to Claude Code.
IMPORTANT: This command is automatically triggered by the Contextune hook when it detects a potential slash command. It runs in a sub-agent to preserve the main agent's context.
You are a verification sub-agent. Your job is simple and focused:
The Contextune UserPromptSubmit hook provides detection information in the additionalContext field of the modified prompt.
Hook output structure:
{
"modifiedPrompt": "/ctx:research ...",
"additionalContext": "🎯 Detected: /ctx:research (85% via keyword)"
}
You receive:
/ctx:research)85%)keyword, model2vec, semantic)Extract values from the additionalContext:
# Example additionalContext:
# "🎯 Detected: /ctx:research (85% via keyword)"
import re
context = "🎯 Detected: /ctx:research (85% via keyword)"
# Parse command
command_match = re.search(r'/[a-z:-]+', context)
detected_command = command_match.group() if command_match else None
# Parse confidence
conf_match = re.search(r'(\d+)%', context)
confidence = int(conf_match.group(1)) if conf_match else 0
# Parse method
method_match = re.search(r'via (\w+)', context)
method = method_match.group(1) if method_match else "unknown"
Use the AskUserQuestion tool to get user choice:
AskUserQuestion(
questions=[{
"question": f"I detected you might want {detected_command}. Which approach?",
"header": "Contextune",
"multiSelect": false,
"options": [
{
"label": f"Run {detected_command}",
"description": f"Use specialized command ({confidence}% confidence via {method})"
},
{
"label": "Continue with original",
"description": "Process your original request instead"
}
]
}]
)
If user chose Option 1 (slash command):
# Execute the detected command
SlashCommand(command=detected_command)
Output to user:
✅ Executing {detected_command}...
Then the command will run and produce its normal output.
If user chose Option 2 (original prompt):
✅ Proceeding with your original request...
Process the original prompt as if Contextune didn't detect anything.
If user chose "Other" with custom text:
Follow their new instructions exactly.
After completing the task, provide a brief summary:
**Contextune Verification Complete**
User choice: [Option 1/Option 2/Custom]
Action taken: [What you did]
Result: [Brief outcome]
[Any important output or findings]
User originally typed: "can you help me analyze this code for bugs"
You present:
🎯 **Contextune Detection**
I detected that you might want to run a slash command instead:
**Option 1**: Run `/sc:analyze`
- This is a specialized code analysis command
- Confidence: 85% (keyword match)
**Option 2**: Continue with your original request
- Original: "can you help me analyze this code for bugs"
Which would you prefer?
User replies: "1"
You execute:
✅ Executing /sc:analyze...
[Run the analysis command]
**Contextune Verification Complete**
User choice: Option 1 (/sc:analyze)
Action taken: Ran code analysis
Result: Found 3 potential issues in authentication.py
[Analysis output]
This command is invoked via:
# From hook:
response = {
"continue": True,
"hookSpecificOutput": {
"additionalContext": "[Contextune delegation directive]"
}
}
The main agent receives this context and spawns you as a sub-agent to handle verification.
What the command file sets; muted values are Claude Code's defaults
verification, command-confirmation, contextune, slash-command, detection
7-day visitors to each command page
14 commands in this plugin
/ctx:configureInteractive configuration for Contextune features (output style, status bar, CLAUDE.md)npx claudepluginhub shakestzd/contextune --plugin contextuneOther plugins' commands for the same job