Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add datadrivenconstruction/DDC_Skills_for_AI_Agents_in_Construction --skill json-parsergit clone --depth 1 https://github.com/datadrivenconstruction/DDC_Skills_for_AI_Agents_in_ConstructionWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/datadrivenconstruction/ddc_skills_for_ai_agents_in_construction/json-parser)<a href="https://agentmods.dev/skills/datadrivenconstruction/ddc_skills_for_ai_agents_in_construction/json-parser"><img src="https://agentmods.dev/badge/skills/datadrivenconstruction/ddc_skills_for_ai_agents_in_construction/json-parser/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/datadrivenconstruction/ddc_skills_for_ai_agents_in_construction/json-parser"><img src="https://agentmods.dev/badge/skills/datadrivenconstruction/ddc_skills_for_ai_agents_in_construction/json-parser.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00028 | $0.01682 |
| Opus 5 | $0.00014 | $0.00841 |
| Sonnet 5 | $0.00006 | $0.00336 |
| Haiku 4.5 | $0.00003 | $0.00168 |
Grade A, and why
json-parser scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
Copies of this mod
1 near-identical copy found in the catalogue:
- json-parser — 100% identical, 0 lines differ
How it starts
The opening of the file, as written. The whole thing — 233 lines — stays where its author put it; the contents beside it link to each section on GitHub.
JSON Parser for Construction Data
Overview
Construction systems increasingly use JSON for data exchange - from IoT sensors to BIM metadata exports. This skill handles parsing, validation, and flattening of JSON structures.
Python Implementation
import json
import pandas as pd
from typing import Dict, Any, List, Optional, Union
from dataclasses import dataclass
from pathlib import Path
@dataclass
class JSONParseResult:
"""Result of JSON parsing operation."""
success: bool
data: Any
errors: List[str]
record_count: int
class ConstructionJSONParser:
"""Parse JSON data from construction sources."""
def __init__(self):
self.errors: List[str] = []
def parse_file(self, file_path: str) -> JSONParseResult:
"""Parse JSON from file."""
try:
with open(file_path, 'r', encoding='utf-8') as f:
data = json.load(f)
return JSONParseResult(True, data, [], self._count_records(data))
except json.JSONDecodeError as e:
return JSONParseResult(False, None, [f"JSON Error: {e}"], 0)
except Exception as e:
return JSONParseResult(False, None, [str(e)], 0)
def parse_string(self, json_string: str) -> JSONParseResult:
"""Parse JSON from string."""
try:
data = json.loads(json_string)
return JSONParseResult(True, data, [], self._count_records(data))
except json.JSONDecodeError as e:
return JSONParseResult(False, None, [f"JSON Error: {e}"], 0)
def _count_records(self, data: Any) -> int:
"""Count records in data."""
if isinstance(data, list):
return len(data)
elif isinstance(data, dict):
return 1
return 0
def flatten_json(self, data: Dict, prefix: str = '') -> Dict[str, Any]:
"""Flatten nested JSON to single-level dict."""
flat = {}
for key, value in data.items():
new_key = f"{prefix}_{key}" if prefix else key
if isinstance(value, dict):
flat.update(self.flatten_json(value, new_key))
elif isinstance(value, list):
if all(isinstance(i, (str, int, float, bool, type(None))) for i in value):
flat[new_key] = value
else:
for i, item in enumerate(value):
if isinstance(item, dict):
flat.update(self.flatten_json(item, f"{new_key}_{i}"))
else:
flat[f"{new_key}_{i}"] = item
else:
flat[new_key] = value
return flat
def to_dataframe(self, data: Union[List[Dict], Dict]) -> pd.DataFrame:
"""Convert JSON data to DataFrame."""
if isinstance(data, list):
flat_records = [self.flatten_json(r) if isinstance(r, dict) else {'value': r} for r in data]
return pd.DataFrame(flat_records)
elif isinstance(data, dict):
if all(isinstance(v, list) for v in data.values()):
# Dict of lists - columnar format
return pd.DataFrame(data)
else:
flat = self.flatten_json(data)
return pd.DataFrame([flat])
return pd.DataFrame()
def extract_elements(self, data: Dict, path: str) -> List[Any]:
"""Extract elements using dot notation path."""
parts = path.split('.')
current = data
for part in parts:
if isinstance(current, dict) and part in current:
current = current[part]
elif isinstance(current, list) and part.isdigit():
current = current[int(part)]
else:
return []
return current if isinstance(current, list) else [current]
def validate_schema(self, data: Dict,
required_fields: List[str]) -> Dict[str, Any]:
"""Validate JSON against required fields."""
flat = self.flatten_json(data)
missing = [f for f in required_fields if f not in flat]
present = [f for f in required_fields if f in flat]
return {
'valid': len(missing) == 0,
'missing_fields': missing,
'present_fields': present,
'completeness': len(present) / len(required_fields) * 100
}
# BIM JSON Parser
class BIMJSONParser(ConstructionJSONParser):
"""Specialized parser for BIM JSON exports."""
def parse_bim_elements(self, data: Dict) -> pd.DataFrame:
"""Parse BIM elements from JSON export."""
elements = []
# Common BIM JSON structures
if 'elements' in data:
elements = data['elements']
elif 'objects' in data:
elements = data['objects']
elif 'entities' in data:
elements = data['entities']
elif isinstance(data, list):
elements = data
if not elements:
return pd.DataFrame()
# Flatten each element
flat_elements = []
for elem in elements:
if isinstance(elem, dict):
flat = self.flatten_json(elem)
flat_elements.append(flat)
return pd.DataFrame(flat_elements)
def extract_properties(self, element: Dict) -> Dict[str, Any]:
"""Extract properties from BIM element."""
props = {}
# Common property locations in BIM JSON
for key in ['properties', 'params', 'parameters', 'attributes']:
if key in element and isinstance(element[key], dict):
props.update(element[key])
return props
# IoT JSON Parser
class IoTJSONParser(ConstructionJSONParser):
"""Parser for IoT sensor data."""
def parse_sensor_reading(self, data: Dict) -> Dict[str, Any]:
"""Parse single sensor reading."""
return {
'sensor_id': data.get('sensor_id') or data.get('id'),
'timestamp': data.get('timestamp') or data.get('time'),
'value': data.get('value') or data.get('reading'),
'unit': data.get('unit', ''),
'location': data.get('location', '')
}
def parse_sensor_batch(self, data: List[Dict]) -> pd.DataFrame:
"""Parse batch of sensor readings."""
readings = [self.parse_sensor_reading(r) for r in data]
return pd.DataFrame(readings)
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 6d ago First seen · 233 lines · 28 tokens per session scan A 99e27644b5b6
json-parser is a skill published in the GitHub repository datadrivenconstruction/DDC_Skills_for_AI_Agents_in_Construction (307 stars, last pushed 18d ago), licensed MIT. It adds 28 tokens to every session and 1,682 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other skills, from other repositories
tflite-micro-integration
Use when integrating or debugging TensorFlow Lite Micro (LiteRT) on MCUs — op resolver, tensor arena sizing, AllocateTensors, Invoke, int8 quantization, and missing-op errors.
tinymaix-integration
Use when integrating, porting, configuring, or debugging TinyMaix MCU inference, model loading, tensor shapes, memory, quantization, or TinyML runtime issues.
8051-mcu-debug
Use when debugging 8051-compatible microcontrollers, 51 MCU firmware, STC download issues, Keil C51 projects, interrupts, timers, UART, or startup failures.
battery-charger-fuel-gauge-integration
Use when integrating or debugging Li-ion charger/fuel gauge ICs (BQ24295, BQ27441, MAX17048) over I2C, covering charge start, watchdog host mode, NTC/JEITA faults, and SOC jumps.
cortex-r5-debug
Use when debugging Cortex-R5 or Cortex-R firmware — TCM, MPU, caches, DFSR/DFAR aborts, exceptions, GIC/VIC interrupts, lockstep or split mode, ECC, or JTAG bring-up.
embedded-library-entry
Use when integrating, porting, configuring, or debugging third-party MCU embedded C libraries in bare-metal or RTOS projects.