fix-api-pr-iac-gap
Use when you are given an API PR (a PR URL from the management API repo) whose Terraform preview is red, or that needs provider work before Terraform can…
от coralogix★ 22 звезды на GitHub
Установить fix-api-pr-iac-gap в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Fix an IaC gap for an API PR
Trigger: someone gives you an API PR URL. Its Terraform preview failed (cheap tier: tfgen check; full tier: generate, unit tests, or staging tests), or the field cannot reach Terraform without provider work.
Input: the API PR URL. Take the repository and the number only from that URL. Never write the URL, the PR number, a Jira key, or a DEV field name into this repository: no code, comment, commit message, changelog line, or provider PR body. This repository is public, and the API repository is private.
Steps
Read the failure.
gh pr view <API PR URL> --comments. Use the newest comment that has the marker<!-- terraform-dev-preview-comment -->. Note the resource, the tier, the failing stage (check, generate, unit tests, or staging tests), and the failure codes (CONTRACT_MISMATCH,IAC_HINT_INVALID,READ_DROPS_VALUE, ...).Decide who owns the fix. Use the owner column of the failure lines and the knobs on the proto field, both in
tools/iac-codegen/README.md.- The API proto is wrong or missing a fact (a missing knob, a server default, a field the API drops): stop. The backend fixes it in the proto. Tell the user which code and field, and post nothing.
- Our pipeline in the API repository is wrong (OpenAPI generator, lint, preview script): stop here too, and tell the user. That fix happens in the API repository, and it posts its own marker there.
- The provider is wrong or lacks support (generator,
behavior-overrides.yaml,acceptance.yaml, a hook, resource code): continue.
Reproduce locally. Build the candidate spec of the API PR head as the API repository's Terraform preview does. Run
go run ./cmd/tfgen check --resource <r> --openapi <candidate>fromtools/iac-codegenfirst. Then reproduce the failure at the stage that the preview reported. It must fail the same way:check(cheap tier):tfgen checkfails.- Generate:
tfgen generatefor the resource fails. When generation needs SDK symbols that no release has, use thetfgen-generate-against-candidate-sdkskill. - Unit tests:
go build ./... && go vet ./...or the resource's unit tests fail after generation. - Staging tests: the targeted
make testacc TESTARGS='-run=<test of the resource>'fails.
A later stage can fail while
tfgen checkpasses. That is expected.Fix it in the provider. Prefer a generator change that works for every resource over an override line for one resource. Follow
CLAUDE.mdand the other skills.Prove it passes locally. All of these must pass:
tfgen checkon the candidate spec.tfgen generatefor the resource, thengo build ./... && go vet ./....go test ./...intools/iac-codegenwhen the generator changed, and the golden diff check of its README.- The targeted
make testacc TESTARGS='-run=<test of the resource>'. Record test names and pass/fail only.
Open the provider PR. Use the
create-prskill. The body describes the provider change in provider words, with nothing from the API PR (see Input).Post one marker comment on the API PR. See Marker. Show the comment to the user and wait for approval before you post it.
Marker
Pick where from the files that the provider PR changes. If more than one applies, use the first one in this list:
where |
Files |
|---|---|
generator |
tools/iac-codegen/**, except testdata/, golden output, and README.md |
overrides |
A file in internal/provider/generated/<r>/ that has no Code generated ... DO NOT EDIT. header (behavior-overrides.yaml, acceptance.yaml, upgrade-attributes.yaml), a hook, or other handwritten code under internal/provider/ |
A PR that changes only generated files (files with the header), go.mod, go.sum, CHANGELOG.md, or docs gets no marker. That delivery needed no code change by us.
Post exactly this shape, with gh pr comment <API PR URL> --body-file <file>:
<!-- iac-gap-fix:v1 {"tool":"terraform","pr":1044,"where":"generator","codes":["CONTRACT_MISMATCH"]} -->
IaC follow-up: terraform-provider-coralogix#1044 changes the generator so this change generates (CONTRACT_MISMATCH).
- One comment per provider PR. A second provider PR for the same API PR gets its own comment. The tracking counts all markers of one API PR and tool as one delivery, and takes the biggest
where(generatorbeforeoverrides). - Post it when the provider PR opens. The merge time is read from GitHub later.
- No
@mentions.
Why: the team tracks which API changes reached Terraform with no provider work, and which needed a generator or override change. Only the person who fixed the gap knows the cause for sure. The marker records it on the API PR, so this public repository holds nothing from that PR.
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл fix-api-pr-iac-gap?
Use when you are given an API PR (a PR URL from the management API repo) whose Terraform preview is red, or that needs provider work before Terraform can generate it: make it pass tfgen check, generate, and the targeted acceptance tests locally, open the provider PR, then post one gap-fix marker comment on the API PR. Do NOT use when the fix belongs in the API proto (the backend owns that).
Как установить скилл fix-api-pr-iac-gap?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл fix-api-pr-iac-gap запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…