Brainstorming

From ippontech/terraform-provider-anthropic · View interactive version

Brainstorming is an AI agent skill from the GitHub repository ippontech/terraform-provider-anthropic. Plans and scaffolds Anthropic API endpoints as Terraform resources/data sources without a task management tool. TRIGGER when: user says "implement GitHub issues", references a range of GitHub issues to implement (e.g. "issues 52 to 57"), asks to parallelize implementation of multiple resources/data

How to use this skill

Skill file

brainstorming

Use this skill when you need to plan and scaffold the implementation of a new

Anthropic API as Terraform resources and data sources in this provider, without

using Vibe Kanban.

Trigger

The user says something like:

Workflow

Step 1 — Discover the API

Fetch the API overview and all relevant endpoint pages:

WebFetch: https://platform.claude.com/docs/en/api/overview

Then fetch each individual endpoint page to collect the full schema (request

body, path params, query params, response fields). Run all fetches in parallel.

For each endpoint, identify:

data source (Read-only lookup or list)

Mapping heuristic:

Also check the Go SDK for existing types:

find $(go env GOPATH)/pkg/mod/github.com/anthropics/anthropic-sdk-go* -name "beta*.go" | xargs grep -l "<Resource>"

Step 2 — Plan issues

Create one issue per resource/data source. Each issue must include:

  1. API spec — endpoint, SDK method signatures, request/response fields
  2. Terraform schema — attribute table with types and R/W annotations
  3. Files to create/modify — Go source, test file, example, template, native test
  4. Go tests — the TestAcc* functions for a standard-key resource, or the httptest unit tests for an Admin API or OAuth resource, with what each verifies
  5. Terraform native test: .tftest.hcl snippet with the file-level test { parallel = true } block, a ../examples/... module source and assert blocks

Do NOT create a separate issue for tests. Tests are part of every issue.

Step 3 — Create GitHub issues and branches

For each issue, in a single parallel message:

Branch naming convention:

Step 4 — Note on PRs

GitHub requires at least one commit before a PR can be opened. Always inform the user:

"Branches are created and ready. Open a draft PR on each branch once the first commit is pushed."

Invariants (never violate)

One PR per issue — no bundled PRs

Each GitHub issue must result in exactly one dedicated PR. Never batch

multiple issues into one PR, even if the changes seem small or related. Reviewers

need one PR per logical unit.

Branch isolation during parallel implementation

When implementing issues in parallel, each agent must only commit changes that

belong to its own issue onto its own branch. An agent must never:

Use EnterWorktree / isolated worktrees to enforce this boundary.

Implementation guidance

Each issue description should reference:

and the terraform-provider skill.

terraform-provider-review subagent pointing at the changed files.

Parallelization rules

| Step | Strategy |

|---|---|

| Fetch API docs pages | One WebFetch per page in a single message |

| Create GitHub issues + branches | All issue_write + create_branch calls in a single message |

| Implementation | All issues are independent — can be parallelized across agents |

Issue description template

<One-line summary of what this implements.>

## Branch
`<branch-name>` (open PR once first commit is pushed)

## API
- `METHOD /v1/<path>` — description

## SDK methods (anthropic-sdk-go)
- `client.Beta.<Service>.<Method>(ctx, params)` → `ResponseType`

## Terraform schema
| Attribute | Type | R/W |
|---|---|---|
| `id` | string | Computed |
| `...` | ... | ... |

## Files to create / modify
From `CLAUDE.md`, *Adding a resource or data source* (for a data source: `_data_source.go`, `dataSourceRegistrations()`, `examples/data-sources/<name>/data_source.tf`, `templates/data-sources/`, `docs/data-sources/`).
- `internal/services/<service>/<name>_resource.go`: `package <service>`
- `internal/services/<service>/<name>_resource_test.go`: Go acceptance tests, `package <service>_test` (standard-key objects and read-only Admin API data sources, see *Go tests*)
- `internal/services/<service>/<name>_resource_internal_test.go`: unit tests against an `httptest` server, `package <service>`, when they need unexported symbols, and always for an Admin API or OAuth resource
- `internal/provider/registry.go`: register the factory in `resourceRegistrations()`, declaring whether each cloud platform serves it
- `examples/resources/<name>/resource.tf`: resource blocks and outputs only (embedded in the Registry docs)
- `examples/resources/<name>/versions.tf`: the `terraform {}` block
- `templates/resources/<name>.md.tmpl`: non-empty `subcategory: "<Category>"`
- `tests/<name>.tftest.hcl`: Terraform native test
- `docs/resources/<name>.md`: generated by `make generate`, never edited by hand

## Go tests
Which tests run live depends on the credential (`CLAUDE.md`, *Testing*):
- Standard key: `TestAcc<Name>Resource_basic` creates the object with a minimal config, checks `id` is set, then runs an `ImportState` step; a `CheckDestroy` function verifies the object is gone (or archived) after destroy; gated on `acctest.PreCheck`.
- Admin API or OAuth resource: no live create test, since there is no test organization yet (#58) and OAuth-gated tests are not run. `httptest` tests in `<name>_resource_internal_test.go` (`admintest.NewClient` / `oauthtest.NewClient`) cover create, read, update, delete, import and 404s, and the native test stays at `command = plan`.
- Read-only Admin API data source: a smoke acceptance test gated on `acctest.PreCheckAdmin` that reads `terraform-tests` and asserts presence (`<list>.#`), not values, next to the `httptest` tests.

## Terraform native test (`tests/<name>.tftest.hcl`)

test {

parallel = true

}

run "<name>_resource_creates_<name>" {

module {

source = "../examples/resources/<name>"

}

assert {

condition = output.<name>_id != ""

error_message = "Expected <name>_id to be non-empty."

}

}

Admin API and OAuth resources plan only (`command = plan`, dummy credential in a `provider "anthropic"` block of the test file) and assert on configured values, since computed ones such as `id` are unknown at plan; self-contained list data sources use `mock_provider "anthropic" {}`. Details in `CLAUDE.md`, *Terraform native tests*.

Run `make` after implementation, then `make terraform-test`, then stage the new files and run `pre-commit run -a` (it skips untracked files).

Example invocation

User: "I'd like to implement /v1/environments APIs"

  1. Fetch https://platform.claude.com/docs/en/api/overview + all Environments endpoint pages in parallel
  2. Identify: anthropic_environment resource + anthropic_environment data source + anthropic_environments data source
  3. Create 3 GitHub issues + 3 branches in parallel (all in one message)
  4. Report summary table to the user and remind them to open draft PRs after first commits
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.