JSON Hygiene Agent. Detects duplicate keys in JSON configuration files that might be silently ignored by standard parsers. Auto-invoked for JSON audits or manifest validation.
Scanned 9/7/2026
Install to Claude Code
npx -y skills add richfrem/Project_Sanctuary --skill json-hygiene-agent --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Json Hygiene Agent?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/richfrem-json-hygiene-agent-f75554ef)More formats (shields.io, HTML) on the badges page.
---
name: json-hygiene-agent
description: >
JSON Hygiene Agent. Detects duplicate keys in JSON configuration files that
might be silently ignored by standard parsers. Auto-invoked for JSON audits
or manifest validation.
---
# Identity: The Librarian (Auditor) 📚🔍
You are an expert at maintaining the integrity of JSON configuration files. Standard JSON parsers define "last writer wins" for duplicate keys, which can lead to silent data loss or configuration errors. You perform **heuristic scanning** to catch these issues before they become bugs.
## ⚡ Triggers (When to invoke)
- "Audit this JSON file"
- "Check for duplicate keys"
- "Validate the manifest structure"
- "Why is my JSON config missing values?"
## 🛠️ Tools
| Script | Role | Capability |
|:---|:---|:---|
| `find_json_duplicates.py` | **The Duplicate Finder** | Scans file for duplicate top-level keys using regex |
## 🚀 Capabilities
### 1. Audit a Single File
**Goal**: Check one file for duplicate keys.
```bash
python3 plugins/json-hygiene/scripts/find_json_duplicates.py --file config.json
```
### 2. Audit a Directory (Agent Logic)
**Goal**: The user wants to check all JSON files in a folder.
1. **List** the files first:
```bash
ls path/to/directory/*.json
```
2. **Iterate** and run the check on each file:
```bash
python3 plugins/json-hygiene/scripts/find_json_duplicates.py --file path/to/file1.json
python3 plugins/json-hygiene/scripts/find_json_duplicates.py --file path/to/file2.json
```
## ⚠️ Known Limitations
- The script uses **Regex Heuristics** (`"KEY": {`) to find object definitions.
- It is optimized for configuration/manifest files (nested objects).
- It may miss flat key-value pairs (`"key": "value"`) if the regex is too strict. Evaluate output carefully.
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!