Skip to content

Add claude-api-integration skill - #4

Merged
ryleckenby merged 1 commit into
add-branch-base-guidancefrom
add-claude-api-skill
Jul 29, 2026
Merged

Add claude-api-integration skill#4
ryleckenby merged 1 commit into
add-branch-base-guidancefrom
add-claude-api-skill

Conversation

@ryleckenby

Copy link
Copy Markdown
Owner

Distills the production lessons from building and live-debugging Keel's Claude-powered AI proxy into a generic, reusable skill:

  • Key custody — API keys live server-side only (proxy + secret store).
  • Structured outputs over forced tool callsoutput_config.format constrains responses to schema-valid JSON; forced tool_choice intermittently emitted XML-ish text payloads in production.
  • Schema hardening — pin additionalProperties: false, strip constraint keywords the API rejects (minimum/maximum etc.), keep constraints in your own validator; retry once on validation failure and design a graceful client fallback.
  • Cost policy — cheapest model that passes the bar, max_tokens as a hard per-call ceiling, thinking off unless measurably needed, model switches only with owner sign-off.
  • Testing discipline — free checks first (types/compile/auth probes), then exactly one paid smoke call; verify deploys by version id, not vibes.

Stacked on #3 (add-branch-base-guidance) because this edits LOG.md/CLAUDE.md/README.md, which the open #1#2#3 stack also touches — the branch-base rule from #3, applied. Retargets automatically as the stack merges.

🤖 Generated with Claude Code

Production lessons from building and live-debugging the Keel AI proxy, distilled
into a generic skill: server-side key custody; structured outputs
(output_config.format) instead of forced tool calls (the malformed-payload
flake); schema hardening (additionalProperties:false, strip unsupported
constraints) with server-side validation + one retry; cheapest-model cost
policy with max_tokens as a hard ceiling; free-checks-first / one-smoke-call
testing discipline; verify deploys by version, not vibes.

Registered in CLAUDE.md and the README skills index; LOG.md entry added.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@ryleckenby
ryleckenby merged commit 38a9904 into add-branch-base-guidance Jul 29, 2026
3 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