/ 目錄 / 演練場 / aws-skills
● 社群 zxkane ⚡ 即開即用

aws-skills

作者 zxkane · zxkane/aws-skills

AWS 的 Claude agent 技能組 — 以 Shell 為主的工作流程,涵蓋常用服務,提供合理的預設值與最小權限 IAM。

aws-skills 將常用 AWS CLI 工作流程封裝為 agent 技能:EC2 叢集操作、S3 政策檢查、IAM 稽核、CloudFormation/CDK 鷹架建立,以及費用查詢。以 Shell 為主,讓您隨時看到正在執行的指令。與 TerraShark 搭配使用效果更佳,適合基礎設施即程式碼場景。

為什麼要用

核心特性

即時演示

實際使用效果

aws-skill.replay ▶ 就緒
0/0

安裝

選擇你的客戶端

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "aws-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/zxkane/aws-skills",
        "~/.claude/skills/aws-skills"
      ],
      "_inferred": true
    }
  }
}

開啟 Claude Desktop → Settings → Developer → Edit Config。儲存後重啟應用。

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "aws-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/zxkane/aws-skills",
        "~/.claude/skills/aws-skills"
      ],
      "_inferred": true
    }
  }
}

Cursor 使用與 Claude Desktop 相同的 mcpServers 格式。專案級設定優先於全域。

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "aws-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/zxkane/aws-skills",
        "~/.claude/skills/aws-skills"
      ],
      "_inferred": true
    }
  }
}

點擊 Cline 側欄中的 MCP Servers 圖示,然後選 "Edit Configuration"。

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "aws-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/zxkane/aws-skills",
        "~/.claude/skills/aws-skills"
      ],
      "_inferred": true
    }
  }
}

格式與 Claude Desktop 相同。重啟 Windsurf 生效。

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "aws-skill",
      "command": "git",
      "args": [
        "clone",
        "https://github.com/zxkane/aws-skills",
        "~/.claude/skills/aws-skills"
      ]
    }
  ]
}

Continue 使用伺服器物件陣列,而非映射。

~/.config/zed/settings.json
{
  "context_servers": {
    "aws-skill": {
      "command": {
        "path": "git",
        "args": [
          "clone",
          "https://github.com/zxkane/aws-skills",
          "~/.claude/skills/aws-skills"
        ]
      }
    }
  }
}

加入 context_servers。Zed 儲存後熱重載。

claude mcp add aws-skill -- git clone https://github.com/zxkane/aws-skills ~/.claude/skills/aws-skills

一行命令搞定。用 claude mcp list 驗證,claude mcp remove 移除。

使用場景

實戰用法: aws-skills

如何安全地對 EC2 執行叢集範圍操作

👤 執行一次性叢集操作的雲端維運工程師 ⏱ ~20 min intermediate

何時使用: 需要對符合特定標籤的一組執行個體進行修補或重啟,但不想自己從頭撰寫完整腳本時。

前置條件
  • Skill installed — git clone https://github.com/zxkane/aws-skills ~/.claude/skills/aws-skills
  • aws CLI configured — aws configure or SSO profile
步驟
  1. 試跑查詢(Dry-run)
    Use aws-skill. List EC2 instances tagged Env=staging, App=api. Just describe, don't mutate.✓ 已複製
    → 顯示執行個體 ID 與狀態的表格
  2. 規劃操作動作
    Now propose the command to restart all running ones. Show me the exact aws cli call before running it.✓ 已複製
    → 印出指令,尚未執行
  3. 附帶防護機制地執行
    Execute in batches of 3 with 30s between batches. Abort if any fails.✓ 已複製
    → 分批輸出結果,每批顯示成功或失敗狀態

結果: 可控制的叢集操作流程,不會出現意外狀況。

注意事項
  • 設定檔或區域錯誤導致誤操作正式環境 — 任何操作的第一行務必印出已解析的設定檔與區域

稽核 S3 儲存貯體政策是否存在公開暴露風險

👤 尋找 S3 公開存取風險的資安工程師 ⏱ ~30 min intermediate

何時使用: 在合規審查之前,或收到錯誤設定警報之後。

