Json validation and formatting
Curated, evidence-grounded skill and software-tool collections for scientific AI agents, generated by the AgenticScienceBuilder
npx -y skills add HolobiomicsLab/asb-skill-collections --skill json-validation-and-formattingAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 14 stars14 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Use when after enriching a project JSON document with external metadata (e.g., organism names, genome identifiers) or before writing enriched JSON to disk.
The file declares its own license as CC-BY-4.0. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
5.2 KB, 849 tokens by cl100k_base, as published. Nobody here has run it
json-validation-and-formatting
Summary
Validate and ensure well-formedness of JSON project documents against a schema before storage or submission. This skill detects structural errors, missing required fields, and data type mismatches that would break downstream data integration and search indexing.
When to use
Apply this skill after enriching a project JSON document with external metadata (e.g., organism names, genome identifiers) or before writing enriched JSON to disk. Use it when project JSON files will be indexed into Elasticsearch, submitted programmatically via OpenAPI, or stored in the paired-data-form platform's file system.
When NOT to use
- The project JSON has already been validated and stored in the platform's data directory.
- You are performing exploratory data analysis on raw, unstructured omics metadata before deciding on a project schema.
Inputs
- Enriched project JSON document (in-memory object or file)
- JSON schema definition (app/public/schema.json)
Outputs
- Validation status (pass/fail with error details)
- Well-formed, schema-compliant project JSON file ready for storage or submission
How to apply
Parse the enriched project JSON document and validate it against the canonical JSON schema located at app/public/schema.json. Check that all required fields are present, that field values conform to their declared types (string, number, array, object), and that nested structures match the schema hierarchy. If validation fails, report specific field paths and error messages before writing to disk. After successful validation, ensure the JSON is properly formatted (consistent indentation, no trailing commas) before persisting. This prevents malformed documents from breaking Elasticsearch indexing or API submissions.
Related tools
- npm (Run test suite (npm run test) to verify JSON validation logic in api/ and app/ directories) — https://www.npmjs.com/
- paired-data-form (Source of canonical JSON schema (app/public/schema.json) and web service that stores and indexes validated project JSON) — https://github.com/iomega/paired-data-form
Evaluation signals
- Validated JSON matches all field names and types defined in app/public/schema.json
- No schema validation errors are reported; all required fields are present and populated
- Enriched document contains both original genome identifier and newly populated organism name fields without duplication or conflicting values
- JSON is syntactically well-formed (parses without errors, no trailing commas, proper nesting)
- Downstream Elasticsearch indexing or API submission of the validated JSON succeeds without schema-related failures
Limitations
- The skill validates structural conformance to schema but does not verify semantic correctness (e.g., whether a fetched organism name is actually valid for the genome identifier used).
- Documentation on field descriptions and requirements is incomplete (issue #76), making it difficult to infer constraints beyond the schema structure.
- Schema validation does not detect spaces in URLs or other URL format issues (issue #75)—additional domain-specific validation may be needed.
- The skill operates on complete project JSON documents; it does not validate incremental updates or partial enrichment steps.
Evidence
- [other] Validate that the enriched JSON is well-formed and contains both the original genome identifier and the newly populated organism name.: "Validate that the enriched JSON is well-formed and contains both the original genome identifier and the newly populated organism name."
- [readme] The JSON schema (app/public/schema.json) describes the format of an project.: "The JSON schema (app/public/schema.json) describes the format of an project."
- [readme] The web service stores each project as a file on disk. The application offers full text search functionality via web services using an elastic search (v7.6.2) index.: "The web service stores each project as a file on disk. The application offers full text search functionality via web services using an elastic search (v7.6.2) index."
- [other] make sure the existing tests still work by running
npm run testinapi/and/orapp/directory: "make sure the existing tests still work by runningnpm run testinapi/and/orapp/directory"
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.