Skip to content

Add claude skills#1

Merged
digitalashes merged 3 commits intomainfrom
OBS-STCK-01-claude-skills
Mar 12, 2026
Merged

Add claude skills#1
digitalashes merged 3 commits intomainfrom
OBS-STCK-01-claude-skills

Conversation

@digitalashes
Copy link
Contributor

What does this PR do?

Adds 6 Claude Code skills (/obs-status, /obs-cost, /obs-sessions, /obs-tools, /obs-alerts, /obs-query) for querying the obs stack directly from the conversation.

Includes scripts/obs-api.sh — centralized auth-ready API client with --jq/--raw flags.

Skills use instruction-based architecture (code blocks, not !command pre-execution) — works without permission configuration.

Related issue

N/A

How to test

docker compose up -d
# then in Claude Code:
/obs-status
/obs-alerts
/obs-cost
/obs-query up

Checklist

  • CI passes
  • Tested locally
  • Documentation updated

digitalashes and others added 3 commits March 11, 2026 21:32
New slash commands: /obs-status, /obs-cost, /obs-sessions, /obs-tools,
/obs-alerts, /obs-query — query Prometheus, Loki, Tempo, Alertmanager
directly from the conversation without switching to Grafana.

All skills use scripts/obs-api.sh — centralized API client with env var
overrides for auth (SHEPARD_API_TOKEN, SHEPARD_CA_CERT) ready for future
multi-machine and TLS hardening.

Un-ignores .claude/skills/ in .gitignore so skills are versioned with
the repo. Updates README, CLAUDE.md, and CHANGELOG.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Skills used shell pipes (cmd | jq) which required multiple permission
approvals in Claude Code. Now obs-api.sh handles jq internally via
--jq and --raw flags — each skill command is a single executable,
no pipes, works out of the box without permission dance.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Replace !`command` pre-execution with code block instructions
  (Claude executes via Bash tool with normal approval flow)
- Add references: resolution-hints.md (16 alerts), examples.md (PromQL/LogQL)
- Add shared assets: output-formats.md (table/csv/json rules)
- Fix {label!=""} breaking max_over_time/increase queries — moved to jq filters
- Rewrite obs-sessions: span-metrics lack session_id/model labels,
  replaced with cost metrics + Tempo search + session count queries
- Remove .claude/settings.json from git tracking (user opt-in permissions)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@digitalashes digitalashes self-assigned this Mar 12, 2026
@digitalashes digitalashes requested review from a team as code owners March 12, 2026 01:49
@digitalashes digitalashes merged commit 382611a into main Mar 12, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant