mcpField
F
forbid

forbid

github.com/terrylicaAgent workflows144 installsUpdated 1d ago
Repository

About forbid

forbid is a skill for managing items that an RU loop should exclude from opportunity discovery. It updates project configuration so changes take effect on the next iteration.

Key features

  1. 01Add forbidden items
  2. 02List current items
  3. 03Remove matching items
  4. 04Clear the forbidden list

Use cases

  1. 01Exclude documentation updates from discovery
  2. 02Review or revise loop guidance

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/terrylica/cc-skills --skill forbid

After installing, type/forbidin Claude Code to confirm it loaded.

Bundled filesreferences/evolution-log.md

Details

From the project README

RU: Forbid

Add items to the forbidden list during an active loop session. Forbidden items are blocked from opportunity discovery.

Runtime configurable: Works with or without active loop. Changes apply on next iteration.

Self-Evolving Skill: This skill improves through use. If instructions are wrong, parameters drifted, or a workaround was needed — fix this file immediately, don't defer. Only update for real, reproducible issues.

Usage

  • /ru:forbid documentation updates - Add "documentation updates" to forbidden list
  • /ru:forbid --list - Show current forbidden items
  • /ru:forbid --clear - Clear all forbidden items
  • /ru:forbid --remove <phrase> - Remove item matching phrase (fuzzy)

Execution

/usr/bin/env bash << 'RALPH_FORBID_SCRIPT'
PROJECT_DIR="${CLAUDE_PROJECT_DIR:-$(pwd)}"
CONFIG_FILE="$PROJECT_DIR/.claude/ru-config.json"

# Get arguments
ARGS="${ARGUMENTS:-}"

# Ensure config file exists with guidance structure
if [[ ! -f "$CONFIG_FILE" ]]; then
    echo '{"guidance": {"forbidden": [], "encouraged": []}}' > "$CONFIG_FILE"
fi

# Ensure guidance structure exists
if ! jq -e '.guidance' "$CONFIG_FILE" >/dev/null 2>&1; then
    jq '. + {guidance: {forbidden: [], encouraged: []}}' "$CONFIG_FILE" > "$CONFIG_FILE.tmp" && mv "$CONFIG_FILE.tmp" "$CONFIG_FILE"
fi

# Handle commands
case "$ARGS" in
    "--list"|"-l")
        echo "Current forbidden items:"
        jq -r '.guidance.forbidden[]?' "$CONFIG_FILE" | while read -r item; do
            echo "  ✗ $item"
        done
        COUNT=$(jq -r '.guidance.forbidden | length' "$CONFIG_FILE")
        echo ""
        echo "Total: $COUNT items"
        ;;
    "--clear"|"-c")
        jq '.guidance.forbidden = []' "$CONFIG_FILE" > "$CONFIG_FILE.tmp" && mv "$CONFIG_FILE.tmp" "$CONFIG_FILE"
        echo "Cleared all forbidden items"
        ;;
    --remove\ *)
        PHRASE="${ARGS#--remove }"
        MATCH=$(jq -r --arg phrase "$PHRASE" \
            '.guidance.forbidden[] | select(. | ascii_downcase | contains($phrase | ascii_downcase))' \
            "$CONFIG_FILE" | head -1)
        if [[ -z "$MATCH" ]]; then
            echo "No forbidden item matches: $PHRASE"
            exit 1
        fi
        TS=$(date -u +%Y-%m-%dT%H:%M:%SZ)
        jq --arg match "$MATCH" --arg ts "$TS" \
            '.guidance.forbidden |= map(select(. != $match)) | .guidance.timestamp = $ts' \
            "$CONFIG_FILE" > "$CONFIG_FILE.tmp" && mv "$CONFIG_FILE.tmp" "$CONFIG_FILE"
        echo "Removed from forbidden list: $MATCH"
        ;;
    "")
        echo "Usage: /ru:forbid <phrase> | --list | --clear | --remove <phrase>"
        echo ""
        echo "Current forbidden items:"
        jq -r '.guidance.forbidden[]?' "$CONFIG_FILE" | while read -r item; do
            echo "  ✗ $item"
        done
        ;;
    *)
        TS=$(date -u +%Y-%m-%dT%H:%M:%SZ)
        jq --arg item "$ARGS" --arg ts "$TS" \
            '.guidance.forbidden = ((.guidance.forbidden // []) + [$item] | unique) | .guidance.timestamp = $ts' \
            "$CONFIG_FILE" > "$CONFIG_FILE.tmp" && mv "$CONFIG_FILE.tmp" "$CONFIG_FILE"
        echo "Added to forbidden list: $ARGS"
        echo ""
        echo "Current forbidden items:"
        jq -r '.guidance.forbidden[]?' "$CONFIG_FILE" | while read -r item; do
            echo "  ✗ $item"
        done
        ;;
esac
RALPH_FORBID_SCRIPT

Run the bash script above to manage forbidden items.

How It Works

  1. Config file: Changes are written to .claude/ru-config.json
  2. Next iteration applies: The Stop hook reads config fresh on each iteration
  3. Template rendering: Forbidden items appear in the ## USER GUIDANCE section

Troubleshooting

IssueCauseSolution
jq error on addConfig file malformedRun /ru:settings reset to recreate
Item not appearingTypo or different casingUse --list to verify exact text
Forbidden not enforcedRU not runningStart with /ru:start
Remove by phrase failsNo match foundUse --list to see exact item names
Config file not found.claude dir missingCreate with mkdir -p .claude

Post-Execution Reflection

After this skill completes, check before closing:

  1. Did the command succeed? — If not, fix the instruction or error table that caused the failure.
  2. Did parameters or output change? — If the underlying tool's interface drifted, update Usage examples and Parameters table to match.
  3. Was a workaround needed? — If you had to improvise (different flags, extra steps), update this SKILL.md so the next invocation doesn't need the same workaround.

Only update if the issue is real and reproducible — not speculative.

Comments

Markdown supported