要点を先に示し、作業を短い番号付き手順に分けるなど、作業記憶に負担をかけにくい形式で応答を整え、説明も添えるスキルです。
- 手順を短く区切って進めたいとき
- 回答の要点を先に知りたいとき
- 進捗を見失わず作業したいとき
GatewayのHTTPポリシーから呼び出されるCloudflare Workersを実装・デバッグ・レビューし、GatewayMiddlewareやリクエスト処理の継続方法を扱います。
Build, debug, or review Cloudflare Workers invoked by the Forward action in Gateway HTTP policies, including the GatewayMiddleware entrypoint, Gateway types, context, and continuation.
実行スコア 未検証
インストール方法を見るGatewayのHTTPポリシーでForwardアクションから呼び出されるCloudflare Workerの実装、デバッグ、レビューを支援します。現在のForwardガイドとテンプレートを確認し、WorkerEntrypointを継承した名前付きGatewayMiddlewareクラスとhandle(request, context, next)の実装を扱います。Gatewayのリクエスト情報とWorkersの実行コンテキストやバインディングを区別し、next(request)で元の宛先へ処理を続けるか、合成レスポンスを返すかを整理します。型チェックや、Forwardポリシーを通した検証の観点も含みます。
Gatewayの許可済みHTTP通信に加工や合成レスポンスを加えるWorkerを作りたいとき、既存コードがGatewayの呼び出し契約に沿っているか確認したいときに役立ちます。IDやデバイス状態などのコンテキストを使う処理や、実際の通信経路での検証にも向いています。
HTTPS通信には復号が必要で、WebSocketはWorkerを経由せず、条件に一致するWorkers VPC通信は破棄されます。Workerの呼び出し失敗時は通信が遮断されます。next()は最大1回で、元の宛先に対してのみ継続します。ライセンスはApache-2.0です。
この紹介文は、公開されている SKILL.md をもとに AI(OpenAI Codex)が作成しました。正確な仕様は下の原文を確認してください。
インストールする前に、エージェントに与えられる指示の中身を確認できます。
Read the current Forward guide before implementing a Worker. It defines how Gateway invokes Workers on permitted HTTP traffic. Retrieve the relevant page below rather than copying setup, API payloads, or limits into the project from memory.
GatewayMiddleware class extending WorkerEntrypoint from cloudflare:workers. Implement handle(request, context, next) and return a Response. Gateway calls this method through RPC. A default fetch() handler alone does not implement the Forward contract.this.ctx (Workers execution context) and this.env (bindings).next(request) at most once, or return a synthetic response without calling it. next() always targets the original destination. Changes to the destination URL or host are ignored, and it cannot redirect, retry, or fan out. Use fetch() to send a request to a different destination. It creates an independent subrequest that does not inherit the user's Gateway policies or egress configuration.Use the published types and context reference for field names and availability. Treat a falsy identity (!identity) as anonymous and guard optional posture values. Call await context.identity() or await context.devicePosture() only when needed. Both getters can reject. Catch lookup failures separately from missing values and decide how to handle each when the Worker depends on them. Use Gateway-provided identity rather than client-supplied identity headers.
Type-check against the installed Gateway types and test the named RPC entrypoint, including zero or one continuation call and the context values the Worker uses. Then test a permitted request through a scoped Gateway Forward policy. A direct request to a default fetch() handler does not validate the Gateway path. Follow the chosen template's test procedure and the Forward guide's troubleshooting steps.
Check the response and streaming rules: return a final status from 200 to 599, return no body for HEAD requests or statuses 204, 205, and 304, and stream bodies rather than buffering them.
cf-cli or wrangler skill for project setup and deployment.まだレビューはありません。使ってみた感想をお寄せください。
ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。
まだコメントはありません。最初のコメントを書いてみませんか。
要点を先に示し、作業を短い番号付き手順に分けるなど、作業記憶に負担をかけにくい形式で応答を整え、説明も添えるスキルです。
Webサイトを開いて内容を読み、ボタン操作やフォーム入力、データ抽出、スクリーンショット撮影まで進めるブラウザー自動化の手順を案内します。
Cloudflare Agents SDKを使うアプリの開発、デバッグ、レビューを支援し、状態管理やチャット、バックグラウンド処理などの実装を確認するスキルです。
案件の内容に合わせて配色・文字・レイアウトを設計し、定型的に見えないWeb画面を組み立てるためのスキルです。
Azureのストレージ、Key Vault、Cosmos DB、AKSなどのリソースを照会・操作し、ログ分析のクエリにも使えるスキルです。
Cloudflare Basinでイベントを取り込み、R2のIcebergテーブルに保存し、カタログ管理やSQL分析を行うための作業を支援します。旧Data Platform系の名称で相談された場合も対象です。