enact/formatter
JSON mit benutzerdefinierter Einrückung formatieren
JSON-Daten liegen oft in einem kompakten Format vor, das schwer zu lesen und zu debuggen ist. Diese Skill formatiert JSON-Strings mit konfigurierbarer Einrückung, um Daten menschenlesbar zu machen, während die Gültigkeit erhalten bleibt.
スキルZIPをダウンロード
Claudeでアップロード
設定 → 機能 → スキル → スキルをアップロードへ移動
オンにして利用開始
テストする
「enact/formatter」を使用しています。 {"name":"test","value":123,"items":["a","b","c"]}
期待される結果:
{
"name": "test",
"value": 123,
"items": [
"a",
"b",
"c"
]
}
「enact/formatter」を使用しています。 {"enabled":true,"count":0,"config":{"timeout":30}}
期待される結果:
{
"enabled": true,
"count": 0,
"config": {
"timeout": 30
}
}
セキュリティ監査
安全All static findings are false positives. The scanner misidentified markdown code fence backticks as Ruby shell execution and YAML field descriptions as cryptographic algorithms. The actual code uses only safe standard JSON methods (JSON.parse, JSON.stringify) with no external commands, network calls, or file system access.
品質スコア
作れるもの
Konfigurationsdateien formatieren
Kompakte JSON-Konfiguration in lesbare formatierte Ausgabe mit konsistenter Einrückung für Code-Reviews und Debugging umwandeln.
API-Antworten vorbereiten
API-Antwort-JSON neu formatieren, um die Inspektion, Protokollierung und Aufnahme in Dokumentation oder Berichte zu erleichtern.
Datentransformationen debuggen
JSON-Daten in verschiedenen Phasen einer Pipeline schnell formatieren, um Struktur und Inhalt während der Entwicklung zu überprüfen.
これらのプロンプトを試す
Format this JSON with 2-space indentation:
${json}Format this JSON with ${indent}-space indentation:
${json}Format this JSON string and check if it is valid. Use ${indent} spaces for indentation:
${json}
Report whether the JSON is valid and show the formatted output.Process this list of JSON strings. Format each one with ${indent}-space indentation:
${json}
Return each formatted result with its validation status.ベストプラクティス
- Konsistente Einrückung (2 oder 4 Leerzeichen) für Team-Lesbarkeit verwenden
- JSON vor dem Formatieren validieren, um Syntaxfehler frühzeitig zu erkennen
- Einrückung an Projektkonventionen anpassen für saubere Diffs
回避
- Bereits formatiertes JSON unnötig formatieren
- Angenommene formatierte Ausgabe ist auch sortiert oder normalisiert
- Formatierung verwenden, um strukturelle Probleme in den Daten zu verbergen