今日已更新 339 条资讯 | 累计 19899 条内容
关于我们

Three Commands to Make Claude Code Stop Guessing Your Infra

Siddharth Pandey 2026年06月06日 02:30 4 次阅读 来源:Dev.to

You asked Claude Code to add a query for orders by customer status. It generated a .scan() with a FilterExpression . Your Orders table has 50M rows and three functions already hammering the same partition key. Claude Code had no idea — it read your TypeScript files, not your AWS account. That's the problem. AI coding assistants are literate in your source code. They are blind to your infrastructure. GitHub · npm What Claude Code Actually Sees (and What It Doesn't) When Claude Code reads your codebase, it builds a model of your application: function names, variable patterns, the string "Orders" passed to DynamoDB.DocumentClient . It can follow call chains, infer intent, and generate syntactically correct code. What it cannot do is describe your actual infrastructure: It doesn't know which GSIs exist on your DynamoDB tables It doesn't know how your tables are partitioned or what sort keys you use It doesn't know that listAllOrders() already does a full scan and costs $40/day It doesn't know that 5 functions already write to the same partition key on Sessions So when you ask it to add a new query, it generates something that looks correct. It might use .query() instead of .scan() . But it'll query on an attribute with no index — because it has no way to know which attributes are indexed. It'll write a FilterExpression that reads every item before filtering — which is exactly a scan, just spelled differently. The code compiles. Tests pass. The problem ships. The Three Commands That Close the Gap infrawise gives Claude Code deterministic knowledge of your infrastructure through the Model Context Protocol. Three commands get you there. 1. infrawise init cd your-project infrawise init Runs once per project. Detects your AWS profile and region, asks which databases you use, and writes a single file: infrawise.yaml . That's the only file it creates in your repository — one config, no framework, no SDK changes. 2. infrawise doctor infrawise doctor Before you trust any analysi

本文内容来源于互联网,版权归原作者所有
查看原文