Community程式設計與開發github.com

alexaiarchitect/agentcore-skills

清查專案中 Amazon Bedrock AgentCore 相關資源,並在提供建議前產出報告。找出現有 AgentCore 資源及其所屬工具,為後續操作奠定基礎。

agentcore-skills 是什麼?

此技能為 AI 代理技能,專門用於盤點 Amazon Bedrock AgentCore 專案。它會掃描專案根目錄,找出所有與 AgentCore 相關的資源,包括 Terraform (`aws_bedrockagentcore_*` / `awscc_*`)、CDK 建構、AgentCore CLI 的 `agentcore.json`、已棄用的 Starter Toolkit (`.bedrock_agentcore.yaml`)、boto3 `bedrock-agentcore` 客戶端、AgentCore Python SDK 及 `@requires_access_token` 裝飾器等。同時,它也能辨識代理框架(Strands、LangGraph、LangChain、Claude Agent SDK、CrewAI、OpenAI Agents、ADK 或原始框架)、MCP 伺服器及其背後的 API Gateway 路由與 Lambda 函數、Cognito 使用者集區與 JWT 授權器、AWS 區域及該區域的服務可用性、HashiCorp AWS Provider 版本限制與 lock 檔案、Terragrunt 設定,以及 Lambda 追蹤功能。此技能為唯讀操作,其發現結果以 `DSC0xx` 編碼呈現。當用戶詢問「我有什麼」、「這個專案在 AgentCore 上嗎」、「盤點這個儲存庫」、「我們在哪個區域」、「eu-central-1 有 AgentCore 嗎」、「這個代理使用什麼框架」時,或在接觸不熟悉的專案前使用其他 AgentCore 技能之前,都應優先呼叫此技能。

相容平台✓Claude Code✓Codex CLI~Cursor
npx skills add https://github.com/alexaiarchitect/agentcore-skills/tree/HEAD/skills/agentcore-discover

Installed? Explore more 程式設計與開發 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

探索 AgentCore 專案

探索是所有其他技能信任的基礎步驟。它會提供證據——每個聲明都附帶檔案與行號——若無法回答則標示「未解析」。因為錯誤的區域或遺漏的資源擁有者會導致後續每一步都出錯:例如 Terraform 產生的閘道若與 AgentCore CLI 已擁有的資源衝突,每次部署都會發生衝突。

${CLAUDE_SKILL_DIR} 由技能執行時期設為此技能本身的目錄。請在下列每個命令中直接使用此變數;同層級其他技能的腳本可透過 ${CLAUDE_SKILL_DIR}/../<skill>/scripts/ 路徑存取。

流程

  1. 探索。

    python3 ${CLAUDE_SKILL_DIR}/scripts/discover.py <project>
    

    加入 --json 可取得結構化輸出;--focus agentcore,app,auth,region,terraform,tracing 可縮小範圍。請指向儲存庫根目錄,而非子目錄,以便正確解析模組呼叫與 Terragrunt 堆疊。

  2. 報告 依照下列順序呈現 Found 區塊:AgentCore(入口與資源)、應用程式(框架、MCP 伺服器、/mcp 路由及其背後的 Lambda)、身分驗證、區域(含可用性列)、Terraform(版本限制、lock 檔、Terragrunt)、追蹤。接著呈現 Missing,最後是發現項目。

  3. 選項。 報告中的 Options 區塊已排序,且每個選項僅有一項建議,並附帶成本等級。請逐一讀出,不要自行新增。

  4. 確認 使用 AskUserQuestion 詢問使用者下一個技能,然後透過 Skill 呼叫該技能。探索本身不會寫入任何東西。

  5. 無需驗證: 探索沒有副作用需要檢查。若使用者修正某個事實(例如區域、擁有者),請重新以修正後的輸入執行,而非在報告中以文字覆蓋。

搜尋的項目

問題讀取的證據細節
專案是否使用 AgentCore?誰擁有這些資源?.tf、CDK 原始碼、agentcore,json、.bedrock_agentcore,yaml、boto3 呼叫what-discovery-detects,md
使用了哪個框架與 MCP 伺服器?import、decorator、registerTool、FastMCPframework-signatures,md
使用哪個區域?該區域提供哪些服務?provider 區塊、變數預設值、Terragrunt、tfvarslib/agentcore_skills/data/regions,json 中的區域表格
Token 目前如何運作?aws_cognito_*、aws_apigatewayv2_authorizerwhat-discovery-detects,md

DSC0xx 編碼區

編號嚴重程度觸發條件
DSC001錯誤無任何可讀取的內容:沒有 Terraform、程式碼、容器或清單
DSC002警告無法解析 AWS 區域
DSC003警告使用了 Starter Toolkit 設定(其 CLI 已不再支援)
DSC004警告AgentCore 被多個工具(Terraform、CDK、AgentCore CLI)同時宣告
DSC005警告核心服務在解析的區域中不可用

