agentsclimarketplace

Agents tools quoted json

Skill bokuwalily/claude-code-skills/skills/agents-tools-quoted-json

75 battle-tested Claude Code skills from shipping 20+ apps solo — macOS, Next.js, Vercel, iOS/Expo, Cloudflare, Phaser, local AI media & more

Install
npx -y skills add bokuwalily/claude-code-skills --skill agents-tools-quoted-json

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

~/.claude/agents/ の各 agent frontmatter `tools:` フィールドが bare-bracket (`[Read, Edit]`) や `allowed-tools:` 旧式で不統一なとき、quoted JSON 配列形式に一括正規化したいとき。

SKILL.md

2.3 KB, as published. Nobody here has run it

Procedure

  1. 現状調査: grep -E '^(tools|allowed-tools):' ~/.claude/agents/*.md で形式不統一の agent を列挙。bare-bracket / quoted / 旧 allowed-tools: の 3 種に分類。
  2. 正規形を決定: tools: ["Read", "Edit", "Bash"] を採用 (YAML 内 JSON、quote 必須)。
  3. 権限最小化を併走: reviewer 系 (code-reviewer, security-reviewer, database-reviewer 等) は原則 read-only (["Read", "Grep", "Glob"])。Write/Edit/Bash 不要な箇所は剥がす。
  4. 一括変換 script: python で frontmatter YAML を ruamel.yaml で読み、tools を list 化 + 全要素 str() 化して書き戻す。allowed-tools: キーは tools: にリネーム。
  5. diff レビュー: 変換後 git diff で 1 ファイルずつ妥当性チェック (特に reviewer 系の権限剥がし)。

Pitfalls

  • YAML 内 JSON は single-line で書く。複数行配列は YAML として解釈されて quote が外れる場合あり。
  • Agent ツールは「agent から agent を呼ぶ」権限。reviewer 系には不要 (循環呼出しのリスク)。
  • 既存 agent が allowed-tools: (古い key) で動作している場合、リネーム後に Claude Code 再起動するまで反映されない。
  • bash の sed で YAML 編集すると quote escape を間違えやすい → 必ず YAML parser 経由で書き換え。
  • frontmatter の delimiter (---) を python 側で誤って消すと agent 自体が壊れる。書き戻し前に head -1 で確認。

Verification

  • 全 agent で grep '^tools:' *.md | grep -c '\["' が agent 総数と一致。
  • ~/.claude/scripts/agents-index.sh で 61 agents (or 実数) の frontmatter validate が全 PASS。
  • 変換後 1 agent を実際に呼んで挙動が変わらないこと (権限剥がしで本来必要なツールを落としていないか)。
  • grep -L '^tools:' ~/.claude/agents/*.mdtools: 欠落 agent が 0。

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.