Tooling detector

From FortiumPartners/ai-mesh · View interactive version

Tooling detector is an AI agent skill from the GitHub repository FortiumPartners/ai-mesh. **Version**: 1.0.0 | **Purpose**: Automatic detection of infrastructure tooling (Helm, Kubernetes, Kustomize, ArgoCD)

How to use this skill

Skill file

Tooling Detection System

Version: 1.0.0 | Purpose: Automatic detection of infrastructure tooling (Helm, Kubernetes, Kustomize, ArgoCD)


Overview

The tooling detection system automatically identifies infrastructure and DevOps tooling usage in projects using multi-signal analysis. It detects Helm charts, Kubernetes manifests, Kustomize configurations, and GitOps tools with 95%+ accuracy.

Supported Tools:

Use Cases:


Quick Start

Detect All Tools

node skills/tooling-detector/detect-tooling.js /path/to/project

Output:

{
  "detected": true,
  "tools": [
    {
      "tool": "helm",
      "name": "Helm",
      "confidence": 0.9,
      "signals": {
        "chart_yaml": true,
        "values_yaml": true,
        "templates_dir": true
      },
      "signal_count": 3
    },
    {
      "tool": "kubernetes",
      "name": "Kubernetes",
      "confidence": 0.85,
      "signals": {
        "api_version": true,
        "kind_field": true,
        "manifests_dir": true
      },
      "signal_count": 3
    }
  ]
}

Detect Specific Tool

# Detect Helm
node skills/tooling-detector/detect-tooling.js /path/to/project --tool helm

# Detect Kubernetes
node skills/tooling-detector/detect-tooling.js /path/to/project --tool kubernetes

Custom Confidence Threshold

node skills/tooling-detector/detect-tooling.js /path/to/project --min-confidence 0.8

Detection Signals

Helm Detection

Primary Signals (High Confidence):

Secondary Signals (Medium Confidence):

Confidence Threshold: ≥70% for automatic detection

Example Detection:

Chart.yaml: ✅ (0.6)
values.yaml: ✅ (0.3)
templates/: ✅ (0.2)
helm CLI: ✅ (0.2)
→ Confidence: 1.0 + 0.1 boost = 100%

Kubernetes Detection

Primary Signals (High Confidence):

Secondary Signals (Medium Confidence):

Confidence Threshold: ≥70% for automatic detection

Example Detection:

apiVersion fields: ✅ (0.5)
kind fields: ✅ (0.4)
kubectl CLI: ✅ (0.2)
manifests/ dir: ✅ (0.1)
→ Confidence: 1.0 + 0.1 boost = 100%

Usage Patterns

Integration with infrastructure-developer

Auto-detect and load skills:

#!/bin/bash

# Detect tooling
TOOLING=$(node skills/tooling-detector/detect-tooling.js .)

# Parse results
HELM_DETECTED=$(echo $TOOLING | jq -r '.tools[] | select(.tool=="helm") | .tool')
K8S_DETECTED=$(echo $TOOLING | jq -r '.tools[] | select(.tool=="kubernetes") | .tool')

# Load Helm skill if detected
if [ "$HELM_DETECTED" = "helm" ]; then
  echo "📦 Helm detected - loading Helm skill..."
  cat skills/helm/SKILL.md
fi

# Load Kubernetes skill if detected
if [ "$K8S_DETECTED" = "kubernetes" ]; then
  echo "☸️  Kubernetes detected - loading Kubernetes skill..."
  cat skills/kubernetes/SKILL.md
fi

Programmatic Usage (Node.js)

const { detectTooling, detectTool } = require('./skills/tooling-detector/detect-tooling.js');

// Detect all tools
async function analyzeProject(projectPath) {
  const result = await detectTooling(projectPath);

  if (result.detected) {
    console.log(`Detected ${result.tools.length} tools:`);
    for (const tool of result.tools) {
      console.log(`  - ${tool.name}: ${(tool.confidence * 100).toFixed(0)}%`);
    }
  }
}

// Detect specific tool
async function checkHelm(projectPath) {
  const result = await detectTool(projectPath, 'helm');

  if (result.detected) {
    console.log(`Helm detected with ${(result.confidence * 100).toFixed(0)}% confidence`);
    console.log('Signals:', result.signals);
  }
}

Detection Algorithm

Multi-Signal Analysis

  1. File Existence: Check for tool-specific files
  1. Directory Existence: Check for tool-specific directories
  1. Pattern Matching: Search file contents for patterns
  1. Confidence Calculation:

