api-reorders-unordered-list
Use when apply fails with 'inconsistent result' where list items swap places (targets[0] now holds targets[1]'s value), or a plan shows reorder-only diffs…
от coralogix★ 22 звезды на GitHub
Установить api-reorders-unordered-list в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
API returns an unordered list in a different order
Trigger: "Provider produced inconsistent result after apply" where x[0].id, x[1].id, ... hold the same values as the plan, but at other indexes. Often intermittent: the same fixture passes in one test and fails in another.
Fix: When order has no meaning and the attribute is an already-released ListNestedAttribute, compare the API list with the prior list before flatten. Use the plan in Create/Update and the state in Read. Compare them as a multiset of the full item content. Same items in a different order: return the prior list. Different items: keep the API order, so the plan shows the drift. Compare full content, not a key, because keys can repeat (the API accepts two targets with the same connector and preset). See orderTargetsLike in internal/provider/notifications/resource_coralogix_global_router.go.
alignRuleTargets(result.Router.GetRules(), router.Rules) // router = extracted from plan
plan, diags = flattenGlobalRouter(ctx, result.Router)
Do not change a released list to SetNestedAttribute for this: it needs a new schema version and breaks index references like targets[0]. For a new attribute, prefer a set.
An import has no prior list, so it keeps the API order. In an acceptance test, skip the list in ImportStateVerifyIgnore and compare it as a multiset in ImportStateCheck against targets saved in the apply step, see ruleTargets in internal/provider/resource_coralogix_global_router_test.go. Skip .#/.% entries equal to "0", as ImportStateVerify does.
Why: A Terraform list is ordered, so any order change counts as a change, even when the backend treats the items as a set.
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл api-reorders-unordered-list?
Use when apply fails with 'inconsistent result' where list items swap places (targets[0] now holds targets[1]'s value), or a plan shows reorder-only diffs. Keep prior order when the items match as a set.
Как установить скилл api-reorders-unordered-list?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл api-reorders-unordered-list запускает скрипты?
Нет, скилл состоит только из инструкций (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…