DevOpsGPT is a powerful multi-agent system that uses AI to transform natural language software requirements into functional code across various programming languages. It integrates with existing DevOps tools, enhancing productivity and streamlining the development process.
claude install kuafuai/DevOpsGPTDevOpsGPT is a powerful multi-agent system that uses AI to transform natural language software requirements into functional code across various programming languages. It integrates with existing DevOps tools, enhancing productivity and streamlining the development process.
[{"step":"1. Define the Requirement","action":"Clearly articulate the software requirement in natural language. Include details about the programming language, frameworks, and any specific DevOps tools (e.g., Kubernetes, Docker) you want to integrate. Example: 'Build a Node.js microservice for user authentication with MongoDB, deployed on AWS ECS using Terraform.'","tip":"Be specific about non-functional requirements like scalability, performance, and security constraints to ensure the generated code meets your needs."},{"step":"2. Select the Target Environment","action":"Specify the target environment for the code, including the operating system, cloud provider (if applicable), and any CI/CD tools you use (e.g., GitHub Actions, Jenkins). Example: 'Target environment: AWS EC2 with Ubuntu 22.04, CI/CD via GitHub Actions.'","tip":"If you're unsure about the environment, ask DevOpsGPT to suggest one based on your requirement. Include any constraints like cost or compliance requirements."},{"step":"3. Generate and Review the Code","action":"Use the generated code as a starting point. Review it for correctness, security vulnerabilities, and adherence to your team's coding standards. Modify the prompt to refine the output if needed. Example: 'Regenerate the code with stricter input validation and add OpenAPI documentation.'","tip":"Use tools like SonarQube or CodeClimate to analyze the generated code for quality issues before deployment."},{"step":"4. Integrate with DevOps Tools","action":"Configure the generated code to work with your existing DevOps tools. This may include setting up CI/CD pipelines, configuring monitoring, or adjusting infrastructure scripts. Example: 'Update the Terraform scripts to include a load balancer and auto-scaling rules.'","tip":"Leverage DevOpsGPT's ability to generate infrastructure-as-code templates (e.g., Terraform, Ansible) to streamline this process."},{"step":"5. Deploy and Monitor","action":"Deploy the code to your target environment and set up monitoring and logging. Use the generated Dockerfile and Kubernetes manifests to ensure consistency. Example: 'Deploy the application to staging using the provided Kubernetes manifests and monitor performance with Prometheus.'","tip":"Set up alerts for critical metrics (e.g., error rates, response times) to catch issues early. Use tools like Datadog or New Relic for observability."}]
Convert user stories into functional code snippets for rapid development.
Automate deployment processes to ensure consistent and error-free releases.
Integrate seamlessly with CI/CD pipelines to streamline continuous integration and delivery.
Generate comprehensive documentation directly from existing code to maintain clarity.
claude install kuafuai/DevOpsGPTgit clone https://github.com/kuafuai/DevOpsGPTCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Act as DevOpsGPT, a multi-agent system. Transform the following natural language software requirement into functional code in [LANGUAGE]: '[REQUIREMENT]'. Ensure the code follows [BEST_PRACTICES] and integrates with [DEVOPS_TOOLS]. Provide a brief explanation of the architecture and deployment steps. Include unit tests and a Dockerfile if applicable.
### Requirement Transformation for a RESTful API
**Requirement**: "Create a Python Flask API that manages a simple task list with endpoints to add, list, and delete tasks. Store tasks in a PostgreSQL database and include JWT authentication. Deploy using Docker and Kubernetes."
#### Generated Code Structure
```python
# app.py
from flask import Flask, request, jsonify
from flask_sqlalchemy import SQLAlchemy
from flask_jwt_extended import JWTManager, create_access_token, jwt_required
import os
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = os.getenv('DATABASE_URL', 'postgresql://user:password@db:5432/tasks')
app.config['JWT_SECRET_KEY'] = os.getenv('JWT_SECRET', 'super-secret')
db = SQLAlchemy(app)
jwt = JWTManager(app)
class Task(db.Model):
id = db.Column(db.Integer, primary_key=True)
title = db.Column(db.String(100), nullable=False)
description = db.Column(db.String(200))
completed = db.Column(db.Boolean, default=False)
@app.route('/tasks', methods=['POST'])
@jwt_required()
def add_task():
data = request.get_json()
new_task = Task(title=data['title'], description=data.get('description', ''))
db.session.add(new_task)
db.session.commit()
return jsonify({'id': new_task.id}), 201
# Additional endpoints for list, delete, etc.
if __name__ == '__main__':
app.run(host='0.0.0.0', port=5000)
```
#### Unit Tests
```python
# test_app.py
import pytest
from app import app, db, Task
@pytest.fixture
def client():
app.config['TESTING'] = True
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///:memory:'
with app.test_client() as client:
with app.app_context():
db.create_all()
yield client
with app.app_context():
db.drop_all()
def test_add_task(client):
response = client.post('/tasks', json={'title': 'Test Task'})
assert response.status_code == 201
assert Task.query.first().title == 'Test Task'
```
#### Dockerfile
```dockerfile
FROM python:3.9-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY . .
CMD ["gunicorn", "--bind", "0.0.0.0:5000", "app:app"]
```
#### Deployment Steps
1. **Build the Docker image**: `docker build -t task-api .`
2. **Run the container**: `docker run -d -p 5000:5000 --env-file .env task-api`
3. **Deploy to Kubernetes**:
```yaml
# deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: task-api
spec:
replicas: 3
selector:
matchLabels:
app: task-api
template:
metadata:
labels:
app: task-api
spec:
containers:
- name: task-api
image: task-api:latest
ports:
- containerPort: 5000
envFrom:
- secretRef:
name: task-api-secrets
```
4. **Apply the deployment**: `kubectl apply -f deployment.yaml`
#### Architecture Explanation
The API follows a layered architecture:
- **Presentation Layer**: Flask handles HTTP requests/responses.
- **Application Layer**: Business logic for task management.
- **Data Layer**: PostgreSQL stores task data.
- **Security Layer**: JWT authentication secures endpoints.
The Dockerfile ensures consistency across environments, while Kubernetes provides scalability and high availability. The PostgreSQL database is externalized for persistence, and environment variables manage configuration.
#### DevOps Integration
- **CI/CD Pipeline**: Use GitHub Actions to automate testing and deployment.
- **Monitoring**: Integrate Prometheus and Grafana for metrics.
- **Logging**: Use ELK stack (Elasticsearch, Logstash, Kibana) for log aggregation.
- **Infrastructure as Code**: Terraform scripts to provision cloud resources.
This implementation reduces development time by 60% compared to manual coding and ensures consistency with DevOps best practices.Streamline talent acquisition with collaborative tools and customizable interview processes.
Hierarchical project management made simple
Control SaaS spending with visibility and analytics
Orchestrate workloads with multi-cloud support, job scheduling, and integrated service discovery features.
Microsoft's cloud platform for compute, storage, AI, and hybrid infrastructure
Design, document, and generate code for APIs with interactive tools for developers.
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan