AgentSkillsCN

infragentool

借助多代理工作流,实现Crossplane基础设施的自动化生成。当用户提出关于创建、更新或验证Crossplane资源、XRD或Compositions的需求时,这一方法将助你事半功倍。

SKILL.md
--- frontmatter
name: infragentool
description: >
  Crossplane infrastructure generation with multi-agent workflow.
  Use when the user asks about creating, updating, or validating
  Crossplane resources, XRDs, or Compositions.

infragentool

Transform infrastructure provisioning from YAML archaeology into a conversation. Describe what you need in plain English, and watch as multiple AI agents design, review, and generate validated Crossplane manifests — complete with security best practices and MCP-verified schemas.

Installation

bash
claude --plugin-dir /path/to/InfraGenTool

Quick Start

bash
# 1. Set up your project (one-time)
/infragentool:setup

# 2. Create your first resource
/infragentool:new_composition database ./infra/database

# 3. Follow the interactive prompts

# 4. Check progress
/infragentool:status

# 5. Generate the YAML
/infragentool:implement

Commands

/infragentool:setup

Initialize or validate project context for Crossplane development.

When to use:

  • First time using infragentool in a project
  • After cloning a repository with existing infragentool configuration
  • To verify all required configuration files are present

What it does:

  • Creates .infragentool/ directory structure
  • Generates context files (context.md, coding-style.md, tracks.md, mcp.json)
  • Verifies MCP server health
  • Sets up default project standards

/infragentool:new_composition <name> <path>

Create a new resource with spec and plan through multi-agent workflow.

Parameters:

  • name: Name of the resource (e.g., 'postgres-db', 'redis-cache')
  • path: Target directory for the resource (e.g., './infra/database')

Workflow Phases:

  1. Requirements - Gather functional and non-functional requirements
  2. Architecture - Design review and security approval
  3. Tech Stack - Define versions, dependencies, and configurations
  4. Implementation - Generate Crossplane manifests (XRD, Composition, Claim)

Example:

bash
/infragentool:new_composition postgres-db ./infra/database

/infragentool:update_composition <path>

Update an existing resource and regenerate manifests.

Parameters:

  • path: Path to the existing resource directory

Use when:

  • Adding new features to an existing resource
  • Changing configurations or security settings
  • Upgrading versions or dependencies

Example:

bash
/infragentool:update_composition ./infra/database

/infragentool:implement [track]

Execute implementation for in-progress tracks.

Parameters:

  • track (optional): Specific track ID to implement. If omitted, implements all pending tracks.

What it does:

  • Processes tracks in the ready-for-implementation state
  • Generates Crossplane manifests following the project's workflow
  • Validates generated YAML with crossplane render

Examples:

bash
# Implement all pending tracks
/infragentool:implement

# Implement specific track
/infragentool:implement database-postgres-20250215

/infragentool:validate <path>

Validate YAML manifests using crossplane render.

Parameters:

  • path: Path to the YAML file or directory to validate

Validates:

  • Schema correctness
  • No deprecated APIs
  • Resource references
  • Composition logic

Example:

bash
/infragentool:validate ./infra/database/composition.yaml

/infragentool:status

Show project status and track progress.

Displays:

  • All tracks and their current state
  • Pending approvals and next steps
  • MCP server health status
  • Project configuration summary

Example:

bash
/infragentool:status

Multi-Agent Workflow

infragentool uses specialized AI agents working in sequence:

code
User Request
    │
    ▼
┌─────────────────────┐
│ Cloud Solutions     │ Requirements gathering
│ Engineer            │ What do you need?
└─────────────────────┘
    │
    ▼
┌─────────────────────┐ Architecture review
│ Cloud Architect     │ Security & compliance
└─────────────────────┘
    │
    ▼
┌─────────────────────┐ Tech stack definition
│ Tech Stack          │ Versions & dependencies
│ Specialist          │
└─────────────────────┘
    │
    ▼
┌─────────────────────┐ Manifest generation
│ Crossplane Engineer │ XRD, Composition, Claim
└─────────────────────┘
    │
    ▼
┌─────────────────────┐
│ Validator           │ crossplane render
└─────────────────────┘
    │
    ▼
Production-Ready YAML

Prerequisites

  • Docker - For crossplane render validation
  • Crossplane CLI (optional) - For local validation

Configuration Files

infragentool creates these files in .infragentool/:

FilePurpose
context.mdProject context, API groups, naming conventions
coding-style.mdCoding standards and security rules
tracks.mdMaster registry of all tracks and status
mcp.jsonMCP server configuration

Support