Initial commit

This commit is contained in:
Zhongwei Li
2025-11-30 08:19:36 +08:00
commit 151080b6b7
8 changed files with 233 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
{
"name": "infrastructure-drift-detector",
"description": "Detect infrastructure drift from desired state",
"version": "1.0.0",
"author": {
"name": "Claude Code Plugins",
"email": "[email protected]"
},
"skills": [
"./skills"
],
"commands": [
"./commands"
]
}

3
README.md Normal file
View File

@@ -0,0 +1,3 @@
# infrastructure-drift-detector
Detect infrastructure drift from desired state

25
commands/drift-detect.md Normal file
View File

@@ -0,0 +1,25 @@
---
description: $(echo "$description" | cut -d' ' -f1-5)
---
# $(echo "$name" | sed 's/-/ /g' | sed 's/\b\(.\)/\u\1/g')
$(echo "$description")
## Key Features
- Production-ready configurations
- Best practices implementation
- Security-first approach
- Scalable architecture
- Comprehensive documentation
- Multi-platform support
## Example Usage
This plugin generates complete configurations for your DevOps needs.
Specify your requirements and get production-ready code instantly.
## When Invoked
Generate configurations and setup code based on your specific requirements and infrastructure needs.

61
plugin.lock.json Normal file
View File

@@ -0,0 +1,61 @@
{
"$schema": "internal://schemas/plugin.lock.v1.json",
"pluginId": "gh:jeremylongshore/claude-code-plugins-plus:plugins/devops/infrastructure-drift-detector",
"normalized": {
"repo": null,
"ref": "refs/tags/v20251128.0",
"commit": "039b169fbf609a2117d099e5538fd9989501e270",
"treeHash": "5e289d21a5b25a2e69f78a5e34c8a08c0834969b927de84360099fd176373eaa",
"generatedAt": "2025-11-28T10:18:30.664328Z",
"toolVersion": "publish_plugins.py@0.2.0"
},
"origin": {
"remote": "git@github.com:zhongweili/42plugin-data.git",
"branch": "master",
"commit": "aa1497ed0949fd50e99e70d6324a29c5b34f9390",
"repoRoot": "/Users/zhongweili/projects/openmind/42plugin-data"
},
"manifest": {
"name": "infrastructure-drift-detector",
"description": "Detect infrastructure drift from desired state",
"version": "1.0.0"
},
"content": {
"files": [
{
"path": "README.md",
"sha256": "b9d5ab9f0839fa2990137ca403fa4c9d79cc1e6aa643228d5d5d357c0c5b14b9"
},
{
"path": ".claude-plugin/plugin.json",
"sha256": "ed84e907c992b606df79ea05e6714e4f1714e5d353967461a0811c396186fe66"
},
{
"path": "commands/drift-detect.md",
"sha256": "353f80054a90cda1e6716da3628115ce829307fbbb83a15b64f1d37c96224a99"
},
{
"path": "skills/infrastructure-drift-detector/SKILL.md",
"sha256": "c0c1567936474879e52c9d7ae61a8823f63fd6f7c2e1bc6498260c7b8d9f0a70"
},
{
"path": "skills/infrastructure-drift-detector/references/README.md",
"sha256": "db9680278e03728fef93321fc76c435387bc0c8fe1dcc9870bdf2fa236ea8ac3"
},
{
"path": "skills/infrastructure-drift-detector/scripts/README.md",
"sha256": "f042646ad5b685556c044080a6b73202a490fb8288be8219328faefc12d5a30e"
},
{
"path": "skills/infrastructure-drift-detector/assets/README.md",
"sha256": "33bfb083485b48c78a1738368c52cd9f202724a414bce507db181d8291b83aec"
}
],
"dirSha256": "5e289d21a5b25a2e69f78a5e34c8a08c0834969b927de84360099fd176373eaa"
},
"security": {
"scannedAt": null,
"scannerVersion": null,
"flags": []
}
}

View File

