From respect
This skill should be used when the user types "/oops", reports a mistake, says "that was wrong", or wants to correct Claude's behavior. Handles natural language correction parsing, learning extraction, and guard script generation.
How this skill is triggered — by the user, by Claude, or both
Slash command
/respect:oopsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
The opposite of /tip. Invoked when Claude made a mistake.
The opposite of /tip. Invoked when Claude made a mistake.
Accepts correction size anywhere in the message: /oops medium, /oops that was wrong medium, /oops custom 5 bad mistake, etc.
Use LLM intelligence to parse and extract learning:
small, medium, large, or custom Ncustom: extract the adjacent number (e.g., custom 5, 5 custom)Learning extraction examples:
"that was completely wrong you broke the tests medium" → Structured learning:
broke tests"custom 5 bad mistake you forgot to update the version number" → Structured learning:
forgot version bump"large you didn't check the cached plugin directory" → Structured learning:
missed cached plugin dirRun: bash "$(cat ~/.claude/respect/plugin_root)/scripts/correct.sh" <size> [N for custom] [summarized reason]
If script exited non-zero: relay the error message to the user, stop
Parse the structured KEY=VALUE result and respond conversationally
Write to auto-memory (durable learning):
~/.claude/projects/[ENCODED_CWD]/memory/ where ENCODED_CWD = CWD with / and . replaced by -### YYYY-MM-DD | [Summary] (-N)
**Lesson:** [What NOT to do / What to do instead]
**Context:** [When this mistake happened]
**Why:** [Why this was wrong / Impact of the mistake]
**Session:** N
Determine learning scope (cross-project or local):
timeout on macOS"make integration-test not make test in this repo"src/config/ not project root"~/.claude/respect/global-feedback.md
# Global Respect Feedback
Learnings that apply across all projects.
## Learnings
## Mistakes to Avoid
## Mistakes to Avoid section using the same format as step 5## Mistakes to Avoid, remove oldest if exceededGenerate a guard script to prevent this mistake in the future:
~/.claude/respect/guards/~/.claude/projects/[ENCODED_CWD]/guards/ (where ENCODED_CWD = CWD with / and . replaced by -)no-timeout-on-macos.sh).json extension) with metadataGuard script format:
#!/usr/bin/env bash
# Guard: [summary]
# Lesson: [lesson text]
TOOL_NAME="$1"
TOOL_INPUT="$2" # flattened string of all tool_input values (for pattern matching)
TOOL_INPUT_RAW="${3:-$2}" # raw JSON tool_input (for extracting specific fields like file_path)
# [Check logic here - exit 1 to warn, exit 0 to pass]
exit 0
Trigger file format:
{
"triggers": ["command1", "command2"],
"lesson": "The lesson text",
"tools": ["Bash", "mcp__.*slack.*"],
"created": "YYYY-MM-DD",
"session": N
}
Fields:
triggers (required): keywords to match in tool input (case-insensitive substring match)lesson (required): the lesson text for displaytools (optional): regex patterns for tool names. If omitted, defaults to Bash|Write|Edit|NotebookEdit. Use this to target specific MCP tools (e.g., mcp__.*slack.*, mcp__.*datadog.*) or any combination.created, session: metadataHow to decide triggers, tools, and check logic:
triggers is a list of keywords that appear in tool inputs (commands, filenames, etc.)tools controls WHICH tools the guard applies to:
mcp__.*slack.* for Slack-specific guardsmcp__.* to match ALL MCP tools["Bash", "mcp__.*datadog.*"]$1 = TOOL_NAME, $2 = flattened tool_input string (for pattern matching), $3 = raw JSON tool_input (for extracting fields like file_path)Examples:
"Don't deploy on Fridays":
#!/usr/bin/env bash
TOOL_NAME="$1"
TOOL_INPUT="$2"
if [ "$(date +%u)" -eq 5 ]; then
echo "It's Friday - avoid deploying"
exit 1
fi
exit 0
Triggers: ["git push", "deploy", "kubectl apply"]
"Don't use timeout command on macOS":
#!/usr/bin/env bash
TOOL_NAME="$1"
TOOL_INPUT="$2"
if echo "$TOOL_INPUT" | grep -qw "timeout"; then
echo "timeout is not available on macOS - use gtimeout or alternatives"
exit 1
fi
exit 0
Triggers: ["timeout"]
"Run tests before committing":
#!/usr/bin/env bash
TOOL_NAME="$1"
TOOL_INPUT="$2"
if echo "$TOOL_INPUT" | grep -q "git commit"; then
# Check if tests were run in the last 5 minutes
TEST_LOG=$(find . -name "*.test.*" -newer /tmp/.last_test_run 2>/dev/null)
if [ -z "$TEST_LOG" ]; then
echo "No recent test run detected - consider running tests first"
exit 1
fi
fi
exit 0
Triggers: ["git commit"]
"Don't hardcode passwords":
#!/usr/bin/env bash
TOOL_NAME="$1"
TOOL_INPUT="$2"
if [ "$TOOL_NAME" = "Write" ] || [ "$TOOL_NAME" = "Edit" ]; then
if echo "$TOOL_INPUT" | grep -qiE '(password|secret|api.key)\s*=\s*"[^"]{4,}"'; then
echo "Possible hardcoded secret detected"
exit 1
fi
fi
exit 0
Triggers: ["password", "secret", "api_key"]
"Don't post to Slack outside work hours" (MCP guard):
#!/usr/bin/env bash
TOOL_NAME="$1"
TOOL_INPUT="$2"
HOUR=$(date +%H)
if [ "$HOUR" -lt 9 ] || [ "$HOUR" -ge 18 ]; then
echo "Outside work hours (9-18) - avoid posting to Slack"
exit 1
fi
exit 0
Triggers: ["send_message", "send_message_draft"]
Tools: ["mcp__.*slack.*"]
If guard generation is not possible (too abstract, no programmatic check):
Self-test the guard before reporting success: After writing both files, verify the guard actually works:
Positive test (should fire): run the guard script with a sample input containing the trigger keyword
bash ~/.claude/respect/guards/[name].sh "Bash" "[sample input with trigger]"
Expected: exits non-zero with a warning message
Negative test (should NOT fire): run with a similar but non-matching input
bash ~/.claude/respect/guards/[name].sh "Bash" "[input without trigger or with similar-but-different word]"
Expected: exits 0 silently
If either test fails:
After generating the guard, tell the user:
Parse: DELTA, OLD_BALANCE, NEW_BALANCE, OLD_TIER, NEW_TIER, TIER_CHANGED
Claude never modifies wallet.json directly.
npx claudepluginhub nixon2/respect --plugin respectLogs user corrections like 'wrong' or 'no' as mistakes, updates CLAUDE.md rules, and auto-generates skills from repeated patterns after 3+ occurrences. Triggers on feedback or repetitions.
Captures agent mistakes, corrections, and discovered gotchas so they are not repeated. Use when: (1) a command or operation fails unexpectedly, (2) the user corrects the agent, (3) the agent discovers non-obvious behavior through debugging, (4) an API or tool behaves differently than expected, (5) a better approach is found for a recurring task. Also searches past learnings before starting tasks to avoid known pitfalls. Activate alongside the memory skill — they share sage-memory but serve different purposes (memory = codebase knowledge, self-learning = agent mistakes and gotchas). Also trigger on "sage review" or "review learnings" to curate and improve the learning database.
Detects user corrections, reworks, mistakes, or note requests; runs human-confirmation loops, archives to project/global mistakebook/notebook, refreshes memory caches, escalates to Ascended Mode on repeats.