Skip to content

claude-ops: skill-usage telemetry — machine-local exclude, configurable scope, default decision #1151

Closed

Description

@kyle-sexton

Parent

Source: handoff-inbox item 20260723-090435-melodic-session-plugins-audit (F1, HIGH), producer SW2030 (Windows/PowerShell), plugins user-global.

What to build

claude-ops skill-usage telemetry (hooks/skill-usage-audit.sh + skill-usage-expansion-audit.sh) appends .claude/observability/skill-usage.jsonl under the CONSUMING repo's tree by default. Observed in the field as unattributable ?? .claude/observability/ git-status noise; operator assumed built-in Claude Code behavior (CC's own telemetry never writes the project tree). This is machine-scoped operator telemetry landing as untracked files in every repo the operator touches: status noise, accidental-commit risk, per-repo fragmentation of one operator-level dataset.

Compounding: the skill_usage_dir userConfig knob is validated to stay INSIDE the repo (rejects absolute/drive/UNC/traversal/escaping-symlink), so user/machine scope is unreachable by config — containment as a ceiling instead of a default. And nothing manages ignores (.gitignore correctly untouched, but .git/info/exclude — git's machine-local ignore surface for exactly this — is unused). Additionally the "project-relative" default already silently resolves to ~/.claude/observability/ in non-repo sessions (branch:"unknown" rows observed in a user-level file), so the current design leaks out of its own stated scope.

Ship, cheapest → most ambitious (reproduce/verify each finding first — do not trust the brief's framing):

  • (a) When writing inside a repo tree, idempotently add the telemetry path to .git/info/exclude (machine-local; no tracked-file edit) so git status stays clean.
  • (b) Make scope configurable: either allow user/absolute targets in skill_usage_dir or add a skill_usage_scope: repo|user|data-dir enum, keeping repo-relative available for teams that deliberately commit telemetry. Containment validation remains the repo-scope default, not a ceiling.
  • (c) Decide the default: flipping to the plugin data dir (${CLAUDE_PLUGIN_DATA}) keyed by repo slug is a breaking default change — BEFORE flipping, verify how /claude-ops:observability reads the file (colocation may be load-bearing) and how the non-repo fallback interacts. If flipped, gate on a minor version bump + changelog note; if not flipped, record why on this issue.

Context on built-in alternatives (producer doc-verified 2026-07-23): Claude Code ships no first-party skill-usage counter; OTEL exposes skill.name on token/cost metrics but redacts third-party plugin skill names to "third-party". The bespoke store's unique value = zero-OTEL setup + unredacted third-party names. Weigh in the (c) decision.

Acceptance criteria

  • Repo-tree telemetry writes no longer dirty git status on consuming repos (exclude entry added idempotently, only when the write target is inside a repo work tree)
  • Telemetry destination scope is configurable via userConfig to at least repo-tree and a user/machine-level location, without editing the plugin; zero-config default documented
  • Path validation reflects the chosen model: containment enforced for repo scope, non-repo scopes reachable by config
  • /claude-ops:observability read path verified against every scope the config can select (including the existing non-repo ~/.claude/observability fallback); default-flip decision recorded either way
  • plugin.json version bumped per the change's semver weight; hygiene + skill-quality gates pass

Blocked by

None — can start immediately.

Activity

  1. added theissue type on Jul 23, 2026
  2. added
    status: ready
    on Jul 23, 2026
  3. self-assigned this
    on Jul 23, 2026
  4. kyle-sexton commented on Jul 23, 2026

    @kyle-sexton
    MemberAuthor
    No description provided.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

status: ready

Type

Fields

No fields configured for Bug.

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions