Initial commit

This commit is contained in:
Zhongwei Li
2025-11-30 08:20:32 +08:00
commit 5181d27d27
9 changed files with 331 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
{
"name": "devops-automation-pack",
"description": "25 professional DevOps plugins for CI/CD, deployment, Docker, Kubernetes, and infrastructure automation. Save 20+ hours of manual work.",
"version": "1.0.0",
"author": {
"name": "Jeremy Longshore",
"email": "[email protected]",
"url": "https://github.com/jeremylongshore"
},
"skills": [
"./skills"
]
}

3
README.md Normal file
View File

@@ -0,0 +1,3 @@
# devops-automation-pack
25 professional DevOps plugins for CI/CD, deployment, Docker, Kubernetes, and infrastructure automation. Save 20+ hours of manual work.

65
plugin.lock.json Normal file
View File

@@ -0,0 +1,65 @@
{
"$schema": "internal://schemas/plugin.lock.v1.json",
"pluginId": "gh:jeremylongshore/claude-code-plugins-plus:plugins/packages/devops-automation-pack",
"normalized": {
"repo": null,
"ref": "refs/tags/v20251128.0",
"commit": "51d003ed7e9281558effd9c5d17746bd9a1f622e",
"treeHash": "2e48a12b34cfdb97492e664ea2b65a78f7ad2b6ed6662b8eed09dadc83ed2eab",
"generatedAt": "2025-11-28T10:18:23.966000Z",
"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": "devops-automation-pack",
"description": "25 professional DevOps plugins for CI/CD, deployment, Docker, Kubernetes, and infrastructure automation. Save 20+ hours of manual work.",
"version": "1.0.0"
},
"content": {
"files": [
{
"path": "README.md",
"sha256": "4683123877821d5ce1aa57fe9f18dacdbf53bd7e40497c50a1689996eedb4077"
},
{
"path": ".claude-plugin/plugin.json",
"sha256": "9c6c5d05d9faec5866ea6b72c9ac5b7ca7f364ef42de2b311cbd0d81ad6cc8c8"
},
{
"path": "skills/devops-automation-pack/SKILL.md",
"sha256": "264faefc64a706e50e3df62ceccb75e561cddc6ed830a674577c7eca9c7ef30f"
},
{
"path": "skills/devops-automation-pack/references/README.md",
"sha256": "0782ecc8e8895880dc8588cc80ed5141cc8d4edcd86f8539a1ff08b9c36e939e"
},
{
"path": "skills/devops-automation-pack/scripts/README.md",
"sha256": "abaa7dd73c80b37325cdb18a3218bd10717b9978b040935cc5240ea8daa119e6"
},
{
"path": "skills/devops-automation-pack/assets/commit_message_template.txt",
"sha256": "0e36899462198f7cc3f8f856fb4c7e879f5a3da7392553ca2de42a2216ab25bf"
},
{
"path": "skills/devops-automation-pack/assets/README.md",
"sha256": "42f675ced1302057d98f1917462de1602cd3ec54cc4d0f90bc06fe2c98e33b22"
},
{
"path": "skills/devops-automation-pack/assets/example_code_diff.txt",
"sha256": "6268f0e62be100f83a8e543155b03f3e2e5a52d5048d7b3bf21110cf23625b85"
}
],
"dirSha256": "2e48a12b34cfdb97492e664ea2b65a78f7ad2b6ed6662b8eed09dadc83ed2eab"
},
"security": {
"scannedAt": null,
"scannerVersion": null,
"flags": []
}
}

View File

