Skip to content

docs(agents): prefer the web-fetch tool over curl for reading the web - #243

Merged
furedea merged 1 commit into
mainfrom
docs/prefer-web-fetch
Oct 19, 2026
Merged

furedea merged 1 commit into
mainfrom
docs/prefer-web-fetch

Conversation

@furedea-agent

@furedea-agent furedea-agent Bot commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

要約

  • グローバルの AGENTS.md に,Web を読むときは curl / wget ではなくエージェントの web-fetch ツールを使い,正確な値やファイルは gh api か nix store prefetch-file で取る,という 1 行を足す.
  • fix(agents): stop asking for commands the hooks can prove safe #242 で外向きの curl / wget は確認のままにすると決めた.道具の選び方で確認そのものを減らす.
  • 決めること: なし (文面と置き場所は会話で合意済み).
用途 使う道具 確認
Web のページやドキュメントを読む web-fetch ツール (Claude は WebFetch) ドメインの権限どおり
GitHub の情報 gh api 出ない
正確な値・ファイル (版番号,チェックサム,tarball) nix store prefetch-file / gh api 出ない
外向きの curl / wget 使わない 確認

検証

  • uv run --frozen pytest -q tests/agents/test_workflow_skill_layout.py
  • lefthook (pre-commit,commit-msg)
背景
  • Claude Code の公式ドキュメントは,curl の URL を権限ルールで絞るのは脆いとして,WebFetch とドメイン単位の権限を勧めている.
  • web-fetch ツールはページを要約して返すため,1 文字も違えられない値には使わず gh api や nix store prefetch-file を使う.
  • Claude と Codex の両方が読むため,ツール名ではなく「web-fetch tool」と書いた.

Refs #236

🤖 Generated with Claude Code

Remote curl and wget stay behind a confirmation because their URL and
option handling is too broad to judge safely (#242). Pointing agents to
the web-fetch tool for pages, and to gh api or nix store prefetch-file
for exact values and files, keeps those confirmations rare.

Refs #236

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@furedea
furedea merged commit 833431b into main Oct 19, 2026
11 checks passed
@furedea
furedea deleted the docs/prefer-web-fetch branch October 19, 2026 06:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant