Community编程与开发github.com

alexaiarchitect/agentcore-skills

盘点项目中的 Amazon Bedrock AgentCore 资源,在提出建议前生成分析报告。只读操作,输出 DSC0xx 系列发现项。

agentcore-skills 是什么?

该技能用于对项目进行全面的 AgentCore 资源盘点,是其他所有 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 区域及各服务的可用性,以及 Terraform 约束、Terragrunt 和 Lambda 链路追踪。该技能完全只读,所有发现结果均以 DSC0xx 格式报告。适用于回答“我有什么资源”、“这是 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(约束、锁、Terragrunt)、链路追踪。然后是 Missing 块,最后是发现项。

  3. 选项 报告的 Options 部分已排序,且每条都附有成本等级。逐一读出;不要自行发明新的选项。

  4. 确认 使用 AskUserQuestion 确认下一个技能,然后使用 Skill 调用它。发现本身从不执行写入操作。

  5. 不验证 任何内容:发现没有副作用需要检查。如果用户纠正了某个事实(如区域、归属),则使用修正后的输入重新运行,而不是在报告中用文字覆盖。

检测对象

问题读取的证据详情
是否有任何内容在 AgentCore 上,谁拥有它?.tf、CDK 源码、agentcore.json、.bedrock_agentcore.yaml、boto3 调用what-discovery-detects.md
使用哪个框架和 MCP 服务器?import、装饰器、registerTool、FastMCPframework-signatures.md
使用哪个区域,那里提供哪些服务?provider 块、变量默认值、Terragrunt、tfvarslib/agentcore_skills/data/regions.json 中的区域表
令牌目前如何工作?aws_cognito_*、aws_apigatewayv2_authorizerwhat-discovery-detects.md

DSC0xx 系列

ID严重级别触发条件
DSC001错误没有可读取的内容:无 Terraform、代码、容器或清单
DSC002警告无法解析 AWS 区域
DSC003警告存在 Starter Toolkit 配置(其 CLI 已不再支持)
DSC004警告AgentCore 由多个工具声明(Terraform、CDK、AgentCore CLI)
DSC005警告核心服务在解析的区域中不可用

决策规则

  • 未使用别名的 provider 决定区域。 用于 CloudFront 证书的带别名的 us_east_1 provider 会被列出,但不会被选中。
  • 以 /mcp 结尾的路由即为 MCP 端点。 其背后的 Lambda 通过集成找到,而非按名称查找。
  • 缺失表示“未找到”,而非“不存在”。 模式无法在 TypeScript 中证明否定结论;应说明搜索了什么。

脚本

命令功能退出码
scripts/discover.py <project> [--focus ...] [--json]执行清单和差距报告0 无阻塞,1 有错误,2 目标无效

完成检查清单

  • discover.py 已针对仓库根目录运行,并显示了输出。
  • 已说明区域、其证据和可用性行。
  • 已指出每个 AgentCore 的归属(Terraform、CDK、AgentCore CLI、工具包),或“尚无”。
  • 已提供带成本等级的推荐选项,且用户已做出选择。

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...

相关技能