validate-config

Validate a config file (JSON, YAML, TOML, or .env) against a JSON Schema using config-validator. Use when you need to check that a config file is valid before deploying, catch missing required fields or wrong types, or run validation in a CI pipeline. Triggers include "validate config", "check config file", "schema validation", "validate yaml", "validate json config", "config has errors", or any task involving checking whether a config file matches its expected schema.

7 stars

Best use case

validate-config is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Validate a config file (JSON, YAML, TOML, or .env) against a JSON Schema using config-validator. Use when you need to check that a config file is valid before deploying, catch missing required fields or wrong types, or run validation in a CI pipeline. Triggers include "validate config", "check config file", "schema validation", "validate yaml", "validate json config", "config has errors", or any task involving checking whether a config file matches its expected schema.

Teams using validate-config should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/validate-config/SKILL.md --create-dirs "https://raw.githubusercontent.com/heldernoid/agentic-build-templates/main/projects/developer-tools/config-validator/skills/validate-config/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/validate-config/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How validate-config Compares

Feature / Agentvalidate-configStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Validate a config file (JSON, YAML, TOML, or .env) against a JSON Schema using config-validator. Use when you need to check that a config file is valid before deploying, catch missing required fields or wrong types, or run validation in a CI pipeline. Triggers include "validate config", "check config file", "schema validation", "validate yaml", "validate json config", "config has errors", or any task involving checking whether a config file matches its expected schema.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# validate-config

Check a config file against a JSON Schema and get structured error reports.

## When to use

- Before deploying, validate that all required fields are present and typed correctly
- In a CI pipeline step to block deploys on invalid configs
- When debugging why an application fails to start (check for config errors)
- After editing a config file to confirm it is still valid

## Validate via CLI

```bash
# Validate against a schema stored on the server
cv validate app.config.yaml --schema my-app-config

# Validate with a local schema file
cv validate app.config.yaml --schema-file ./schemas/app.json

# Get JSON output (for scripting)
cv validate app.config.yaml --schema my-app-config --format json

# Specify server explicitly
cv validate app.config.yaml --schema my-app-config --server http://localhost:3000
```

Exit code 0 on pass, exit code 1 on failure or error.

## Validate via API

```bash
# File upload (multipart)
curl -s -X POST http://localhost:3000/api/validate \
  -F "file=@app.config.yaml" \
  -F "schema_id=my-app-config"

# JSON body
curl -s -X POST http://localhost:3000/api/validate \
  -H "Content-Type: application/json" \
  -d '{
    "content": "port: 8080\nhost: localhost",
    "format": "yaml",
    "schema_id": "my-app-config"
  }'
```

## Validation result shape

```json
{
  "valid": false,
  "errorCount": 2,
  "filename": "app.config.yaml",
  "format": "yaml",
  "durationMs": 5,
  "errors": [
    {
      "path": "/database/port",
      "message": "must be number",
      "keyword": "type",
      "lineHint": 12,
      "params": { "type": "number" }
    }
  ]
}
```

## Supported file formats

| Format | Extensions | Notes |
|--------|------------|-------|
| JSON   | .json      | Strict JSON, no comments |
| YAML   | .yaml .yml | YAML 1.2 safe load |
| TOML   | .toml      | TOML v1.0 |
| env    | .env       | KEY=VALUE pairs, ignores comments |

Format is auto-detected from file extension. For files without extension, the first 512 bytes are sniffed.

## CI pipeline usage

```yaml
# GitHub Actions
- name: Validate config
  run: cv validate config/app.production.yaml --schema my-app-config
  env:
    CV_SERVER: ${{ secrets.CV_SERVER }}
```

The step fails (exit 1) if validation fails, blocking the deploy.

## Troubleshooting

### "schema not found"

The schema ID does not exist on the server. Run `cv schemas list` to see available schemas.

### "format detection failed"

The file extension is not recognized and byte sniffing was inconclusive. Add the correct extension or use `--format yaml|json|toml|env` explicitly.

Related Skills

Skill: pi-config

7
from heldernoid/agentic-build-templates

Patterns for Raspberry Pi boot partition configuration injection.

nginx-config-generator

7
from heldernoid/agentic-build-templates

Generate production-ready nginx configuration files for reverse proxy, SSL, rate limiting, and caching setups. Use when you need an nginx config for a web application, API, static site, or reverse proxy. Triggers include "nginx config", "nginx configuration", "nginx setup", "reverse proxy config", "SSL nginx", "nginx rate limiting", or any request involving nginx web server configuration.

dns-config

7
from heldernoid/agentic-build-templates

Manage the local-dns-override hosts.yaml configuration file. Use when you need to view the current DNS config, validate a hosts.yaml file before applying it, understand the config file format, or check which records are currently loaded. Triggers include "show DNS config", "validate hosts.yaml", "check loaded records", "DNS config file", "list local DNS entries", or any task involving viewing or validating the DNS record configuration.

ssh-config-manager

7
from heldernoid/agentic-build-templates

Manage SSH host configurations in ~/.ssh/config from the terminal. Use when adding, editing, or searching SSH hosts, cloning host configs, testing connections, or importing configs. Triggers include "ssh config", "ssh host", "sshm", "add ssh host", "edit ssh config", "test ssh connection".

Skill: Uptime Monitoring

7
from heldernoid/agentic-build-templates

## Overview

Skill: Status Page

7
from heldernoid/agentic-build-templates

## Overview

Skill: unit-conversion

7
from heldernoid/agentic-build-templates

## Overview

Skill: recipe-scaler

7
from heldernoid/agentic-build-templates

## Overview

reading-list

7
from heldernoid/agentic-build-templates

Operate the reading-list API to save, manage, tag, search, and export articles.

email-digest

7
from heldernoid/agentic-build-templates

Configure, test, and troubleshoot the reading-list daily email digest delivered via nodemailer.

websocket-realtime

7
from heldernoid/agentic-build-templates

Use the WebSocket connection in poll-builder to receive live vote updates. Use when you need to stream real-time poll results, monitor a poll for new votes, or build a live dashboard. Triggers include "live results", "real-time updates", "stream votes", "watch poll", or "WebSocket".

poll-builder

7
from heldernoid/agentic-build-templates

Self-hosted poll creation tool with real-time results. Use when you need to create a poll, check vote counts, close a poll, export results, or get the shareable link for a poll. Triggers include "create poll", "vote", "poll results", "survey", "collect votes", "share poll", or any task involving polling or voting.