Skip to content

Add embedded Claude Code Skills + AGENTS.md for AI agents#18

Open
Snodgrass-Wilkerschnoz wants to merge 1 commit into
developfrom
feat/claude-skills-embed
Open

Add embedded Claude Code Skills + AGENTS.md for AI agents#18
Snodgrass-Wilkerschnoz wants to merge 1 commit into
developfrom
feat/claude-skills-embed

Conversation

@Snodgrass-Wilkerschnoz

Copy link
Copy Markdown

What & why

Extends the CLI's agent integration with the operational monitoring lifecycle, not just monitor setup. It adds eight current-format Claude Code Skills embedded in the binary, plus a repo-root AGENTS.md so non-Claude agents (OpenAI Codex, Cursor, Gemini CLI, …) get the same guidance from one source of truth.

This is purely additive. The existing setup-* skills, skills install --claude-code, --codex, --dir, and onboard behave exactly as before.

Skills added

Embedded under skills/claude-skills/<name>/SKILL.md:

Skill Purpose Mutates config?
apimetrics-project-bootstrap Select a project and stand up verified scheduled monitoring Yes; explicit invocation
apimetrics-weekly-health-review Analyze the previous seven complete days No
apimetrics-failure-investigation Root-cause one result or a failure series No
apimetrics-incident-triage Blast radius and common cause across monitors No
apimetrics-monitoring-estate-audit Coverage, hygiene, stale/duplicate monitors No
apimetrics-slo-review SLO design, attainment, error-budget risk No
apimetrics-config-as-code Safe bulk checkout/diff/push workflow Yes; explicit invocation
apimetrics-performance-analytics Latency percentiles, component timing, DNS analytics No

CLI change (additive)

skills/skills.go:

  • New embed //go:embed claude-skills (separate from the untouched embed/*.md).
  • New flag apimetrics skills install --claude-skills → installs .claude/skills/<name>/SKILL.md (current Claude Code Skills format; preserves disable-model-invocation/argument-hint, so read-only skills auto-load and mutation skills stay gated).
  • Existing --claude-code (flat .claude/commands/), --codex, --dir, and onboard are unchanged.

AGENTS.md (non-Claude agents)

New repo-root AGENTS.md — the cross-agent standard read by OpenAI Codex, Cursor, Gemini CLI, and others. It carries the core CLI facts (flat commands, JSON-on-stdin, no --api-key, output/filtering, the non-uniform list envelopes, discovery-first) and a workflow index that points at the skill files. Any agent can also run apimetrics onboard to pull the full workflows.

Grounding

Every command name and JSON shape is grounded in the built CLI's actual command surface (branch develop, commit 9697405; 213-command tree). Notable corrections baked into the skills: get-result is a summary (forensics come from get-result-content/query-*/conformance-results); percentiles are server-computed via query-*-performance; API assertions use set-call-conditions; SLOs are CRUD-only (no attainment endpoint); MCP uses run-monitor; and there is no --api-key flag.

Testing

  • go build ./... and go build -tags prod — pass.
  • go test ./... — pass.
  • apimetrics skills install --claude-skills writes the eight .claude/skills/<name>/SKILL.md files.
  • apimetrics skills install --claude-code still writes the three flat .claude/commands/*.md (unchanged).

Follow-ups (not in this PR)

  • The three existing setup-* embedded skills still reference a non-existent --api-key flag in their 401/403 recovery notes; worth a one-line fix each (left out here to keep this PR additive).
  • No tests currently guard the skills package (frontmatter validity, name==dir slug, embedded inventory, no stale names) — recommended as a small follow-up.

🤖 Generated with Claude Code

… agents

Add eight current-format Claude Code Skills covering the operational
monitoring lifecycle, embedded in the CLI and installable to
.claude/skills/<name>/SKILL.md via a new, additive `skills install
--claude-skills` flag. Also add a repo-root AGENTS.md so non-Claude
agents (OpenAI Codex, Cursor, Gemini CLI, ...) get the same guidance.

Skills: project-bootstrap, weekly-health-review, failure-investigation,
incident-triage, monitoring-estate-audit, slo-review, config-as-code,
performance-analytics. Every command and JSON shape is grounded in the
built CLI's actual command surface (branch develop, commit 9697405).

The existing setup-* skills, `--claude-code`, `--codex`, `--dir`, and
`onboard` behavior are unchanged; this is purely additive.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

### 1. Discover SLO operations

The SLO command set is CRUD only: `list-slos`, `get-slo <slo-id>` (not `read-slo`), `create-slo`, `update-slo`, `delete-slo`. There is **no SLO attainment, status, or error-budget endpoint** — the CLI returns SLO *definitions*, not computed attainment. Plan to derive attainment yourself from result and performance data (step 4).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❗ Much better to derive attainment from the get-incidents operation (which seems to have been missed, or misunderstood) than to start from scratch.

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.

2 participants