Discover an AgentCore project
Discovery is the pass every other skill trusts. It answers with evidence — a file and line for every claim — and says "not resolved" when it cannot answer, because a wrong region or a missed owner makes every later step wrong: a gateway generated in Terraform for a resource the AgentCore CLI already owns will fight it on every deploy.
${CLAUDE_SKILL_DIR} is set by the skill runtime to this skill's own
directory. Use it verbatim in every command below; a sibling skill's scripts
are at ${CLAUDE_SKILL_DIR}/../<skill>/scripts/.
Flow
-
Discover.
python3 ${CLAUDE_SKILL_DIR}/scripts/discover.py <project>--jsonfor the structured form;--focus agentcore,app,auth,region,terraform,tracingto narrow it. Point it at the repository root, not at a subdirectory, so module calls and Terragrunt stacks resolve. -
Report the
Foundblocks in this order: AgentCore (doors and resources), application (framework, MCP servers,/mcproutes and the Lambda behind them), auth, region (with the availability row), Terraform (constraint, lock, Terragrunt), tracing. ThenMissing, then findings. -
Options. The report's
Optionssection is ordered and has exactly one recommendation, each with its cost tier. Read them out; do not invent new ones. -
Confirm the next skill with
AskUserQuestion, then invoke it withSkill. Discovery itself never writes. -
Verify nothing: discovery has no side effects to check. If the user corrects a fact (a region, an owner), re-run with the corrected input rather than overriding the report in prose.
What it looks for
| Question | Evidence it reads | Detail |
|---|---|---|
| Is anything on AgentCore, and who owns it? | .tf, CDK sources, agentcore.json, .bedrock_agentcore.yaml, boto3 calls | what-discovery-detects.md |
| Which framework and MCP server? | imports, decorators, registerTool, FastMCP | framework-signatures.md |
| Which region, and what is offered there? | provider blocks, variable defaults, Terragrunt, tfvars | the regions table in lib/agentcore_skills/data/regions.json |
| How do tokens work today? | aws_cognito_*, aws_apigatewayv2_authorizer | what-discovery-detects.md |
The DSC0xx band
| Id | Severity | Trigger |
|---|---|---|
DSC001 | error | nothing to read: no Terraform, code, container or manifest |
DSC002 | warn | no AWS region could be resolved |
DSC003 | warn | a starter-toolkit config (its CLI is no longer supported) |
DSC004 | warn | AgentCore declared by more than one tool (Terraform, CDK, AgentCore CLI) |
DSC005 | warn | a core service is not offered in the resolved region |
Decision rules
- The un-aliased provider decides the region. An aliased
us_east_1provider for CloudFront certificates is listed, never chosen. - A route ending in
/mcpis the MCP endpoint. The Lambda behind it is found through the integration, not by name. - Absence is "not found", never "does not exist". Patterns cannot prove a negative in TypeScript; say what was searched.
Scripts
| Command | Does | Exit codes |
|---|---|---|
scripts/discover.py <project> [--focus ...] [--json] | the inventory and gap report | 0 nothing blocking, 1 errors, 2 bad target |
Completion checklist
-
discover.pyran against the repository root and its output was shown. - The region, its evidence, and the availability row were stated.
- Every AgentCore owner (Terraform, CDK, AgentCore CLI, toolkit) was named, or "none yet".
- The recommended option was offered with its cost tier, and the user chose.