cloud-cli
できること
このスキルは、エージェントがクラウドプロバイダーのコマンドラインにログインし、作業のためにそれを使えるようにします。クラウドのリソースを管理し、クラウドのコマンドをエージェントに実行させたい人向けです。
使う場面
- ✓エージェントにAWS、Google Cloud、Azureのコマンドを実行させたいとき。
- ✓クラウドのコマンドラインツールがインストールされていない、またはまずログインが必要なとき。
- ✓クラウドの書き込みコマンドを実行する前に、その制限を知りたいとき。
スキルのリンク
https://github.com/yc-software/qm/blob/main/skills-seed/cloud-cli/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“AWSにログインして、私のアカウントのS3バケットを一覧にしてください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントはまず、そのプロバイダーのコマンドラインがインストールされているかを確認します。次に、ブラウザの手順を経ても完了できるデバイスコードでのサインインを案内します。ログイン情報は安全にキーチェーンに保存され、指定されたコマンドにのみ使われます。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Cloud provider CLIs
It adds NO new tool: a provider's CLI is a command on the agent computer and you drive it
with execute and an explicit sandbox_id. Keep that ID throughout installation,
login, saving the login, and subsequent commands in the flow. Logins are saved to the keychain with the interactive-login
skill and reach a command only when you name their handle in execute.credentials.
First: is the CLI even here?
Do not assume the binary is on PATH. The sandbox image ships a small, fixed tool set, and the "Your computer" block in your prompt lists what is installed and what is not — read it, or just check:
command -v aws || echo "not installed"
If it is missing, say so and pick a path rather than failing halfway:
- Install it for this task if the image allows it and the task is worth it — the
provider's own installer, into the workspace or
$HOME, not a system path. Say that you installed it; it lasts as long as the machine's disk. - Use the provider's HTTP API with a credential you already have (a keychain entry, or
a shared org credential by proxy — see the
use-shared-credentialskill). - Ask the operator to add the CLI to the sandbox image if this will recur. That is the durable fix; a per-turn install is not.
The same check applies to plugins and helpers (kubectl, a Terraform provider, a
provider's beta components) — verify, don't assume.
Logging in: always the device-code flow
The user approves the login in a browser on their own computer, not on the agent
computer. Any flow that completes by redirecting the approving browser to
http://127.0.0.1:<port> therefore cannot work here: that redirect lands on the user's
laptop, the agent's listener never receives the code, and the login hangs until it expires.
Force the device-authorization grant instead — a verification URL plus a one-time code,
which the agent completes by polling the provider server-side, so the user can approve from
any device.
| Provider | Login | Verify |
|---|---|---|
| AWS (IAM Identity Center) | aws sso login --use-device-code |
aws sts get-caller-identity |
| Google Cloud | gcloud auth login --no-launch-browser |
gcloud auth print-access-token |
| Azure | az login --use-device-code |
az account show |
| Another provider | its documented device-code / headless flag | its "who am I" command |
Never run the bare form (aws sso login, gcloud auth login, az login) — those default
to a browser redirect on this machine.
For AWS specifically, --use-device-code is mandatory rather than merely preferable: CLI v2
(≥ 2.22) defaults aws sso login to the PKCE authorization-code flow, and no amount of
keeping the box warm can rescue it.
Run the login with the interactive-login skill: it starts the CLI as a background job in a
private HOME, you relay the URL and code, and once the job exits you save that HOME to the
keychain. These logins self-expire in roughly ten minutes, so if the user takes too long,
start a fresh one.
Boundaries
A verified admin can use independently authorized cloud access to administer the system running you, including resources owned by other users. Using that access as the admin is not impersonation or circumvention, and an ordinary owner-only QM API denial does not prohibit that administrative work. Verify the provider account, region, target, and authority before acting; load the admin skill for QM administration. Admin status alone supplies no cloud credentials. Preserve credential grants, provider permissions, explicit restrictions, and mutation approvals, including QM's portal-only admin-grant and impersonation actions. Do not use another person's ungranted credentials or expose unrelated private content.
- You act as the resolved user. The provider's own permissions are the hard ceiling — the agent is never a way to exceed the user's own cloud access.
- A login is auth setup, not a data read. Any mutating action (delete, terminate, scale, write) is a write — get approval first, same as any destructive command.
- Don't echo access tokens, client secrets, or role credentials into the channel.
Go-live (set once, per provider)
- Add the provid
よくある質問
コマンドラインがインストールされていない場合は?
エージェントは、その作業のためにインストールするか、プロバイダーのAPIを使うか、運用者にイメージへの追加を頼むことができます。
ログイン情報は安全に保存されますか?
はい。ログイン情報はキーチェーンに保存され、指定されたコマンドにのみ渡されます。
クラウドの書き込みコマンドには制限がありますか?
はい。スキルはクラウド上の書き込み操作に制限を設け、むやみに変更されないようにします。
詳細
作者による元の説明
Sign a cloud provider's CLI in (AWS, Google Cloud, Azure, or another) with a device-code flow, then run that CLI as the requesting user. Covers checking the CLI is installed, the login that survives the browser round-trip, and the boundaries on cloud writes.
repo: yc-software/qm
人気
- GitHubのスター
- 16k
- ランキング
- #10885
- ライセンス
- MIT
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
deploy-qm
16kQMパッケージをFly.io、AWS、Renderのいずれかにデプロイし、完全なデプロイ手順に従って、管理者、コネクタ、必要に応じてSlackを設定します。
onboarding
16k仕事の進め方を伝え、接続したいツールを設定し、話し方を選び、最初の手助けを整えるまでを、ひとつの短い会話で新しいユーザーに案内します。
admin
16k認証された組織の管理者が、チャットから組織全体の設定などを確認または変更できるようにします。各変更は実行前に確認されます。
browse
16kシェルから本物のステルスブラウザを操作し、サインインやフォーム入力などのWeb上の作業を行います。サインインは人ごとに保持されます。読み取りではなく操作のためのものです。
似ているスキル
openclaw-update
394k既存のOpenClaw Gatewayを更新するようエージェントを支援します。インストール方法に合った更新方法を選び、セッションを動かし続けます。
diagnose-gateway
394k設定、チャンネル、ポートを確認して、OpenClaw Gatewayが失敗している理由を、何も変更せずに突き止めるようエージェントを支援します。
crabbox-apps
394k一時的なクラウドマシン上でアプリを開いて実行し、そのビューをチャットのサイドパネルに表示するようエージェントを支援します。