From spacelift
This skill should be used when the user wants to run a Spacelift local preview, trigger a proposed run from the current workspace, or test infrastructure changes before pushing. Activates on: "local preview", "spacelift preview", "preview spacelift", "test changes spacelift", "run preview", "spacelift local", "try changes", "anteprima locale", "anteprima spacelift", "provare modifiche spacelift".
How this skill is triggered — by the user, by Claude, or both
Slash command
/spacelift:previewThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Run local previews to test Terraform changes against Spacelift before pushing. Packages local files, uploads to Spacelift, and executes a plan.
Run local previews to test Terraform changes against Spacelift before pushing. Packages local files, uploads to Spacelift, and executes a plan.
Reference files: Consult reference/spacectl-tools.md for the full MCP tool catalog and CLI equivalents.
spacelift.spacectl-mcp): local_preview, list_stacksspacectl stack local-previewUse ToolSearch with query spacelift to check if MCP tools are available. See reference/spacectl-tools.md § Tool Detection.
If the user didn't specify a stack:
*.tf files)list_stacks to search for stacks matching the repository or project rootMCP (recommended): local_preview with:
stack_id — the target stack slugpath — workspace path (defaults to current directory)await_for_completion — set to "true" to wait for results (recommended)targets — array of specific resources to target (optional, for focused previews)environment_variables — additional env vars for the run (optional)CLI fallback:
spacectl stack local-preview --id <stack-slug>
Optional CLI flags:
--target <resource> — target specific resources--no-tail — don't stream logs (just trigger and return)--project-root-only — only package files in the project root--prioritize-run — prioritize this run in the queueOnce the preview completes, present:
Format as:
## Local Preview Results
**Stack**: `<stack-slug>`
**State**: FINISHED
**Delta**: +2 ~1 -0
### Planned Changes
| Action | Resource | Address |
|--------|----------|---------|
| + add | aws_s3_bucket | module.storage.aws_s3_bucket.logs |
| ~ update | aws_iam_policy | module.iam.aws_iam_policy.access |
If the preview failed, invoke the debug workflow from /spacelift:debug.
| Situation | Action |
|---|---|
| MCP tools not available | Fall back to CLI. See reference/spacectl-tools.md § CLI Equivalents |
| Stack not found | Use list_stacks with search to find the correct slug |
| Preview times out | The run may be queued behind other runs. Check with get_stack_run |
| Upload fails | Check that .gitignore and .terraformignore aren't excluding needed files |
| Authentication failure | Check SPACELIFT_API_GITHUB_TOKEN and SPACELIFT_API_KEY_ENDPOINT env vars |
reference/spacectl-tools.md — Full MCP tool catalog, CLI equivalents, GraphQL queriesCreates bite-sized, testable implementation plans from specs or requirements, with file structure and task decomposition. Activates before coding multi-step tasks.
npx claudepluginhub fabn/claude-plugins --plugin spacelift