Updated Oct 16, 2026

Static Code Analysis

Check JSON, YAML, TOML and XML syntax with Prek

prek-check is a JSON, YAML, TOML and XML syntax-checking node powered by Prek built-in hooks.

Agent

overview

What prek-check does

Check copied data files through Prek built-in check-json, check-yaml, check-toml and check-xml hooks. The fixed configuration ignores repository hook settings and executes no repository-defined scripts. The report retains per-hook statuses, native diagnostics, file lists and hashes.

Only lowercase .json, .yaml, .yml, .toml and .xml files are eligible. Limits are 200 eligible files, 1000 traversed files, 1 MiB per file, 10 MiB total and 30 seconds per hook. Symbolic links and special files are refused; .git is omitted.

Syntax findings produce a successful task report with passed: false. Native runtime/configuration failures fail the task. Inspect each hook result rather than treating task success as valid syntax.

This operation uses 0.5.5. Upstream license: MIT. The source link identifies the program used by this node.

source github.com/j178/prek/tree/v0.5.5

use cases

Where prek-check fits

Check mixed config formats

Run the fixed JSON, YAML, TOML and XML syntax hooks over eligible files.

Collect native parser errors

Retain each native hook diagnostic and its associated file list.

Review files without applying fixes

Inspect results while keeping supplied source files unchanged.

reference

prek-check inputs and flags

1 inputs
NameTypeFlagDescription
sourceFOLDER--sourceFolder of lowercase .json/.yaml/.yml/.toml/.xml data files, up to 200 eligible files, 1 MiB/file and 10 MiB total; 1000 traversed files. Symlinks refused. Fixed check-json/check-yaml/check-toml/check-xml only; prek.toml and pre-commit configs ignored, no remote hooks or script execution. 30 seconds/hook. Source copied and unchanged.

Showing key inputs. prek-check exposes 1 inputs in total.

example

Run prek-check

prek-check · command
python3 /app/run.py --source ./source ./output
sample output
{
  "tool": "prek-check",
  "passed": false,
  "failed_hooks": 4,
  "file_count": 8
}

guidance

Choosing prek-check

Choose this node for four data syntax parsers in one report. YAMLlint adds YAML style rules; XML schema validation and application-specific schemas require separate checks.

ajv-validate

Validates JSON against a schema rather than checking these four data syntaxes.

faq

prek-check questions

source: Folder of lowercase .json/.yaml/.yml/.toml/.xml data files, up to 200 eligible files, 1 MiB/file and 10 MiB total; 1000 traversed files. Symlinks refused. Fixed check-json/check-yaml/check-toml/check-xml only; prek.toml and pre-commit configs ignored, no remote hooks or script execution. 30 seconds/hook. Source copied and unchanged.

JSON hook report. Syntax findings produce a successful task report with passed: false. Native runtime/configuration failures fail the task. Inspect each hook result rather than treating task success as valid syntax.

Only lowercase .json, .yaml, .yml, .toml and .xml files are eligible. Limits are 200 eligible files, 1000 traversed files, 1 MiB per file, 10 MiB total and 30 seconds per hook. Symbolic links and special files are refused; .git is omitted.

Choose this node for four data syntax parsers in one report. YAMLlint adds YAML style rules; XML schema validation and application-specific schemas require separate checks.

The image repository also contains a digest-bound source/notices artifact. Download it with oras pull docker.io/nenadzaric/skills-intel-prek-check@sha256:be3ff595ff488fc7ab0d6055424e240534fc09f3e181b7612e8a2883e2e84950. The bundle includes the build recipe, licenses, copied notices and component-source directions. Bundle SHA256: 0a87126df4020e7b6b30842e400783ea39101e34eb397785fee7bab641ec39f4. Follow its source directions for upstream archives and patches. Image and source/notices repository.

Run prek-check yourself

The synthetic run checks json hook report. The excerpt shows selected native fields asserted by saved passing platform verifier; reconstructed excerpt, not full raw artifact. The command shown is the container entrypoint with example paths, not a host-installed CLI command.

Facts on this page come from the live Trickest tool library.