@@ -0,0 +1,52 @@
---
name: generating-conventional-commits
description: |
Generates conventional commit messages using AI. It analyzes code changes and suggests a commit message adhering to the conventional commits specification. Use this skill when you need help writing clear, standardized commit messages, especially after making code changes and preparing to commit. Trigger with terms like "create commit", "generate commit message", or "write commit".
allowed-tools: Read, Write, Edit, Grep, Glob, Bash
version: 1.0.0
---
## Overview
This skill helps you create well-formatted, informative commit messages that follow the conventional commits standard, improving collaboration and automation in your Git workflow. It saves you time and ensures consistency across your project.
## How It Works
1. **Analyze Changes**: The skill analyzes the staged changes in your Git repository.
2. **Generate Suggestion**: It uses AI to generate a commit message based on the analyzed changes, adhering to the conventional commits format (e.g., `feat: add new feature`, `fix: correct bug`).
3. **Present to User**: The generated commit message is presented to you for review and acceptance.
## When to Use This Skill
This skill activates when you need to:
- Create a commit message after making code changes.
- Ensure your commit messages follow the conventional commits standard.
- Save time writing commit messages manually.
## Examples
### Example 1: Adding a New Feature
User request: "Generate a commit message for these changes."
The skill will:
1. Analyze the staged changes related to a new feature.
2. Generate a commit message like `feat: Implement user authentication`.
### Example 2: Fixing a Bug
User request: "Create a commit for the bug fix."
The skill will:
1. Analyze the staged changes related to a bug fix.
2. Generate a commit message like `fix: Resolve issue with incorrect password reset`.
## Best Practices
- **Stage Changes**: Ensure all relevant changes are staged before using the skill.
- **Review Carefully**: Always review the generated commit message before accepting it.
- **Customize if Needed**: Feel free to customize the generated message to provide more context.
## Integration
This skill integrates with your Git workflow, providing a convenient way to generate commit messages directly within Claude Code. It complements other Git-related skills in the DevOps Automation Pack, such as `/branch-create` and `/pr-create`.

View File

@@ -0,0 +1,6 @@
# Assets
Bundled resources for devops-automation-pack skill
- [ ] commit_message_template.txt: A template for creating commit messages.
- [ ] example_code_diff.txt: An example code diff used for generating commit messages.

View File

@@ -0,0 +1,114 @@
# Commit Message Template
This template provides a standardized format for creating clear and informative commit messages. Using this template will improve team communication, code review, and project maintainability.
## Format
```
<type>(<scope>): <subject>
[optional body]
[optional footer(s)]
```
## Sections
### Type
The type of commit. Choose from the following:
* **feat:** A new feature
* **fix:** A bug fix
* **docs:** Documentation only changes
* **style:** Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc.)
* **refactor:** A code change that neither fixes a bug nor adds a feature
* **perf:** A code change that improves performance
* **test:** Adding missing tests or correcting existing tests
* **build:** Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
* **ci:** Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
* **chore:** Other changes that don't modify src or test files
* **revert:** Reverts a previous commit
**Example:** `feat(user-authentication): Implement password reset functionality`
### Scope
The scope of the commit. This could be a module, component, or area of the codebase affected by the change. Keep it concise.
**Example:** `feat(api): Add endpoint for retrieving user profiles`
### Subject
A brief and concise description of the change. Use the imperative, present tense: "change" not "changed" nor "changes".
* Limit to 50 characters.
* Do not end with a period.
**Example:** `fix(layout): Correct alignment issues on mobile devices`
### Body (Optional)
A more detailed explanation of the change. Use the imperative, present tense. Explain the *why* and *how*.
* Wrap lines at 72 characters.
* Can include multiple paragraphs.
* Use bullet points for lists when appropriate.
**Example:**
```
This commit addresses a critical bug in the user authentication module. The previous implementation allowed users to bypass the password reset process under certain circumstances.
This was achieved by:
* Adding a validation check to ensure the password reset token is valid.
* Implementing rate limiting to prevent brute-force attacks.
* Improving error handling to provide more informative feedback to the user.
```
### Footer (Optional)
* **Breaking Changes:** If the commit introduces a breaking change, describe the change, justification, and migration notes. Start with `BREAKING CHANGE:`.
* **Related Issues:** Refer to related issues using `Closes #<issue_number>`, `Fixes #<issue_number>`, or `See #<issue_number>`.
* **Co-authored-by:** Credit collaborators using `Co-authored-by: Name <email@example.com>`.
**Example - Breaking Change:**
```
BREAKING CHANGE: The API endpoint for retrieving user profiles has been renamed from `/users` to `/profiles`.
Migration: Update all client applications to use the new endpoint.
```
**Example - Issue Fix:**
```
Fixes #123: Resolved issue where users were unable to log in.
```
## Example Commit Message
```
feat(payment-gateway): Integrate Stripe payment processing
This commit adds support for Stripe payment processing to the application.
The following changes were made:
* Implemented the Stripe API integration.
* Added a new payment form to the checkout page.
* Updated the database schema to store payment information.
Closes #456: Implement Stripe integration
```
## Best Practices
* Write clear and concise commit messages.
* Use the imperative, present tense.
* Limit the subject line to 50 characters.
* Provide context in the body of the message.
* Include relevant information in the footer.
* Review your commit messages before pushing them.
* Be consistent with your commit message style.

