json-modifier
wanng-ide 제작
Notes & PKM요약
Safely apply structured JSON patches (RFC 6902) to files.
설명
이 스킬이 하는 일
Applies structured JSON patches in RFC 6902 format to files without rewriting them. Supports add, remove, replace, move, copy, and test operations. Writes atomically to prevent data corruption and preserves indentation.
Avoids brittle regex and full-file rewrites by applying targeted, validated patches that leave the rest of the document unchanged.
사용 시점
- Bumping version numbers in package.json
- Adding feature flags to a config file
- Removing deprecated keys from API response configs
- Appending items to arrays in settings files
- Updating nested values in multi-environment config files
예시 워크플로
User asks: update the version field in package.json from 1.0.0 to 2.0.0
- 1
Identify the target file: package.json
- 2
Construct an RFC 6902 patch: [{"op": "replace", "path": "/version", "value": "2.0.0"}]
- 3
Run: node skills/json-modifier/index.js --file package.json --patch '[{"op": "replace", "path": "/version", "value": "2.0.0"}]'
- 4
Confirm patch validates and applies without error
package.json updated with version set to 2.0.0, original indentation preserved
설치
clawhub install wanng-ide/json-modifierCLI 명령을 실행하거나, 프롬프트를 Claude Code, Cursor, Codex 등 사용하는 코딩 에이전트에 붙여넣으세요.