boundary-bbcr-fallback
Execute automatic BBCR (Collapse-Rebirth Correction) when knowledge boundaries are exceeded or reasoning fails.
--- **Attribution**: This command is based on the excellent work by zxdxjtu from the [claudecode-rule2hook](https://github.com/zxdxjtu/claudecode-rule2hook) repository. Licensed under MIT License. Integrated into Claude Command Suite with permission to enhance developer
$ npx -y skills add qdhenry/Claude-Command-Suite --agent claude-codeHow it fires
How this command gets triggered: by you, by Claude, or both.
/rule2hookContext preview
What this command does when you run it.
--- **Attribution**: This command is based on the excellent work by zxdxjtu from the [claudecode-rule2hook](https://github.com/zxdxjtu/claudecode-rule2hook) repository. Licensed under MIT License. Integrated into Claude Command Suite with permission to enhance developer
--- **Attribution**: This command is based on the excellent work by zxdxjtu from the [claudecode-rule2hook](https://github.com/zxdxjtu/claudecode-rule2hook) repository. Licensed under MIT License. Integrated into Claude Command Suite with permission to enhance developer workflows. ---
You are an expert at converting natural language project rules into Claude Code hook configurations. Your task is to analyze the given rules and generate appropriate hook configurations following the official Claude Code hooks specification.
1. If rules are provided as arguments, analyze those rules 2. If no arguments are provided, read and analyze the CLAUDE.md file from these locations:
3. For each rule, determine:
4. Generate the complete hook configuration following the exact JSON structure 5. Save it to `~/.claude/hooks.json` (merge with existing hooks if present) 6. Provide a summary of what was configured
{
"hooks": {
"EventName": [
{
"matcher": "ToolName|AnotherTool|Pattern.*",
"hooks": [
{
"type": "command",
"command": "your-command-here"
}
]
}
]
}
}**Rule**: "Format Python files with black after editing" **Analysis**:
{
"hooks": {
"PostToolUse": [{
"matcher": "Edit|MultiEdit|Write",
"hooks": [{
"type": "command",
"command": "black . --quiet 2>/dev/null || true"
}]
}]
}
}**Rule**: "Run git status when finishing a task" **Analysis**:
{
"hooks": {
"Stop": [{
"hooks": [{
"type": "command",
"command": "git status"
}]
}]
}
}**Rule**: "Check for hardcoded secrets before saving any file" **Analysis**:
{
"hooks": {
"PreToolUse": [{
"matcher": "Write|Edit|MultiEdit",
"hooks": [{
"type": "command",
"command": "git secrets --scan 2>/dev/null || echo 'No secrets found'"
}]
}]
}
}**Rule**: "Run npm test after modifying files in tests/ directory" **Analysis**:
{
"hooks": {
"PostToolUse": [{
"matcher": "Edit|MultiEdit|Write",
"hooks": [{
"type": "command",
"command": "npm test 2>/dev/null || echo 'Tests need attention'"
}]
}]
}
}**Rule**: "Log all bash commands before execution" **Analysis**:
{
"hooks": {
"PreToolUse": [{
"matcher": "Bash",
"hooks": [{
"type": "command",
"command": "echo \"[$(date)] Executing bash command\" >> ~/.claude/command.log"
}]
}]
}
}1. **Error Handling**: Add `|| true` or `2>/dev/null` to prevent hook failures from blocking Claude 2. **Quiet Mode**: Use quiet flags (--quiet, -q) when available 3. **Path Safety**: Use relative paths or check existence 4. **Performance**: Keep commands fast to avoid slowing down Claude 5. **Logging**: Redirect verbose output to avoid cluttering Claude's interface
A comprehensive development toolkit designed following Anthropic's Claude Code Best Practices for AI-assisted software development.
Repo: qdhenry/Claude-Command-Suite
Execute automatic BBCR (Collapse-Rebirth Correction) when knowledge boundaries are exceeded or reasoning fails.
Analyze semantic position relative to knowledge boundaries to prevent hallucination and identify uncertainty zones.
Generate a visual heatmap of knowledge boundaries showing safe zones, risk areas, and semantic coverage.
Evaluate the current risk level and provide detailed analysis of potential hallucination or reasoning failure.
Find and construct semantic bridges to safely navigate from current position to target concept without crossing dangerous boundaries.
Takes an input prompt and returns ONLY a token-optimized version that preserves meaning while minimizing token count. Based on LLM tokenization principles:…