```

confidence = (weighted_signal_sum / total_weight)

if (signal_count >= 3) {

confidence += multi_signal_boost // +10-20%

}

confidence = min(1.0, confidence)

```

  1. Threshold Check: Return detected if confidence ≥70%

Performance Targets


Configuration

Custom Patterns

Modify tooling-patterns.json to customize detection:

{
  "tools": {
    "helm": {
      "detection_signals": {
        "chart_yaml": {
          "weight": 0.6,
          "files": ["Chart.yaml"]
        }
      }
    }
  },
  "detection_rules": {
    "minimum_confidence": 0.7,
    "multi_signal_boost": 0.1,
    "minimum_signals_for_boost": 3
  }
}

Manual Override

Skip detection and manually specify tools:

# Force Helm detection
--tools helm

# Force multiple tools
--tools helm,kubernetes

# Adjust confidence threshold
--min-confidence 0.8

CLI Reference

Commands

# Detect all tools
node detect-tooling.js [project-path]

# Detect specific tool
node detect-tooling.js [project-path] --tool <tool-name>

# Filter tools
node detect-tooling.js [project-path] --tools helm,kubernetes

# Custom confidence threshold
node detect-tooling.js [project-path] --min-confidence 0.8

Exit Codes


Troubleshooting

No Tools Detected

# Run with all results
node detect-tooling.js . | jq '.all_results'

# Check confidence scores
node detect-tooling.js . --min-confidence 0.5

# Verify file patterns
ls Chart.yaml values.yaml templates/

False Positives

Adjust confidence threshold:

node detect-tooling.js . --min-confidence 0.8

Performance Issues

Check project size:

# Exclude large directories
echo "node_modules/" >> .gitignore
echo "vendor/" >> .gitignore

Examples

Helm Chart Project

Project Structure:

my-chart/
├── Chart.yaml        # ✅ Detected
├── values.yaml       # ✅ Detected
├── templates/        # ✅ Detected
│   ├── deployment.yaml
│   └── service.yaml
└── .helmignore       # ✅ Detected

Detection Result:

{
  "detected": true,
  "tools": [
    {
      "tool": "helm",
      "confidence": 1.0,
      "signals": {
        "chart_yaml": true,
        "values_yaml": true,
        "templates_dir": true,
        "config": true
      },
      "signal_count": 4
    }
  ]
}

Kubernetes Manifests Project

Project Structure:

k8s/
├── deployment.yaml   # ✅ apiVersion, kind detected
├── service.yaml      # ✅ apiVersion, kind detected
├── ingress.yaml      # ✅ apiVersion, kind detected
└── kustomization.yaml # ✅ Detected

Detection Result:

{
  "detected": true,
  "tools": [
    {
      "tool": "kubernetes",
      "confidence": 0.95,
      "signals": {
        "api_version": true,
        "kind_field": true,
        "kustomization": true,
        "manifests_dir": true
      },
      "signal_count": 4
    }
  ]
}

Combined Helm + Kubernetes

Project Structure:

my-app/
├── Chart.yaml        # Helm
├── values.yaml       # Helm
├── templates/        # Helm
│   └── *.yaml        # Kubernetes manifests
└── kustomize/        # Kubernetes + Kustomize
    └── kustomization.yaml

Detection Result:

{
  "detected": true,
  "tools": [
    {
      "tool": "helm",
      "confidence": 1.0
    },
    {
      "tool": "kubernetes",
      "confidence": 0.9
    },
    {
      "tool": "kustomize",
      "confidence": 0.8
    }
  ]
}

API Reference

`detectTooling(projectPath, options)`

Detect all infrastructure tooling in project.

Parameters:

Returns: Promise<Object>

{
  detected: boolean,
  tools: Array<{
    tool: string,
    name: string,
    confidence: number,
    signals: Object,
    signal_count: number
  }>,
  all_results: Array,
  detection_summary: {
    total_analyzed: number,
    detected_count: number,
    minimum_confidence: number
  }
}

`detectTool(projectPath, toolName, options)`

Detect specific tool (Helm or Kubernetes).

Parameters:

Returns: Promise<Object>

{
  detected: boolean,
  tool: string,
  name: string,
  confidence: number,
  signals: Object,
  signal_count: number
}

Version History

1.0.0 (2025-10-23):


Last Updated: 2025-10-23 | Version: 1.0.0

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.