Skip to main content
ClaudeWave
Skill85 repo starsupdated 3mo ago

configuration-generator

Generate configuration files for applications, services, and infrastructure. Use when: (1) Setting up new projects (package.json, requirements.txt, tsconfig.json), (2) Creating Docker or Kubernetes configurations, (3) Configuring CI/CD pipelines (GitHub Actions, GitLab CI, CircleCI), (4) Setting up web servers (Nginx, Apache), (5) Defining infrastructure as code (Terraform, CloudFormation), (6) Generating linter/formatter configs (ESLint, Prettier, Black). Provides templates and custom-generated configs for diverse tech stacks.

Install in Claude Code
Copy
git clone --depth 1 https://github.com/ArabelaTso/Skills-4-SE /tmp/configuration-generator && cp -r /tmp/configuration-generator/skills/configuration-generator ~/.claude/skills/configuration-generator
Then start a new Claude Code session; the skill loads automatically.

SKILL.md

# Configuration Generator

Generate configuration files for applications, services, and infrastructure across various formats and frameworks.

## Quick Start

### Use Built-in Templates

Access ready-to-use configuration templates from assets:

```bash
# Docker Compose
cat assets/docker-compose.yml

# Kubernetes
cat assets/kubernetes-deployment.yaml

# GitHub Actions
cat assets/github-actions-workflow.yml
```

### Generate Custom Configuration

Specify your requirements to get tailored configuration files.

## Common Configuration Types

### Application Configurations

#### Package Managers

**Node.js (package.json)**
```json
{
  "name": "my-app",
  "version": "1.0.0",
  "scripts": {
    "start": "node index.js",
    "dev": "nodemon index.js",
    "test": "jest",
    "build": "tsc"
  },
  "dependencies": {
    "express": "^4.18.0"
  },
  "devDependencies": {
    "typescript": "^5.0.0",
    "jest": "^29.0.0"
  }
}
```

**Python (requirements.txt)**
```
django==4.2.0
djangorestframework==3.14.0
psycopg2-binary==2.9.5
pytest==7.3.0
black==23.3.0
```

See **[app_configs.md](references/app_configs.md)** for:
- Package managers (npm, pip, cargo)
- Build tools (TypeScript, Webpack, Vite)
- Linters/formatters (ESLint, Prettier, Black)
- Testing frameworks (Jest, pytest)
- Environment files (.env, .editorconfig, .gitignore)

#### Build Configurations

**TypeScript (tsconfig.json)**
```json
{
  "compilerOptions": {
    "target": "ES2022",
    "module": "commonjs",
    "outDir": "./dist",
    "rootDir": "./src",
    "strict": true,
    "esModuleInterop": true
  },
  "include": ["src/**/*"],
  "exclude": ["node_modules", "dist"]
}
```

### Infrastructure Configurations

#### Docker

**Dockerfile (Multi-stage)**
```dockerfile
FROM node:18-alpine as builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build

FROM node:18-alpine
WORKDIR /app
COPY --from=builder /app/dist ./dist
COPY --from=builder /app/node_modules ./node_modules
USER node
EXPOSE 3000
CMD ["node", "dist/index.js"]
```

**Docker Compose** - See `assets/docker-compose.yml`:
- Multi-service setup (web, database, cache)
- Environment variable configuration
- Volume management
- Network configuration

#### Kubernetes

**Deployment Configuration** - See `assets/kubernetes-deployment.yaml`:
- Deployment with replicas
- ConfigMap and Secret management
- Service and Ingress configuration
- Health probes
- Resource limits

**Example Deployment**:
```yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: web-app
spec:
  replicas: 3
  selector:
    matchLabels:
      app: web-app
  template:
    spec:
      containers:
      - name: web
        image: myapp:latest
        ports:
        - containerPort: 8000
        resources:
          requests:
            memory: "256Mi"
            cpu: "250m"
          limits:
            memory: "512Mi"
            cpu: "500m"
```

See **[infra_configs.md](references/infra_configs.md)** for:
- Docker and Kubernetes
- Terraform (AWS, GCP, Azure)
- CI/CD pipelines
- Web servers (Nginx, Apache)

#### CI/CD Pipelines

**GitHub Actions** - See `assets/github-actions-workflow.yml`:
- Test, build, and deploy workflow
- Service containers (PostgreSQL, Redis)
- Docker image building
- Deployment automation

**Example Workflow**:
```yaml
name: CI/CD Pipeline

on:
  push:
    branches: [ main ]

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-python@v4
        with:
          python-version: '3.11'
      - run: pip install -r requirements.txt
      - run: pytest
```

## Configuration Decision Tree

