Skip to content
Skills Library
DevOps & cloud · Tool integration

spacelift

/spacelift

Use when working with Spacelift - managing stacks, runs, modules, policies, spaces, contexts, worker pools, blueprints, VCS/cloud integrations, role bindings, audit trail, scheduled runs/tasks; or managing actual infrastructure via intent (create/update/delete/refresh/import resources, intent projects). Wraps the spacelift-local MCP (discover/query/mutate/provider/intent tools). Trigger on terms - spacelift, stack, run, intent, IaC platform, GraphQL Spacelift API, infrastructure resource lifecycle, deploy, provision, tear down, OpenTofu, Terraform managed by Spacelift, Terragrunt, Pulumi.

Licence
MIT
Last repository change
10.11.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
12
Scripts
0
HTML comments
0
URLs in SKILL.md
1
Deprecation

No signals detected. Repository changed on 10.11.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Use when working with Spacelift - managing stacks, runs, modules, policies, spaces, contexts, worker pools, blueprints, VCS/cloud integrations, role bindings, audit trail, scheduled runs/tasks; or managing actual infrastructure via intent (create/update/delete/refresh/import resources, intent projects). Wraps the spacelift-local MCP (discover/query/mutate/provider/intent tools). Trigger on terms - spacelift, stack, run, intent, IaC platform, GraphQL Spacelift API, infrastructure resource lifecycle, deploy, provision, tear down, OpenTofu, Terraform managed by Spacelift, Terragrunt, Pulumi.

Original author description

Use when working with Spacelift - managing stacks, runs, modules, policies, spaces, contexts, worker pools, blueprints, VCS/cloud integrations, role bindings, audit trail, scheduled runs/tasks; or managing actual infrastructure via intent (create/update/delete/refresh/import resources, intent projects). Wraps the spacelift-local MCP (discover/query/mutate/provider/intent tools). Trigger on terms - spacelift, stack, run, intent, IaC platform, GraphQL Spacelift API, infrastructure resource lifecycle, deploy, provision, tear down, OpenTofu, Terraform managed by Spacelift, Terragrunt, Pulumi.

How it works

  1. Tool map
  2. Decision tree
  3. Reference selector
  4. Mandatory ordering rules
  5. Destructive-operation gate
  6. Async polling pattern (intent)
  7. Pitfalls catalog
  8. Outside this skill
Original SKILL.md headings · 93 lines, 894 words
SKILL.md preview
---
name: spacelift
description: Use when working with Spacelift - managing stacks, runs, modules, policies, spaces, contexts, worker pools, blueprints, VCS/cloud integrations, role bindings, audit trail, scheduled runs/tasks; or managing actual infrastructure via intent (create/update/delete/refresh/import resources, intent projects). Wraps the spacelift-local MCP (discover/query/mutate/provider/intent tools). Trigger on terms - spacelift, stack, run, intent, IaC platform, GraphQL Spacelift API, infrastructure resource lifecycle, deploy, provision, tear down, OpenTofu, Terraform managed by Spacelift, Terragrunt, Pulumi.
---

# Spacelift

Procedural guide for the spacelift MCP. Two surfaces share one MCP - the Spacelift control plane (GraphQL: stacks, runs, policies, spaces, integrations) and Intent (lifecycle of actual cloud resources via OpenTofu providers). Most tasks touch both.

## Tool map

| Tool | Purpose |
|---|---|
| `discover` | Browse the GraphQL schema. Modes: `queries`, `mutations`, `type`. Always run **before** `query`/`mutate`. |
| `query` | Execute a read-only GraphQL operation. `select` uses GraphQL selection-set syntax. |
| `mutate` | Execute a GraphQL mutation. **Modifies state** - requires explicit confirmation (see below). |
| `provider` | Inspect OpenTofu providers + resource schemas. Modes: `search`, `describe`, `resources-describe`, `datasources-describe`. **Mandatory** before `intent create`/`update`/`import`. |
| `intent` | Manage real infrastructure: `create`, `update`, `delete`, `refresh`, `import`, `read`, `resume`, `status`. Supports `async=true`. |

