In `extract*` helpers under `internal/provider/**/resource_*.go` that feed `Replace*`/`Update*` SDK calls, never collapse `IsNull()` and `IsUnknown()` into one branch. Null = clear; unknown = omit.
69
83%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Trigger: an extractor turns a types.Set/List/Map/Object into an SDK request body, and you see if x.IsNull() || x.IsUnknown() returning the same value.
Fix:
if x.IsUnknown() {
return nil, nil // omit key → server keeps existing value
}
if x.IsNull() {
return []sdk.Foo{}, nil // explicit empty → server clears on Replace
}Why: the SDK's ToMap() uses IsNil() to decide whether to emit a JSON key. Collapsing both states either silently preserves removed values (both → nil) or silently destroys values still being resolved (both → empty slice).
f197371
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.