View File

@@ -0,0 +1,64 @@
# Example Code Diff for Commit Message Generation
This document provides an example code diff that can be used by the `devops-automation-pack` plugin to generate commit messages. The `example_code_diff.txt` file should contain the raw diff output. This file is used as input for plugins like `generate_commit_message` within the `devops-automation-pack`.
## Purpose
The purpose of this file is to provide a clear and concise example of a code diff, which the `generate_commit_message` plugin uses to create informative and helpful commit messages. This helps developers write better commit messages, improving code maintainability and collaboration.
## File Contents (example_code_diff.txt)
```
--- a/example.py
+++ b/example.py
@@ -1,4 +1,5 @@
def hello_world():
- print("Hello, world!")
+ message = "Hello, world!"
+ print(message)
hello_world()
```
## Explanation
The above diff shows a simple change to the `example.py` file. Specifically, it shows:
* **`--- a/example.py`**: Indicates the original file (`example.py`) before the changes.
* **`+++ b/example.py`**: Indicates the modified file (`example.py`) after the changes.
* **`@@ -1,4 +1,5 @@`**: Indicates the line numbers that were changed. `-1,4` means lines 1 through 4 in the original file. `+1,5` means lines 1 through 5 in the modified file.
* **`- print("Hello, world!")`**: The line that was removed (indicated by the `-`).
* **`+ message = "Hello, world!"`**: The first line added (indicated by the `+`).
* **`+ print(message)`**: The second line added (indicated by the `+`).
## How to Use This File
1. **Replace the contents:** Replace the contents of the `example_code_diff.txt` file with a real code diff that you want to use to generate a commit message. You can obtain this diff using `git diff` or a similar tool.
2. **Integrate with the plugin:** Refer to the `devops-automation-pack` plugin documentation for instructions on how to use this file as input for the `generate_commit_message` plugin (or similar plugins that utilize diffs). The plugin will typically read the content of this file and use it to intelligently generate a suggested commit message.
## Example Plugin Usage (Conceptual)
```
# Example Python code demonstrating how the plugin might use the diff file
# (This is an illustrative example and might not be the exact API)
from devops_automation_pack import generate_commit_message
with open("example_code_diff.txt", "r") as f:
code_diff = f.read()
commit_message = generate_commit_message(code_diff)
print(commit_message)
```
## Best Practices
* **Ensure the diff is clean:** Make sure the diff is free of merge conflicts or other extraneous information. A clean diff will result in a better commit message.
* **Review the generated message:** Always review the generated commit message before committing the changes. The AI-generated message is a suggestion, and you should always ensure it accurately reflects the changes made.
* **Use descriptive diffs:** The more descriptive the diff, the better the AI will be able to understand the changes and generate a relevant commit message.
## Troubleshooting
* **Plugin not generating a message:** Double-check that the `example_code_diff.txt` file exists and contains valid diff output.
* **Poor quality message:** Try simplifying the diff or providing additional context to the plugin (if the plugin supports it). Also, remember to always review and edit the generated message.

View File

@@ -0,0 +1,7 @@
# References
Bundled resources for devops-automation-pack skill
- [ ] conventional_commits_spec.md: A detailed explanation of the conventional commits specification.
- [ ] commit_message_examples.md: Examples of well-formatted commit messages.
- [ ] git_hooks_setup.md: Instructions on setting up Git hooks to automatically validate commit messages.

View File

@@ -0,0 +1,7 @@
# Scripts
Bundled resources for devops-automation-pack skill
- [ ] validate_commit_message.py: Validates a commit message against the conventional commits specification.
- [ ] generate_commit_message.py: Generates a commit message based on code diffs.
- [ ] suggest_commit_type.py: Suggests the commit type (feat, fix, chore, etc.) based on the changes.