## Decision tree

| User wants to... | Start with |
|---|---|
| Read/list/inspect Spacelift entities (stacks, runs, policies, ...) | `discover` → `query` |
| Modify a Spacelift entity (create/update/delete/attach) | `discover` → `mutate` (gated, see below) |
| Create/update real cloud infra (EC2, S3, GCS, ...) | `provider` → `intent` (gated, see below) |
| Import existing cloud infra into intent state | `provider search` → `intent import` |
| Detect drift on managed cloud infra | `intent refresh` |
| Trigger / confirm / discard a stack run | `mutate` with `runTrigger` / `runConfirm` / `runDiscard` |

## Reference selector

Load only the file that matches the question. **Do not preload references.**

| Question / task | Load |
|---|---|
| GraphQL syntax, pagination, search predicates, selection sets | `references/api-discovery.md` |
| Stack lifecycle, settings, dependencies, drift, scheduling, blueprints | `references/stacks.md` |
| Run state machine, plan/confirm/discard/apply, retry, cancel, tasks | `references/runs.md` |
| Policy types (10 of them), role bindings, spaces, attachment rules | `references/policies-spaces.md` |
| AWS/Azure/GCP integrations, VCS providers, contexts, worker pools | `references/integrations.md` |
| Creating an intent project, configElements, attaching policies/AWS/worker pool, exporting to IaC | `references/intent-projects.md` |
| `intent` operation mechanics: provider workflow, async polling, resume gating | `references/intent-operations.md` |
| About to mutate or delete? Read this every time | `references/mutations-safety.md` |

End-to-end recipes: `examples/01-read-only-audit.md`, `examples/02-stack-run-lifecycle.md`, `examples/03-intent-end-to-end.md`.

## Mandatory ordering rules

1. **Always `discover` before `query`/`mutate`.** Don't guess operation names or argument shapes.
2. **Always `provider resources-describe` before `intent create`/`update`/`import`.** Skipping causes "expected X arguments" errors. Provider schemas drift; do not cache across sessions.
3. **Always read `references/mutations-safety.md` before any `mutate` or `intent delete/update`.**

## Destructive-operation gate

Before any `mutate`, `intent create`, `intent update`, or `intent delete`:

1. **State the operation, target, and concrete diff** (current → proposed) in plain prose.
2. **For `intent delete`**: enumerate dependents first (use `searchIntentResources` or `provider resources-describe` linkage).
3. **Block on `YES` or `CONFIRM`** (case-insensitive). No other token confirms. No carryover from prior turns - each destructive call needs a fresh confirmation.

Read-only operations (`query`, `discover`, `provider search`/`describe`, `intent read`/`status`/`refresh`) need no confirmation.

## Async polling pattern (intent)

Some `intent` operations take 10-30 minutes. Use `async=true`, then poll with `intent status`:

- Backoff: 2s → 4s → 8s → 16s → 32s → cap at 60s.
- **Never re-dispatch** a slow operation - the worker is already running.
- If `status` returns `PENDING_REVIEW`, do not call `resume`. Wait for `READY_FOR_EXECUTION`, then `resume` after explicit human approval.

## Pitfalls catalog

Each is real and frequent. Apply the mitigation by default.

