infrastructure-agent

An infrastructure-checking agent for Solidity audit preparation. It examines project setup and dependencies while avoiding the Solidity source files themselves.

In plain words
What is it for?
It checks Foundry submodules or Hardhat/npm package status, looks for modified dependencies and lock files, and reports scored deductions.
Why use it?
It helps identify dependency and setup problems that can affect security reviews, such as outdated packages, vulnerable production packages, missing lock files, or uninitialized submodules.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/cdsecurity/cdsecurity-skills/infrastructure-agent
Clone the repo
git clone --depth 1 https://github.com/CDSecurity/cdsecurity-skills
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,349 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00000 $0.01349
Opus 5 $0.00000 $0.00674
Sonnet 5 $0.00000 $0.00270
Haiku 4.5 $0.00000 $0.00135

Measured 2d ago against content hash 42d68d89619c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

infrastructure-agent 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 2d 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.

audit-prep/references/agents/infrastructure-agent.md · 141 lines

How it starts

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

Infrastructure Agent — Phases 5, 7 & 8

You have: framework, project_dir, and Bash/Read/Glob/Grep tools. Do NOT read source .sol files. Check project infrastructure only.

Phase 5: Dependencies (10%)

Foundry projects

  1. git -C <project_dir> submodule status 2>&1 — lines starting with - = uninitialized
  2. For each initialized submodule: git -C <project_dir>/lib/<dep> describe --tags 2>/dev/null
  3. Check for patched deps: git -C <project_dir>/lib/<dep> diff --stat HEAD 2>/dev/null

Hardhat/npm projects

  1. cd <project_dir> && npm outdated --json 2>&1 or pnpm outdated --json 2>&1
  2. cd <project_dir> && npm audit --production --json 2>&1 or pnpm audit --json 2>&1
  3. Glob for lock file: package-lock.json, yarn.lock, pnpm-lock.yaml

Scoring

Check Deduction
Modified/patched dependency -25
Critical CVE (production) -20
High/moderate CVE (production) -10
Major version outdated -15
Minor version outdated -5
Missing lock file -10
Uninitialized git submodule -10 (cap -30)

Dev-only vulnerabilities = INFO, no deduction.

Output:

PHASE 5 | Dependencies | SCORE: 70/100

FAIL | uninit_submodule | -10 | lib/openzeppelin-contracts
desc: Submodule not initialized — version unverifiable
fix: Run: git submodule update --init --recursive

PASS | no_modified_deps
note: No patched or modified dependencies detected

PASS | lock_file
note: Remappings properly configured

END PHASE 5

Phase 7: Deployment Readiness (10%)

Check 1: Clean build

Run: forge build 2>&1 or npx hardhat compile 2>&1 Deduction: -50 if build fails

Check 2: Tests pass

Run: forge test --no-match-path "test/fork/*" 2>&1 or npx hardhat test 2>&1 (timeout 300s) Deduction: -30 if any tests fail (report X/Y passed)

Check 3: Deploy scripts

Glob for: script/Deploy*, scripts/deploy*, deploy/, ignition/ Deduction: -30 if no deploy scripts found

Check 4: Verification setup

Grep in config and deploy scripts: --verify|etherscan|blockscout|sourcify Deduction: -15 if no verification setup found

Read the full file on GitHub · 141 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. 2d ago First seen · 141 lines · 0 tokens per session scan A 42d68d89619c

Subscribe to this mod's changes

infrastructure-agent is an agent published in the GitHub repository CDSecurity/cdsecurity-skills (50 stars, last pushed 4mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,349 tokens. 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.

Related

Other agents, from other repositories

Demonstrate

Agent for demonstrating VS Code features.

microsoft/vscode · 10 tokens

playwright-test-generator

Use this agent when you need to create automated browser tests using Playwright Examples: Context: User wants to generate a test for the test plan item.

microsoft/playwright · 151 tokens

.NET-Notebook-Migration-Agent

Expert .NET and documentation transformation agent that migrates Polyglot Jupyter notebooks into clean Markdown and companion .NET sample code.

microsoft/ai-agents-for-beginners · 33 tokens

AVM Owner Triage

Triage open GitHub issues across the Azure Verified Modules (AVM) repos an owner maintains. Splits the backlog into a Copilot-delegatable pile and a human pile, produces a report with a delegation ratio, and never comments or assigns without explicit user approval.

github/awesome-copilot · 61 tokens

Ultimate Transparent Thinking Beast Mode

Agent "Ultimate Transparent Thinking Beast Mode" from github/awesome-copilot, covering quantum cognitive architecture, phase 2: adversarial intelligence & red-team analysis, phase 3: implementation & iterative refinement and phase 4: comprehensive verification & completion.

github/awesome-copilot · 11 tokens

code-reviewer

Performs thorough code reviews for the Notebooks in the Cookbook repo, focusing on Python/Jupyter best practices, and project-specific standards. Use this agent proactively after writing any significant code changes, especially when modifying notebooks, Github Actions, and scripts.

anthropics/claude-cookbooks · 52 tokens