AgentSkillsCN

tfdc-module-get

使用 tfdc 根据模块 ID 获取 Terraform 模块详情。适用于已从先前搜索中获得模块 ID(命名空间/名称/提供者/版本),并需获取包含 README 内容在内的完整模块文档时使用。

SKILL.md
--- frontmatter
name: tfdc-module-get
description: Fetch Terraform module details by module ID using tfdc. Use when you have a module ID (namespace/name/provider/version) from a previous search and need the full module documentation including readme content.

tfdc module get

Fetch module details by exact module ID.

Usage

bash
tfdc module get -id <module_id> [-format text]

Flags

FlagRequiredDefaultDescription
-idYesModule ID in namespace/name/provider/version format
-formatNotextOutput format: text, json, markdown

ID format

The module ID must have exactly 4 segments: namespace/name/provider/version

Example: terraform-aws-modules/vpc/aws/6.0.1

Examples

bash
# Fetch module readme as plain text
tfdc module get -id terraform-aws-modules/vpc/aws/6.0.1

# Fetch as structured JSON
tfdc module get -id terraform-aws-modules/vpc/aws/6.0.1 -format json

JSON output

json
{
  "id": "terraform-aws-modules/vpc/aws/6.0.1",
  "content": "# AWS VPC Terraform module\n\n...",
  "content_type": "text/markdown"
}

Workflow

Typically used after tfdc module search:

bash
# Search for modules
tfdc module search -query vpc -format json

# Get full details
tfdc module get -id terraform-aws-modules/vpc/aws/6.0.1