| Pitfall | Mitigation |
|---|---|
| User asks "how many X do I have?" - listing every entity is slow and pollutes context | Use `searchXxxSuggestions` with predicates and select `filteredCount` - returns the count without entities |
| Deleted context still attached to stacks - runs fail with missing env var | Before `contextDelete`, list `attachedStacks`; either detach or warn |
| Worker pool deleted while runs queued - orphaned runs | Drain workers (`workerDrainSet`), wait for queue to clear, then delete |
| `stackDelete(destroyResources: true)` runs a destroy plan - destroys real infra | Treat as the most destructive operation; require `CONFIRM` and enumerate dependents |
| `variables` passed as JSON-encoded string (`"{\"id\":\"x\"}"`) | Pass as a JSON object: `{"id": "x"}` |
| Calling `runConfirm` on a run not in `UNCONFIRMED` | Read `state` first; only `UNCONFIRMED` accepts confirm |
| `intent resume` on `PENDING_REVIEW` | Only resume when status is `READY_FOR_EXECUTION` |
| Stale provider schema → "expected X arguments" | Run `provider resources-describe` before each `intent create`/`update` |
| Async over-polling burns tokens / triggers rate limits | Exponential backoff capped at 60s; never re-dispatch |
| Selection-set bloat (`name description createdAt updatedAt ...`) | Request only fields you'll use this turn |
| Pagination forgotten - missing entries on accounts with >50 entities | Use `first`/`after` with `pageInfo.hasNextPage`; loop until exhausted or stop early |
| Mutations are not idempotent (slug collisions on `stackCreate`) | `query` for existence first; handle 409-shaped errors as "already exists" |
| Deprecated fields silently hidden by `discover` | Pass `includeDeprecated: true` only when truly needed |
| Tracked commit drifts behind remote silently | `stackSyncCommit` to refresh; do not assume `trackedCommit` is current |
| Treating `IntentProject` as separate from Spacelift entities | It has `space`, `workerPool`, `attachedPolicies` like a stack - use the same auth/policy mental model |

## Outside this skill

When concepts go beyond what's here (vendor-specific behaviors, billing edge cases, integration-test setups, custom blueprint authoring), consult `https://docs.spacelift.io/sitemap.xml` to find the relevant page, then `WebFetch`.
Files in this package (12)
  • SKILL.md 7 KB
  • examples/01-read-only-audit.md 3 KB
  • examples/02-stack-run-lifecycle.md 3 KB
  • examples/03-intent-end-to-end.md 5 KB
  • references/api-discovery.md 4 KB
  • references/integrations.md 5 KB
  • references/intent-operations.md 5 KB
  • references/intent-projects.md 5 KB
  • references/mutations-safety.md 4 KB
  • references/policies-spaces.md 4 KB
  • references/runs.md 4 KB
  • references/stacks.md 4 KB

Versions

The database has no other skills named spacelift.

Database snapshot: 13.11.2026 · package version 1287cf8eee59 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100terraform-cloud-and-spacelift-iac-orchestration-platforms
    Configures Terraform Cloud/HCP Terraform and Spacelift as state-management- as-a-service and run-orchestration platforms layered on top of raw Terraform — remote state with locking, VCS-driven runs, policy-as-code gates (Sentinel/OPA), and scheduled drift detection. Use when a…
  • 100spacelift-webhooks
    Receive and verify Spacelift webhooks. Use when setting up a Spacelift named webhook endpoint, debugging X-Signature-256 signature verification, or handling run state change and internal error messages routed by notification policies.
  • 100terraform-iac
    Manages cloud infrastructure using Terraform (and OpenTofu). Use when the user wants to write Terraform configurations, provision cloud resources, manage state, create modules, set up multi-environment deployments, import existing infrastructure, debug plan/apply errors, migrate…
  • 100iac-terraform-pulumi
    Manages Control Plane resources with Terraform or Pulumi. Use when the user asks about the Terraform or Pulumi provider, infrastructure as code, IaC, exporting resources to HCL, terraform import, state, or drift.
  • 95cloud-infrastructure-iac
    Use this capability for cloud architecture, IaC, Terraform/OpenTofu/Pulumi, Kubernetes, networking, VPC/VNet, IAM, compute, storage, managed databases, queues, cost controls, policy-as-code, drift detection, and infrastructure review.
  • 90infrastructure-as-code
    Build and maintain Terraform, OpenTofu, Pulumi or cloud-native IaC with reviewable plans and protected state. Use when provisioning owned resources or fixing drift; preserve the project chosen engine, backend and provider contracts.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.