步驟
  1. 列出儲存貯體
    List all S3 buckets in our account with their public access block settings and any bucket policies that allow *.✓ 已複製
    → 包含每個儲存貯體狀態的表格
  2. 分類處理
    Flag buckets that have public access and don't match our known public-bucket allowlist (list: [...]). Propose remediation for each.✓ 已複製
    → 針對每個被標記儲存貯體的修復計畫

結果: 按優先順序排列的 S3 公開暴露修復清單。

注意事項
  • CloudFront 使用的 OAI / OAC 在儲存貯體層級看起來像公開存取 — 在標記前先確認 CloudFront 來源設定

將 IAM 政策縮減至最小權限範圍

👤 需要收緊過於寬鬆政策的工程師 ⏱ ~45 min advanced

何時使用: 某個服務帳號目前使用 AdministratorAccess,需要縮減其權限範圍時。

步驟
  1. 收集使用紀錄
    Pull the Access Analyzer / CloudTrail-derived actions used by this role over last 30 days.✓ 已複製
    → 操作動作表格
  2. 產生最小權限政策
    Write the minimal policy matching those actions. No wildcard Resource unless necessary; comment where wildcards are justified.✓ 已複製
    → 附帶說明的政策 JSON

結果: 附有說明理由的最小權限政策。

注意事項
  • 30 天不足以涵蓋所有存取路徑 — 套用政策前,先對照已知的每月或季度作業進行驗證
搭配使用: claude-code-owasp-skill

快速回答費用相關問題

👤 追蹤花費的工程師與財務負責人 ⏱ ~20 min intermediate

何時使用: 財務部門問「為什麼四月份 S3 費用暴增?」—— 你需要在會議前找到答案。

步驟
  1. 查詢
    Use Cost Explorer to compare S3 spend April vs March by usage type.✓ 已複製
    → 依使用類型顯示的差異表格
  2. 分析說明
    Which usage type grew most, and which bucket is most likely responsible?✓ 已複製
    → 提出具體儲存貯體候選項目的假設

結果: 可進一步追查的具體費用歸因。

組合

與其他 MCP 搭配,撬動十倍槓桿

aws-skill + terrashark-skill

aws-skill 處理一次性操作,TerraShark 負責程式碼化的基礎設施

Investigate with aws-skill, then codify the fix as Terraform with terrashark.✓ 已複製

對 IAM 與 S3 設定進行資安審查

After IAM scoping, run OWASP review on the resulting policy.✓ 已複製

工具

此 MCP 暴露的能力

工具輸入參數何時呼叫成本
EC2 fleet ops - 以標籤為範圍的叢集操作 1+ AWS API calls
S3 policy audit - 資安審查 1+ API calls
IAM scoping role_name 收緊存取權限 Access Analyzer + CloudTrail calls
Cost queries service, range 費用調查 Cost Explorer calls
CFN/CDK scaffolding - 建立新的 Stack Claude tokens

成本與限制

運行它的成本

API 配額
AWS API 限制因服務而異;互動式使用通常不會是問題
每次呼叫 Token 數
規劃階段約 5-15k;執行階段不消耗 Claude tokens
費用
技能本身免費;AWS 使用量依一般方式計費
提示
Cost Explorer API 依請求次數計費,反覆迭代時請快取結果以節省費用。

安全

權限、密鑰、影響範圍

憑證儲存: 使用標準 AWS CLI 憑證(共用設定檔、SSO)。技能會讀取目前使用中的設定檔。
資料出站: 所有 AWS API 呼叫。指令輸出可能包含敏感資料(ARN、標籤)。
切勿授予: AdministratorAccess for interactive use

故障排查

常見錯誤與修復

AccessDenied despite correct profile

角色工作階段可能已過期。請重新驗證(aws sso login 或重新整理 STS)

驗證: aws sts get-caller-identity
Commands hit the wrong region

技能會讀取 AWS_REGION 環境變數;請明確設定,或在每次呼叫時加上 --region 參數

Rate-limiting on large fleet ops

使用技能的批次模式並加入延遲間隔

替代方案

aws-skills 對比其他方案

替代方案何時用它替代權衡
AWS MCP server希望使用原生 MCP 工具呼叫而非 Shell 優先的方式Shell 可見度較低;信任模型不同

更多

資源

📖 閱讀 GitHub 上的官方 README

🐙 查看未解決的 issue

🔍 瀏覽全部 400+ MCP 伺服器和 Skills