# M128 — CC 2.1.122 + 2.1.126 adoption

Interactive playground for PR #1585. Closes #1580, #1581, #1582, #1583, #1584. All simulated data — no live OTEL feed.
CC 2.1.122 CC 2.1.126 Floor 2.1.118 → 2.1.122

## Skill activation by trigger type — CC 2.1.126

CC 2.1.126 added the `invocation_trigger` attribute to `claude_code.skill_activated`. Values: `user-slash`, `claude-proactive`, `nested-skill`. This panel renders Panel 7 from `analytics/references/otel-fields.md`.

user-slash claude-proactive nested-skill Sort:
user-slash claude-proactive nested-skill

### Reading the data

- High proactive_ratio (>50%) — description is doing its job; model finds the skill from intent.
- Low proactive_ratio (<10%) and low total — description may be too narrow. Candidate for sharpening or for `user-invocable: true`.
- High nested_skill — composed by other skills (e.g., `/ork:design-import` → `component-search`).

### Underlying jq query

    # Panel 7 — Skill activation by trigger type (CC 2.1.126, #1581)
    jq -s 'map(select(.invocation_trigger != null))
      | group_by(.skill_name)
      | map({
          skill: .[0].skill_name,
          total: length,
          user_slash: (map(select(.invocation_trigger == "user-slash")) | length),
          claude_proactive: (map(select(.invocation_trigger == "claude-proactive")) | length),
          nested_skill: (map(select(.invocation_trigger == "nested-skill")) | length),
          proactive_ratio: ((map(select(.invocation_trigger == "claude-proactive")) | length) / length * 100 | floor)
        })
      | sort_by(-.total)' ~/.claude/otel/skill-activated.jsonl 2>/dev/null

## Most-mentioned @-targets — CC 2.1.122

CC 2.1.122 added the `claude_code.at_mention` log event. Top-mentioned files, dirs, and URLs are CLAUDE.md candidates or worth a custom slash-command shortcut.

Filter:
Show top:

# | Target | Type | Count
--- | --- | --- | ---

### Underlying jq query

    # Panel 8 — Most-mentioned @ targets (CC 2.1.122, #1584)
    jq -s 'map(select(.target != null))
      | group_by(.target)
      | map({target: .[0].target, count: length})
      | sort_by(-.count)
      | .[0:20]' ~/.claude/otel/at-mentions.jsonl 2>/dev/null

## --dangerously-skip-permissions scope expansion

The flag's scope grew across CC 2.1.121 and CC 2.1.126. Recommend against this flag for shared workstations, CI runners, and onboarding sessions. Use the auto-approve permission hooks instead — fine-grained allow-listing without disabling the safety net wholesale.

#### BEFORE 2.1.121 — protected by default

- prompts: writes to `.claude/skills/`
- prompts: writes to `.claude/agents/`
- prompts: writes to `.claude/commands/`
- prompts: writes to `.claude/` (other paths)
- prompts: writes to `.git/` (config, hooks, refs)
- prompts: writes to `.vscode/`
- prompts: writes to `~/.bashrc`, `~/.zshrc`, etc.
- prompts: catastrophic `rm -rf` on system paths

#### AFTER 2.1.126 — much narrower safety net

- writes to `.claude/skills/` → skipped (since 2.1.121)
- writes to `.claude/agents/` → skipped (since 2.1.121)
- writes to `.claude/commands/` → skipped (since 2.1.121)
- writes to `.claude/` → skipped (2.1.126)
- writes to `.git/` → skipped (2.1.126)
- writes to `.vscode/` → skipped (2.1.126)
- writes to shell config files → skipped (2.1.126)
- prompts: catastrophic `rm -rf` on system paths

### Recommended alternative

    # settings.json — auto-approve narrow patterns instead of blanket flag
    {
      "hooks": {
        "PermissionRequest": [
          { "matcher": "Read",  "command": "permission/auto-approve-readonly" },
          { "matcher": "Bash",  "command": "permission/auto-approve-safe-bash" },
          { "matcher": "Write", "command": "permission/auto-approve-project-writes" }
        ]
      }
    }

See `src/hooks/README.md` Permission Hooks section + `src/skills/setup/SKILL.md` for the full policy.

## claude project purge — simulator

CC 2.1.126 added `claude project purge [path]` — deletes transcripts, tasks, file history, config entry. Always preview with `--dry-run` first. Wired into `/ork:doctor` Category 14 + `/ork:dream` STEP 8 as info-severity, never auto-executed.

// Click a button above to simulate output

### Doctor wiring (Category 14, #1582)

    # Detect stale project state (gated on CC ≥ 2.1.126)
    ls ~/.claude/projects/ 2>/dev/null | while read p; do
      decoded=$(printf '%s' "$p" | sed 's|-|/|g')
      [ ! -d "/$decoded" ] && echo "$p"
    done
    # If > 0, surface info diagnostic. Suggest: claude project purge --dry-run --all
    # NEVER auto-execute. The user may have moved (not deleted) a project.