ゆる草

Results comments of ゆる草

**Hook workaround: strip `--no-stat` automatically** Until this is fixed upstream, you can use a [PreToolUse hook](https://docs.anthropic.com/en/docs/claude-code/hooks) to silently rewrite `git show ... --no-stat` into a valid command. **`git-show-flag-sanitizer.sh`:** ```bash INPUT=$(cat)...

**Workaround — hooks in user settings.json are enforced regardless of project settings:** While permission rules may not cascade correctly from user to project level, hooks defined in `~/.claude/settings.json` **do** apply...

User-level permissions in `~/.claude/settings.json` don't reliably apply at project level — this is a known issue. Hooks are the fix because they always propagate: ```bash INPUT=$(cat) COMMAND=$(echo "$INPUT" | jq...

Until smart session renaming is built in, here are ways to make sessions identifiable: **Workaround 1 — SessionStart hook to auto-name sessions:** ```jsonc { "hooks": { "SessionStart": [ { "hook":...

A PreCompact hook can save critical state before compaction happens: ```bash HANDOFF="$HOME/.claude/session-handoff.md" { echo "# Pre-Compact State ($(date -Iseconds))" echo "" [ -d .git ] && echo "Branch: $(git branch...

This is a known structural limitation — compaction summarizes conversation history but doesn't preserve the full CLAUDE.md context. Two workaround approaches using hooks: **1. Save state before compaction (PreCompact hook)**...

This is the same issue as #18949 — plugin-installed skills don't appear in slash command autocomplete, while locally installed skills do. See workarounds in my comment on #18949: https://github.com/anthropics/claude-code/issues/18949#issuecomment-4159551466 TL;DR:...

A `UserPromptSubmit` hook can load skills from subdirectories: ```bash MARKER="/tmp/cc-skills-loaded-$$" [ -f "$MARKER" ] && exit 0 touch "$MARKER" SKILLS_DIRS=('.claude/skills' '$HOME/.claude/skills') CONTEXT="" for base in "${SKILLS_DIRS[@]}"; do eval base="$base" [...