用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/luthersystems/mars --skill mars命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | mars |
| description | Use the mars infrastructure tool for terraform, ansible, and packer operations |
Mars wraps terraform, ansible, and packer in Docker with environment management.
mars <env> <command> [options]
Where <env> is the target environment (e.g., dev, staging, prod, default).
mars <env> init # Initialize terraform
mars <env> init --upgrade # Upgrade providers
mars <env> init --reconfigure # Reconfigure backend
mars <env> plan # Show planned changes
mars <env> plan --apply # Plan then apply (interactive prompt)
# NOTE: --approve is NOT valid with plan. Use "apply --approve" to skip prompts.
mars <env> plan --target=<resource> # Target specific resource
mars <env> plan --destroy # Plan destruction
mars <env> apply # Apply changes (prompts)
mars <env> apply --approve # Apply without confirmation
mars <env> destroy # Destroy infrastructure
mars <env> terraform output <name> # Get output value
mars <env> new-workspace # Create new workspace
mars <env> import <addr> <id> # Import existing resource
mars <env> taint <resource> # Mark for recreation
# Run playbook
mars <env> ansible-playbook playbook.yaml
mars <env> ansible-playbook -vvvv playbook.yaml # Debug verbosity
# With AWS Secrets Manager vault
mars <env> ansible-playbook \
--aws-sm-secret-id="<secret-id>" \
--aws-region="<region>" \
--aws-role-arn="<role-arn>" \
playbook.yaml
# Vault operations
mars <env> ansible-vault-encrypt --aws-sm-secret-id="<id>" --aws-region="<region>"
mars <env> ansible-vault-decrypt --aws-sm-secret-id="<id>" --aws-region="<region>"
mars <env> ansible-vault-decrypt-key --aws-sm-secret-id="<id>" --aws-region="<region>" file.yaml key
# Ad-hoc command
mars <env> ansible-execute <host-pattern> -m <module> -a "<args>"
# Playbook options
--tags=<tag> # Run specific tags
--limit=<pattern> # Limit to hosts
--check # Dry run
--start-at-task=<name> # Resume from task
MARS_DEBUG=true # Enable debug output (set -x)
MARS_SHELL=true # Drop into bash shell in container
MARS_LOCAL=true # Use local ansible transport
MARS_NETWORK=<name> # Use specific docker network
MARS_DEV=true # Mount local mars source for development
MARS_DEV_ROOT=<path> # Path to mars source (with MARS_DEV)
TF_LOG=DEBUG # Terraform debug logging
Terraform projects expect:
.terraform-version - Required, specifies terraform versionvars/common/*.tfvars - Shared variablesvars/<env>/*.tfvars - Environment-specific variablesAnsible projects expect:
inventories/<env>/ - Inventory filesinventories/<env>/mars.yaml - Optional mars config (ssh_user, script path)*_vault_password.txt or vault_password.txt - Local vault password (if not using cloud vault)For direct terraform commands, use -- to prevent mars from parsing flags:
mars <env> terraform -- providers --help