```
What type of configuration do you need?

├─ Application Config
│  ├─ Package manager? → package.json, requirements.txt, Cargo.toml
│  ├─ Build tool? → tsconfig.json, webpack.config.js, vite.config.ts
│  ├─ Linter/formatter? → .eslintrc, .prettierrc, pyproject.toml
│  └─ Environment? → .env, .editorconfig, .gitignore
│
├─ Container/Orchestration
│  ├─ Docker? → Dockerfile, docker-compose.yml
│  └─ Kubernetes? → deployment.yaml, service.yaml, ingress.yaml
│
├─ Infrastructure as Code
│  ├─ Terraform? → main.tf, variables.tf, outputs.tf
│  └─ CloudFormation? → template.yaml
│
├─ CI/CD
│  ├─ GitHub Actions? → .github/workflows/ci.yml
│  ├─ GitLab CI? → .gitlab-ci.yml
│  └─ CircleCI? → .circleci/config.yml
│
└─ Web Server
   ├─ Nginx? → nginx.conf
   └─ Apache? → httpd.conf, .htaccess
```

## Generation Approaches

### Approach 1: Template-Based

Use pre-built templates from `assets/`:

**When to use**:
- Standard setups
- Quick prototyping
- Learning/reference

**How**:
1. Identify needed template
2. Copy from assets
3. Customize variables
4. Deploy

**Example**:
```bash
# Copy Docker Compose template
cp assets/docker-compose.yml ./

# Edit environment variables
# Deploy
docker-compose up -d
```

### Approach 2: Requirements-Based Generation

Generate from scratch based on specific needs:

**When to use**:
- Custom requirements
- Complex setups
- Specific tech stack

**How**:
1. Specify requirements
2. Choose tech stack
3. Define constraints
4. Generate configuration

**Example Request**: "Generate a GitHub Actions workflow for a Python Django app with PostgreSQL, Redis, and deployment to AWS ECS"

**Generated Output**: Custom workflow with:
- Python 3.11 setup
- PostgreSQL and Redis services
- Django test suite
- Docker image build
- AWS ECS deployment

### Approach 3: Hybrid

Combine templates with customization:

**When to use**:
- Partially standard setup
- Template needs modification
- Best practices + customization

**How**:
1. Start with template
2. Identify customization points
3. Modify specific sections
4. Validate configuration

## Best Practices

### 1. Use Environment Variables

Separate configuration from code:

**Application**:
```python
# settings.py
import os

DATABASE_URL = os.getenv('DATABASE_URL')
SECRET_KEY = os.getenv('SECRET_KEY')
DEBUG = os.getenv('DEBUG', 'False') == 'True'
```

**.env file**:
```bash
DATABAS
abstract-domain-explorerSkill

Applies abstract interpretation using different abstract domains (intervals, octagons, polyhedra, sign, congruence) to statically analyze program variables and infer invariants, value ranges, and relationships. Use when analyzing program properties, inferring loop invariants, detecting potential errors, or understanding variable relationships through static analysis.

abstract-invariant-generatorSkill

Uses abstract interpretation to automatically infer loop invariants, function preconditions, and postconditions for formal verification. Generates invariants that capture program behavior and support correctness proofs in Dafny, Isabelle, Coq, and other verification systems. Use when adding formal specifications to code, generating verification conditions, inferring contracts for functions, or discovering loop invariants for proofs.

abstract-state-analyzerSkill

Performs abstract interpretation over source code to infer possible program states, variable ranges, and data properties without executing the program. Reports potential runtime errors including out-of-bounds accesses, null dereferences, type inconsistencies, division by zero, and integer overflows. Use when analyzing code for potential runtime errors, performing static analysis, checking safety properties, or verifying program behavior without execution.

abstract-trace-summarizerSkill

Performs abstract interpretation to produce summarized execution traces and high-level program behavior representations. Highlights key control flow paths, variable relationships, loop invariants, function summaries, and potential runtime states using abstract domains (intervals, signs, nullness, etc.). Use when analyzing program behavior, understanding execution paths, computing loop invariants, tracking variable ranges, detecting potential runtime errors, or generating program summaries without concrete execution.

acsl-annotation-assistantSkill

Create ACSL (ANSI/ISO C Specification Language) formal annotations for C/C++ programs. Use this skill when working with formal verification, adding function contracts (requires/ensures), loop invariants, assertions, memory safety annotations, or any ACSL specifications. Supports Frama-C verification and generates comprehensive formal specifications for C/C++ code.

agent-browserSkill

CLI-based browser automation with persistent page state using ref-based element interaction. Use when users ask to navigate websites, interact with web pages, fill forms, take screenshots, test web applications, or extract information from web pages.

ambiguity-detectorSkill

Detects and analyzes ambiguous language in software requirements and user stories. Use when reviewing requirements documents, user stories, specifications, or any software requirement text to identify vague quantifiers, unclear scope, undefined terms, missing edge cases, subjective language, and incomplete specifications. Provides detailed analysis with clarifying questions and suggested improvements.

api-design-assistantSkill

Design and review APIs with suggestions for endpoints, parameters, return types, and best practices. Use when designing new APIs from requirements, reviewing existing API designs, generating API documentation, or getting implementation guidance. Supports REST APIs with focus on endpoint structure, request/response schemas, authentication, pagination, filtering, versioning, and OpenAPI specifications. Triggers when users ask to design, review, document, or improve APIs.