nexus-gateway: Skill for Claude Code

.claude/skills/build-ami/SKILL.md

build-ami is a skill for Claude Code from AlphaBitCore/nexus-gateway. It costs 143 tokens per session (2,053 once invoked), scanned A, original, Apache-2.0.

A build process for creating and registering an AWS AMI, which is a reusable machine image, for the Nexus Gateway single-server appliance. It combines the Go services, web interface, database files, and security setup into an image that can run on Amazon EC2.

In plain words
What is it for?
Use it to compile the gateway, build its web interface, create the appliance image with Packer, and register that image in AWS.
Why use it?
It handles the many build steps involved in packaging and publishing the appliance, while warning about AWS compute limits and memory-heavy compilation.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is AlphaBitCore/nexus-gateway's own configuration. It tells Claude Code how to work on nexus-gateway itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything nexus-gateway configures →

Reuse

Borrowing it

Nothing to install: this file belongs to AlphaBitCore/nexus-gateway. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/AlphaBitCore/nexus-gateway/main/.claude/skills/build-ami/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/AlphaBitCore/nexus-gateway

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for build-ami

README.md
[![agentmods](https://agentmods.dev/badge/skills/alphabitcore/nexus-gateway/build-ami.svg)](https://agentmods.dev/skills/alphabitcore/nexus-gateway/build-ami)
Your own site
<a href="https://agentmods.dev/skills/alphabitcore/nexus-gateway/build-ami"><img src="https://agentmods.dev/badge/skills/alphabitcore/nexus-gateway/build-ami.svg" alt="Measured on agentmods" height="20"></a>
Per session 143 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,053 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 2 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Privilege Escalation · line 114
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • medium Rogue Agent · line 62
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00143 $0.02053
Opus 5 $0.00072 $0.01026
Sonnet 5 $0.00029 $0.00411
Haiku 4.5 $0.00014 $0.00205

Measured 8d ago against content hash f1ed940e396b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

build-ami scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/build-ami/SKILL.md · 116 lines

How it starts

The opening of the file, as written. The whole thing — 116 lines — stays where its author put it; the contents beside it link to each section on GitHub.

build-ami

Build and register the Nexus Gateway single-instance appliance AMI from nexus-ami/.

nexus-ami/build.sh cross-compiles the 4 Go services (linux/amd64), builds the Vite UI, bundles Prisma, tarballs artifacts/, then runs packer init && packer build nexus.pkr.hcl. Packer launches one AL2023 x86_64 EC2 instance, uploads the tarball, runs install.sh + harden.sh, snapshots, and registers the AMI. Full build ≈ 1 hour (the valkey-search C++ compile dominates).

⚠️ The two non-obvious traps (read first)

  1. vCPU quota. The committed default instance type is m5.4xlarge = 16 vCPU. The EC2 Running On-Demand Standard instances quota (L-1216C47A) defaults to 16 on fresh accounts, and m5/c5/t3/r5 all share that bucket. Any already-running instance leaves <16 free, so a default ./build.sh dies in ~11s at "Launching a source AWS instance" with VcpuLimitExceeded: ... current vCPU limit of 16. Fix: build on r5.2xlarge (8 vCPU / 64 GB) via -var instance_type=r5.2xlarge.
  2. valkey-search is RAM-bound, not CPU-bound. install-valkey.sh compiles valkey-search from source (gRPC/Protobuf/Abseil/ICU submodules), capped at --jobs=4. It needs ~48–64 GB RAM — 32 GB hosts (t3.2xlarge / r5.xlarge / m5.2xlarge) get silently OOM-killed mid-compile (sshd dies before any error is logged → confusing SSH failure after ~10 min). So when dropping vCPU to fit the quota, drop to a memory-heavy r5, never a smaller m5. r5.2xlarge (8 vCPU / 64 GB) is the sweet spot: fits a 16-vCPU quota and keeps the RAM headroom. Never compile valkey-search on <48 GB.

There is no AL2023 prebuilt for valkey-search (1.2.0 is source-only; the official valkey/valkey-bundle image is Debian/glibc-incompatible with the AL2023 appliance), so the source compile is mandatory. postgres/nats/node already install prebuilt — prefer install over compile wherever a suitable build exists.

Read the full file on GitHub · 116 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 116 lines · 143 tokens per session scan A f1ed940e396b

Subscribe to this mod's changes

build-ami is a skill published in the GitHub repository AlphaBitCore/nexus-gateway (23 stars, last pushed 6d ago), licensed Apache-2.0. It adds 143 tokens to every session and 2,053 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.