कंटेंट पर जाएँ
TakoAPI
स्किल्स पर वापस

json-modifier

wanng-ide द्वारा

Notes & PKM
455clawskills.sh द्वारा बताए गए डाउनलोड
0व्यूज़
0 लाइकइस स्किल को लाइक करने के लिए साइन इन करें
—अभी तक कोई रेटिंग नहीं
आपकी रेटिंग

संक्षिप्त

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. 1

    Identify the target file: package.json

  2. 2

    Construct an RFC 6902 patch: [{"op": "replace", "path": "/version", "value": "2.0.0"}]

  3. 3

    Run: node skills/json-modifier/index.js --file package.json --patch '[{"op": "replace", "path": "/version", "value": "2.0.0"}]'

  4. 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-modifier

CLI कमांड चलाएँ, या प्रॉम्प्ट को Claude Code, Cursor, Codex या जो भी कोडिंग एजेंट आप इस्तेमाल करते हैं उसमें पेस्ट करें।

लिंक