npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

aws-infra-drawio

v0.1.3

Published

Claude Code plugin: Terraform -> structure.yaml -> .drawio (AWS architecture diagrams), wrapping the official draw.io MCP server.

Readme

aws-infra-drawio

日本語版はこちら

A Claude Code plugin that turns Terraform into AWS architecture diagrams (.drawio). It wraps the official draw.io MCP server (@drawio/mcp) and keeps your diagram data on your machine.

What it does

Diagram information is split into three layers, each owned by someone different.

| Layer | File | Owner | |---|---|---| | Structure | structure.yaml | Humans review it. The AI extracts it from IaC and proposes changes | | Conventions | conventions.md / layout.yaml | Humans decide. The AI appends decisions as they accumulate | | Appearance and coordinates | *.drawio | Generated by scripts |

The AI never draws coordinates, so the same structure.yaml always produces the same .drawio. Diffs in the diagram match diffs in the infrastructure, which makes them reviewable in a PR.

This split follows the design in a ZOZO article (Japanese). That article renders with D2; this one renders with draw.io, using the official AWS icons.

Setup

If you only need it occasionally, run it with npx instead of installing it.

npx aws-infra-drawio claude   # starts Claude Code with this plugin loaded

The MCP server is registered as drawio and the /aws-infra-drawio:aws-diagram skill becomes available. Close the session and nothing is left behind but the npx cache.

The individual commands are available through npx too.

npx aws-infra-drawio validate <dir>/structure.yaml
npx aws-infra-drawio render   <dir>/structure.yaml --route
npx aws-infra-drawio check    <dir>/structure.yaml
npx aws-infra-drawio export   <dir>/<view>.drawio png 1.5
npx aws-infra-drawio help

For regular use

To keep the plugin installed, add this repository as a marketplace.

/plugin marketplace add tanabe1478/aws-infra-drawio-integration-plugin
/plugin install aws-infra-drawio@aws-infra-drawio

The catalog (.claude-plugin/marketplace.json) lives in this repository, but the plugin itself is installed from npm. Using the repository directly as the plugin source would leave the dependencies (@drawio/mcp, yaml) uninstalled, requiring a separate setup.sh run.

For development

git clone https://github.com/tanabe1478/aws-infra-drawio-integration-plugin.git
cd aws-infra-drawio-integration-plugin
bash scripts/setup.sh          # install dependencies and place the shape index
claude --plugin-dir .

On staying local

The only network access is fetching the package itself (npx / npm install). The shape index ships inside the package, so nothing else is downloaded unless you clone the repository and run setup.sh. After that:

| Feature | Network | |---|---| | Generating .drawio | None | | PNG / SVG export | None (runs drawio-desktop or a Docker image locally) | | search_shapes (icon search) | None (setup.sh places the index locally) | | open_drawio_xml (open in an editor) | Whatever DRAWIO_BASE_URL points at. Defaults to http://localhost:8080/ | | --route (path optimization) | A conditional GET to a CDN on first use, falling back to the bundled copy |

To run the editor locally:

bash scripts/setup.sh --serve   # start jgraph/drawio on localhost:8080
bash scripts/setup.sh --status  # check the current state

Diagram data travels in the URL #fragment, so it is never sent to the server even when DRAWIO_BASE_URL points somewhere external. Self-host if you want to rule out external access entirely.

Usage

Ask Claude Code for a diagram.

/aws-infra-drawio:aws-diagram Draw the API architecture from the Terraform under infra/

The skill reads the IaC, proposes a structure.yaml, and generates the .drawio and PNG once you have reviewed it.

To drive it by hand:

node scripts/validate-structure.mjs <dir>/structure.yaml   # validate the structure
node scripts/render-drawio.mjs      <dir>/structure.yaml --route
node scripts/check-geometry.mjs     <dir>/structure.yaml   # check for overflow and overlap
bash scripts/export-drawio.sh       <dir>/<view>.drawio png 1.5

Example

examples/serverless-api/ holds Terraform, the structure.yaml derived from it, and the generated output.

Example

How it works

| File | Role | |---|---| | skills/aws-diagram/ | The Claude Code skill: workflow and conventions | | scripts/lib/layout.mjs | Coordinate assignment. Columns = flow, rows = containment | | scripts/lib/containers.mjs | Definitions for AWS Cloud / Region / VPC / subnet frames | | scripts/shape-map.json | CloudFormation type to AWS icon style, generated from the draw.io shape index | | scripts/lib/route.mjs | Bakes in obstacle-avoiding routes using the libavoid bundled with @drawio/mcp | | vendor/search-index.json | The draw.io shape index (roughly 10,000 entries) |

Icon names (mxgraph.aws4.*) are never written by hand; npm run gen:shape-map resolves them from the official index. For resource types that aren't mapped yet, look them up with the MCP search_shapes tool and paste the result into style: in structure.yaml.

Checks

bash scripts/selftest.sh

Verifies the shape map, the example structures, geometric soundness, and rendering determinism.

Limitations

  • Layout follows simple rules: columns for flow, rows for containment. Star-shaped topologies (many resources hanging off one Lambda) stretch vertically. Pin columns with column to adjust
  • Edge labels sit near the start of the line. On long detours they can still land in hard-to-read positions
  • The expected input is Terraform. CDK and CloudFormation work once you add their mappings to structure-spec.md