manage-iacm
安装方式
先用 Prompt 核对来源与依赖。也可下载安装包。
用 AI 助手安装
复制提示词,让助手先核对固定版本和依赖。
查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "manage-iacm":https://skillpi.com/zh/skills/deepskill-cb77543c811158b7e0af0f891234ceb606b90bd62a9cc4cfe78139bdf140521d。安装前核对上游来源和版本:https://github.com/harness/harness-skills。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。
来源与配置
github.com
配置方式待核实
请查看原始来源中的适用工具、依赖和权限要求。
安装实测待补充
通过 MCP 管理 Harness 的基础设施即代码管理(IaCM):配置具有远程状态和 RBAC 的 Terraform 工作区,设置带自动修复的持续漂移检测,设计多层级变更审批工作流,并在部署前估算基础设施成本。适用于管理 Terraform 工作区、检测基础设施漂移、设置审批工作流或估算 Terraform 成本。不要用于创建 Harness 基础设施定义或 OPA 策略。
介绍来源: third_party · harness · 1.0.0 参考来源
SkillPi 解读
- 能完成的任务
- 来源文档未说明。
- 适合谁
- 来源文档未说明。
- 输入和输出
- 来源文档未说明。
- 软件、账号及付费要求
- 来源文档未说明。
- 限制与区别
- 来源文档未说明。
- 实测状态
- 未测试
文件浏览
Frontmatter
name: manage-iacm
description: >-
Manage Harness Infrastructure as Code Management (IaCM) via MCP. Configure Terraform workspaces
with remote state and RBAC, set up continuous drift detection with auto-remediation, design
multi-tier change approval workflows, and estimate infrastructure costs before deployment.
Use when asked to manage Terraform workspaces, detect infrastructure drift, set up approval
workflows for infrastructure changes, or estimate Terraform costs. Do NOT use for creating
Harness infrastructure definitions (use create-infrastructure instead) or OPA policies
(use create-policy instead). Trigger phrases: terraform, workspace, drift detection,
infrastructure cost, IaCM, state management, change approval, terraform plan, infracost,
infrastructure governance.
metadata:
author: Harness
version: 1.0.0
mcp-server: harness-mcp-v2
license: Apache-2.0
compatibility: Requires Harness MCP v2 server (harness-mcp-v2)Manage IaCM
Configure Terraform workspaces, drift detection, change approval workflows, and cost estimation in Harness Infrastructure as Code Management.
Instructions
Step 1: Establish Scope
Confirm the user's org, project, cloud provider, and environments.
Call MCP tool: harness_list
Parameters:
resource_type: "project"
org_id: "<organization>"
Step 2: Identify the IaCM Task
Determine which workflow the user needs:
- Workspace and State Management -- Workspace structure, remote state, RBAC, module registry
- Drift Detection -- Continuous drift scanning with remediation workflows
- Change Approval Workflows -- Risk-based approval tiers for infrastructure changes
- Cost Estimation -- Pre-deployment cost impact analysis using Infracost
Step 3: Configure Workspaces and State Management
Gather from the user:
- Cloud provider (AWS, GCP, Azure, multi-cloud)
- Environments to manage (dev, staging, prod)
- Workspace naming convention (e.g., {project}-{env}-{region})
- State backend preference (S3+DynamoDB, GCS+Firestore, Azure Blob, Harness built-in)
Design workspace structure:
- One workspace per environment per account
- Remote state backend with encryption at rest and state locking
- State backup with versioning and configurable retention
- RBAC: Developer=plan only, Senior Dev=plan+apply to dev, Team Lead=staging, DevOps=all with prod approval
Configure module registry:
- Semantic versioning for modules
- Security scanning before module publication (Checkov, tfsec, Terrascan)
- Approval workflow for new module versions
Step 4: Set Up Drift Detection
Gather from the user:
- Environments to monitor
- Scan frequency (hourly, every 6 hours, daily)
- Resources to exclude from drift scanning
Configure drift detection:
- Compare actual cloud resources against Terraform state on schedule
- Detect additions, deletions, and modifications outside Terraform control
- Classify drift by severity: critical (security group changes, IAM), warning (tags, descriptions), info (metadata)
Remediation workflows:
- Auto-remediate low-risk drift (tag corrections, description updates)
- Alert and create ticket for medium-risk drift
- Page on-call for critical drift (security-related changes)
Step 5: Design Change Approval Workflows
Gather risk categories from the user:
- Low risk (e.g., tag changes, scaling adjustments) -- auto-apply after peer review
- Medium risk (e.g., new resources, config changes) -- team lead approval
- High risk (e.g., security groups, IAM, database changes) -- security team + CAB approval
- Emergency (break-glass) -- post-implementation review required
Call MCP tool: harness_create
Parameters:
resource_type: "pipeline"
org_id: "<organization>"
project_id: "<project>"
body:
pipeline:
name: "terraform-change-approval"
identifier: "terraform_change_approval"
stages:
- stage:
name: Plan
type: CI
spec:
# terraform plan + output change summary
- stage:
name: Cost Estimate
type: CI
spec:
# infracost diff
- stage:
name: Approval
type: Approval
spec:
# risk-based approval routing
- stage:
name: Apply
type: CI
spec:
# terraform apply
Step 6: Estimate Infrastructure Costs
When asked for cost estimation:
- Identify the workspace and pending Terraform changes (PR or plan output)
- Run Infracost analysis on the plan
Present a cost report with:
- Current monthly cost vs. projected monthly cost
- Per-resource cost breakdown for new/modified resources
- Cost optimization recommendations (right-sizing, reserved instances)
- Budget impact assessment
Examples
- "Set up Terraform workspaces for our AWS environments" -- Configure workspace structure with state management and RBAC
- "Enable drift detection for production infrastructure" -- Set up scheduled scanning with severity classification and remediation
- "Create an approval workflow for infrastructure changes" -- Design risk-based approval tiers with security review for high-risk changes
- "How much will this Terraform change cost?" -- Run Infracost analysis and present cost impact report
- "Configure our Terraform module registry" -- Set up versioned module registry with security scanning
Performance Notes
- Workspace naming conventions should be established early -- renaming workspaces requires state migration.
- Drift detection scans should avoid peak hours to minimize API rate limit conflicts.
- Cost estimation accuracy depends on Infracost having pricing data for all resource types in use.
- Change approval workflows should include a break-glass path for emergencies -- blocking all changes can be as dangerous as no controls.
Troubleshooting
State Locking Conflicts
- Check for stuck locks from failed runs -- use
terraform force-unlockcautiously - Verify the state backend (DynamoDB, Firestore) is accessible from the runner
Drift Detection False Positives
- Exclude resources managed by auto-scaling groups or Kubernetes operators
- Add ignore rules for metadata fields that change frequently (last-modified timestamps)
- Verify the scan is running against the correct workspace/state file
Cost Estimation Missing Resources
- Infracost may not support all resource types -- check supported resource list
- Ensure the Terraform plan output includes all changed resources
- Custom modules may need explicit cost annotations
当前收录版本
1.0.0
安全与评测信息
质量评测
满分100 · 来自 SkillPi LAB 实验室的评测报告。
亮点
- 提供 Harness IaCM 的完整管理能力,包括 Terraform 工作区配置、漂移检测、变更审批工作流和成本估算
- 适用于广泛的基础设施即代码管理场景,具有明确的实用价值
亮点
- 触发词覆盖完整且边界清晰,包括 terraform、workspace、drift detection、infrastructure cost 等关键术语
- 明确排除了不相关的功能(如创建 Harness infrastructure definitions 或 OPA policies)
亮点
- Phase/步骤清晰(Step 1-6),每个步骤都有明确的目标和操作指导
- 包含端到端示例和性能注意事项,frontmatter 完整规范
亮点
- 工具来源明确(Harness MCP v2),参数正确,覆盖主要异常场景
- 包含详细的故障排除指南,涵盖状态锁定冲突、漂移检测误报等常见问题
取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。
正文静态检测
100 / 100 · skillpi-20261123-no-r3-v1
正文未命中当前规则。
分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。
权限与使用前检查
根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。
-
云资源与可能的费用
先预览变更,核对账号、区域、资源权限与费用;创建、部署或删除前单独确认。
主文档提及 · 第 121 行
安全评级与访问范围
safe · 静态证据核验,不代表运行安全保证。
来源文档未说明。
使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。
用户讨论
还没有已核实的点评。