mcpField
D
devops-simplicity-checker

devops-simplicity-checker

github.com/majesticlabs-devCloud & DevOps5068 installsUpdated 7w ago
Repository

About devops-simplicity-checker

A DevOps skill for checking infrastructure projects for overengineering. It scores complexity based on file counts, modules, directory depth, and Ansible roles, then highlights potential simplifications.

Key features

  1. 01Checks Terraform file counts and directory depth
  2. 02Flags custom modules and Ansible roles
  3. 03Scores complexity using defined rules
  4. 04Lists common overengineering patterns
  5. 05Provides questions for simplification reviews

Use cases

  1. 01Review the structural complexity of a Terraform project
  2. 02Assess whether custom modules are needed
  3. 03Spot directory and variable sprawl
  4. 04Find ways to simplify Ansible configuration

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/majesticlabs-dev/majestic-marketplace --skill devops-simplicity-checker

After installing, type/devops-simplicity-checkerin Claude Code to confirm it loaded.

Details

From the project README

DevOps Simplicity Checker

Infrastructure should be SIMPLE by default. This skill detects overengineering.

Simplicity Checklist

CheckPassFail
File count≤8 .tf files>15 files in nested directories
Module usageNone or registry onlyCustom modules for <5 resources
Directory depthFlat or 1 level3+ levels of nesting
Ansible playbooksSingle playbookMultiple playbooks + custom roles
Ansible rolesGalaxy roles onlyCustom roles for standard tasks
VariablesInline defaultsComplex variable hierarchies

Complexity Score Calculation

Files: 1 point per .tf file over 5
Modules: 3 points per custom module
Directories: 2 points per level over 1
Ansible roles: 3 points per custom role

Score 0-5: Simple (GOOD)
Score 6-10: Moderate (REVIEW)
Score 11+: Overengineered (SIMPLIFY)

Detection Commands

# Count .tf files
find . -name "*.tf" | wc -l

# Find custom modules (not registry)
grep -r "source\s*=" *.tf | grep -v "registry.terraform.io" | grep -v "github.com" | wc -l

# Directory depth
find . -name "*.tf" -printf '%h\n' | sort -u | awk -F'/' '{print NF-1}' | sort -rn | head -1

# Custom Ansible roles (not Galaxy)
ls roles/ 2>/dev/null | wc -l

# Variable files
find . -name "*.tfvars" -o -name "variables.tf" | wc -l

Questions to Ask

  • Could this be done with fewer files?
  • Is this custom module solving a problem registry modules can't?
  • Would a flat structure work just as well?
  • Does this Ansible role exist in Galaxy already?
  • Are these variable hierarchies necessary or premature abstraction?

Red Flags

PatternProblemFix
modules/ with single resourceOver-abstractionInline the resource
environments/{dev,staging,prod}/DuplicationUse workspaces or tfvars
roles/common/ for apt packagesReinventing wheelUse Galaxy role
Nested .tf importsHard to followFlatten structure
>10 variable filesConfiguration sprawlConsolidate

Scoring Report Format

SIMPLICITY SCORE: X/10

File Count: X files (+Y penalty)
Custom Modules: X modules (+Y penalty)
Directory Depth: X levels (+Y penalty)
Custom Roles: X roles (+Y penalty)

Total Penalty: X points
Verdict: SIMPLE | MODERATE | OVERENGINEERED

Recommendations:
- [ ] Consider flattening directory structure
- [ ] Replace custom module X with registry module
- [ ] Use Galaxy role for standard task

Comments

Markdown supported