@@ -0,0 +1,53 @@
---
name: detecting-infrastructure-drift
description: |
This skill enables Claude to detect infrastructure drift from a desired state. It uses the `drift-detect` command to identify discrepancies between the current infrastructure configuration and the intended configuration, as defined in infrastructure-as-code tools like Terraform. Use this skill when the user asks to check for infrastructure drift, identify configuration changes, or ensure that the current infrastructure matches the desired state. It is particularly useful in DevOps workflows for maintaining infrastructure consistency and preventing configuration errors. Trigger this skill when the user mentions "drift detection," "infrastructure changes," "configuration drift," or requests a "drift report."
allowed-tools: Read, Write, Edit, Grep, Glob, Bash
version: 1.0.0
---
## Overview
This skill empowers Claude to identify and report on deviations between the current state of your infrastructure and its defined desired state. By leveraging the `drift-detect` command, it provides insights into configuration inconsistencies, helping maintain infrastructure integrity and prevent unexpected issues.
## How It Works
1. **Invocation**: The user requests drift detection.
2. **Drift Analysis**: Claude executes the `drift-detect` command.
3. **Report Generation**: The command analyzes the infrastructure and identifies any deviations from the defined configuration.
4. **Result Presentation**: Claude presents a report detailing the detected drift, including affected resources and configuration differences.
## When to Use This Skill
This skill activates when you need to:
- Identify infrastructure drift in your environment.
- Ensure that your infrastructure configuration matches the desired state.
- Generate a report detailing discrepancies between the current and desired infrastructure configurations.
## Examples
### Example 1: Checking for Infrastructure Drift
User request: "Check for infrastructure drift in my production environment."
The skill will:
1. Execute the `drift-detect` command.
2. Present a report detailing any detected drift, including resource changes and configuration differences.
### Example 2: Identifying Configuration Changes
User request: "Are there any configuration changes that haven't been applied to my infrastructure?"
The skill will:
1. Execute the `drift-detect` command.
2. Provide a summary of configuration changes that are present in the desired state but not reflected in the current infrastructure.
## Best Practices
- **Regular Monitoring**: Schedule regular drift detection checks to proactively identify and address configuration inconsistencies.
- **Version Control**: Ensure your infrastructure-as-code configurations are version-controlled to track changes and facilitate rollbacks.
- **Automated Remediation**: Implement automated remediation workflows to automatically correct detected drift and maintain infrastructure consistency.
## Integration
This skill can be integrated with other DevOps tools and plugins to automate infrastructure management workflows. For example, it can be used in conjunction with configuration management tools like Ansible or Puppet to automatically remediate detected drift. It also complements infrastructure-as-code tools like Terraform by providing a mechanism for verifying that the deployed infrastructure matches the defined configuration.

View File

@@ -0,0 +1,26 @@
# Skill Assets
This directory contains static assets used by this skill.
## Purpose
Assets can include:
- Configuration files (JSON, YAML)
- Data files
- Templates
- Schemas
- Test fixtures
## Guidelines
- Keep assets small and focused
- Document asset purpose and format
- Use standard file formats
- Include schema validation where applicable
## Common Asset Types
- **config.json** - Configuration templates
- **schema.json** - JSON schemas
- **template.yaml** - YAML templates
- **test-data.json** - Test fixtures

View File

@@ -0,0 +1,26 @@
# Skill References
This directory contains reference materials that enhance this skill's capabilities.
## Purpose
References can include:
- Code examples
- Style guides
- Best practices documentation
- Template files
- Configuration examples
## Guidelines
- Keep references concise and actionable
- Use markdown for documentation
- Include clear examples
- Link to external resources when appropriate
## Types of References
- **examples.md** - Usage examples
- **style-guide.md** - Coding standards
- **templates/** - Reusable templates
- **patterns.md** - Design patterns

View File

@@ -0,0 +1,24 @@
# Skill Scripts
This directory contains optional helper scripts that support this skill's functionality.
## Purpose
Scripts here can be:
- Referenced by the skill for automation
- Used as examples for users
- Executed during skill activation
## Guidelines
- All scripts should be well-documented
- Include usage examples in comments
- Make scripts executable (`chmod +x`)
- Use `#!/bin/bash` or `#!/usr/bin/env python3` shebangs
## Adding Scripts
1. Create script file (e.g., `analyze.sh`, `process.py`)
2. Add documentation header
3. Make executable: `chmod +x script-name.sh`
4. Test thoroughly before committing