Field type identification
Skill HolobiomicsLab/asb-skill-collections/collections/metabolomics/v2/skills/field-type-identification
Use when when working with JSON project documents that must conform to a schema-defined structure, and you need to apply type-specific validation, sanitization, or transformation rules (e.g., URL whitespace detection, numeric range checking, mandatory field enforcement).From its SKILL.md
npx -y skills add HolobiomicsLab/asb-skill-collections --skill field-type-identificationAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 15 stars15 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 file declares
Copied from the file, not written here
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, 782 tokens by cl100k_base, as published. Nobody here has run it
Field-type identification
Summary
Identify and classify fields in JSON project documents according to their designated types (e.g., URL, string, number) as defined in a JSON schema, enabling downstream validation and processing rules specific to each field category.
When to use
When working with JSON project documents that must conform to a schema-defined structure, and you need to apply type-specific validation, sanitization, or transformation rules (e.g., URL whitespace detection, numeric range checking, mandatory field enforcement).
When NOT to use
- Input is a non-JSON or unstructured document (e.g., CSV, plain text)
- The project JSON does not declare which schema version it conforms to
- No schema file is available or schema is incomplete/malformed
Inputs
- Project JSON document
- JSON schema definition file (app/public/schema.json)
Outputs
- Field-type mapping (field name → type classification)
- Categorized field list (URLs, strings, numbers, etc.)
- Validation rule assignments per field type
How to apply
Load the project JSON schema (e.g., app/public/schema.json) and parse its field type definitions. Iterate through each field in a project JSON document and cross-reference its name against the schema to determine its declared type. For fields with URL type, flag them for URL-specific validation (whitespace detection); for string fields, apply text constraints; for numeric fields, apply range checks. This classification step is prerequisite to any schema-aware validation workflow and ensures validation rules are applied only to relevant field categories.
Related tools
- npm (Runtime environment for loading, parsing, and iterating JSON schema and project documents) — https://www.npmjs.com/
- paired-data-form repository (Source of the JSON schema definition and project structure documentation) — https://github.com/iomega/paired-data-form
Evaluation signals
- All fields in the project JSON are successfully mapped to a type declared in the schema
- Fields classified as URL type match the schema's URL field list (e.g., project URLs, reference links, data repository links)
- No fields are left unclassified or assigned an unknown type
- Type-specific validation rules (e.g., whitespace checks for URLs) can be applied to the correct field subset
- Schema conformance check passes without type mismatch errors
Limitations
- Requires the schema file to be present and valid; breaks silently if schema is missing or malformed
- Does not validate field values themselves, only identifies their types; whitespace or format errors are caught by downstream validation, not this step
- Schema version mismatch between document and schema definition may lead to incorrect type assignments
- Platform historically had issues with spaces in URLs not being properly handled, suggesting field-type identification alone is insufficient without downstream whitespace validation
Evidence
- [other] The platform stores paired omics data projects using a JSON schema format (app/public/schema.json) that defines project structure: "The platform stores paired omics data projects using a JSON schema format (app/public/schema.json) that defines project structure, which serves as the basis for implementing field-level validation"
- [other] Identify all fields designated as URL type in the schema (e.g., project URLs, reference links, data repository links): "Identify all fields designated as URL type in the schema (e.g., project URLs, reference links, data repository links). Iterate through each URL field and check for the presence of whitespace"
- [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."
- [discussion] Warning to not include spaces in urls: "Spaces in URLs not properly handled [section=discussion; evidence='Warning to not include spaces in urls ([#75]'"
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.