決策規則

  • 未別名的 Provider 決定區域。 別名為 us_east_1 的 CloudFront 憑證 Provider 僅會被列出,不會被選為主要區域。
  • 以 /mcp 結尾的路由是 MCP 端點。 其背後的 Lambda 是透過整合方式找到的,而非依賴名稱。
  • 未找到不等於不存在。 因為在 TypeScript 中,搜尋模式無法證明某事物不存在;請說明已搜尋的範圍。

腳本

命令功能退出碼
scripts/discover,py <project> [--focus ...] [--json]執行資源盤點並產出缺口報告0 無阻塞、1 發生錯誤、2 目標無效

完成檢查清單

  • 已對儲存庫根目錄執行 discover,py 並顯示其輸出。
  • 已說明區域、其證據以及可用性列。
  • 已列出每個 AgentCore 資源的擁有者(Terraform、CDK、AgentCore CLI、Toolkit),或標示「尚無」。
  • 已提供建議選項及其成本等級,且使用者已做出選擇。

Individual skills in this repo

This repo contains 4 individual skills — each has its own dedicated page.

alexaiarchitect/agentcore-skills

>- Put Amazon Bedrock AgentCore infrastructure behind a plan-only CI gate. Generates a GitHub Actions workflow that, on pull requests touching the infrastructure, runs the static AgentCore review (`ACR0xx`), `terraform fmt -check`, `init`, `validate`, a saved `plan` (Terraform or Terragrunt) with a read-only OIDC role, `show -json`, and the plan policy (`CI0xx`: no delete or replace of memories, gateways, credential providers, workload identities, user pools or tables without an explicit per-address allowance; no `*` on `*`; no gateway with `authorizer_type = NONE`; pinned MCP revisions), then uploads the plan JSON. Nothing in it applies. The plugin's stdlib-only library is vendored into `ci/agentcore/` so the job needs nothing from the plugin, and action pins are reused from the repository's own SHA-pinned workflows. `policy_check.py` also runs locally on any saved plan. Use when asked to "add CI for the AgentCore Terraform", "gate the plan", "block destructive changes", "policy check the plan", "plan on ...

alexaiarchitect/agentcore-skills

>- Estimate what Amazon Bedrock AgentCore will cost per month from a usage profile, line by line with the formula for each line, and put a budget and a usage alarm around it. Prices the published AgentCore rate card (Gateway invocations, search and tool indexing; Identity token requests, free through Runtime or Gateway; Runtime vCPU-hours billed only while active and GB-hours; Memory short-term events — per 1,000 events until 2026-10-05, per GB from 2026-10-06 — and long-term records and retrievals; Evaluations tokens), prices model tokens only at the user's own per-1,000 rates, and lists what it does not price (Lambda, API Gateway, CloudWatch, X-Ray, DynamoDB) so the total is never mistaken for the bill. Generates an AWS Budget filtered to AgentCore with forecast and actual alerts, plus a CloudWatch alarm on gateway invocations, as Terraform after a dry run. Findings are the `CST0xx` band. Use when asked "what will AgentCore cost", "estimate the gateway bill", "is there a free tier", "memory pricing chang...

alexaiarchitect/agentcore-skills

>- Scaffold Amazon Bedrock AgentCore resources as infrastructure as code: a Runtime (ECR repository, service role, `aws_bedrockagentcore_agent_runtime` with a JWT authorizer and lifecycle settings), a Gateway (role, JWT authorizer, pinned MCP revisions, one target), Identity (Cognito M2M client plus an OAuth2 credential provider with write-only secrets) or Memory (memory, strategies, customer-managed key). Terraform modules are the default and the recommendation; a TypeScript CDK stack with the `aws-bedrockagentcore` L1 constructs and the AgentCore CLI (`@aws/agentcore`) commands are offered for teams already on them. Every write is shown as a plan first (`--dry-run`), existing files are never overwritten without `--force`, and nothing is planned or applied. Use when asked to "create an AgentCore runtime", "scaffold a gateway", "add AgentCore memory", "write the Terraform for AgentCore", "start a new AgentCore stack", or "give me the CDK for this". Don't use for a gateway in front of an existing Lambda, HT...

alexaiarchitect/agentcore-skills

>- Plan the deployment of Amazon Bedrock AgentCore infrastructure and its rollback, and hand the user the exact commands — never running them. Finds the root module (or Terragrunt stack) that actually reaches the AgentCore resources, orders what comes up (identity and roles, then gateway, runtime and memory, then targets and strategies, then log delivery), flags where a first apply trips (IAM propagation, creation-only semantic search, Transaction Search before TRACES delivery, an old provider lock, no remote backend), checks published quotas (targets per gateway, tools per target), and emits init / validate / plan-to-file / show -json / policy check / apply of that saved plan, the post-apply checks, and the rollback for each kind of change. Findings are the `DPL0xx` band; the cost tier is `aws` because the commands create billable resources. Use when asked to "deploy the gateway", "apply this", "what order do I apply in", "how do I roll back", "will this hit a quota", "give me the terraform commands". Don...

相關技能