aicontainer: Instructions file for Claude Code

AGENTS.md

aicontainer AGENTS.md is an instructions file for Claude Code, Codex, OpenCode from stefanoginella/aicontainer. It costs 12,504 tokens per session, scanned D, original, MIT.

Repository instructions for the aicontainer project, a tool that prepares container-based development environments for coding work. They describe the project layout, image-tag rules, version checks, and validation expectations.

In plain words
What is it for?
Use them when editing aicontainer, especially its CLI, container template, hooks, firewall, version-update logic, or host-side tests.
Why use it?
They give coding agents the project-specific rules needed to change the command-line tool and its generated development-container files safely.

Instructions file for Claude CodeCodexOpenCode

Written for Claude Code and Codex and OpenCode: PreToolUse hook event, but also the file is AGENTS.md. Also seen: mentions CLAUDE.md; names the NotebookEdit tool; mentions Claude Code.

This is stefanoginella/aicontainer's own configuration. It tells Claude Code, Codex and OpenCode how to work on aicontainer 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 aicontainer configures →

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /home/vscode/.cache/**.

Reuse

Borrowing it

Nothing to install: this file belongs to stefanoginella/aicontainer. 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/stefanoginella/aicontainer/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/stefanoginella/aicontainer

Made for: Claude Code, Codex, OpenCode.

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 aicontainer AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/stefanoginella/aicontainer/agents-md.svg)](https://agentmods.dev/instructions/stefanoginella/aicontainer/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/stefanoginella/aicontainer/agents-md"><img src="https://agentmods.dev/badge/instructions/stefanoginella/aicontainer/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 12,504 This file is loaded in full into every session.
When invoked 12,504 The same file — it is already loaded in full.
Security scan D 4 findings. A grade says what 26 rules found in the file — not that it is safe.
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.12504 $0.12504
Opus 5 $0.06252 $0.06252
Sonnet 5 $0.02501 $0.02501
Haiku 4.5 $0.01250 $0.01250

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

Security

Grade D, and why

aicontainer AGENTS.md scanned grade D with 4 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 7d 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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

final `FROM` is aicontainer: build steps execute as root and can replace

Cloud metadata endpointhighServer-side request forgery

One request to 169.254.169.254 can return temporary IAM credentials.

`100.100.100.200/32`, `fe80::/10`, and `fd00:ec2::254`. It is independent of

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

`fetch_latest_version()` is bounded (`curl --max-time`, npm-view fallback)

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

`spawnSync`s it, and `throw`s on exit 2. Root-managed
AGENTS.md · 839 lines

How it starts

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

AGENTS.md

Guidance for AI coding agents (and humans) working on aicontainer itself. Users running aicontainer in their projects start at README.md.

CLAUDE.md is a thin pointer to this file — keep that arrangement; new agent-facing notes go here.

Convention: "guarded by the '…' test" below names a CLI/smoke test present in both workflows. When you change the behavior, extend the test — never weaken it.

Repository layout

  • aic — the host-side bash CLI, single file. Exposed as npm bin (aic, aicontainer) and ~/.aicontainer/aic for git installs. Finds its template via $AIC_HOME (defaults to the script's directory after symlink-following).
  • template/ — copied into a project's .devcontainer/ by aic init/aic sync; the source of truth for what lands in user repos.
    • Dockerfile, post-create.py, hooks/, aic-firewall, aic-chown-volumes, aic-lock-user-config, .zshrc, .gitignore
    • hooks/: the shared guardrail pre-tool-use.sh, the thin OpenCode adapter opencode-guardrail.js, and the opt-in metadata-only Claude/Codex lifecycle relay agent-status.py — all copied root-owned to /etc/aic/hooks/.
    • docker-compose.pull.yml (default mode), docker-compose.build.yml (--build mode)
    • README.md — copied into every project's .devcontainer/ in both modes; a managed guide to the do-not-edit vs project-owned split. Keep its two lists in sync with apply_template() and the project-owned files.
    • .gitignore — copied in both modes and contains only .env.
    • .env itself is atomically generated per host/context; it holds the socket, runtime user, path-free project identity, and host-owned status relay mode. It is a managed control file, not a template asset or project-owned override.
  • .github/workflows/
    • rebuild.ymlsecurity-refresh track: relevant template/CLI/test/ package pushes to main, weekly cron, workflow_dispatch. Publishes GHCR :latest + :weekly-YYYY-VV; never npm.
    • release.ymlrelease track: v* tag push (or workflow_dispatch on a tag ref) only. Ensures immutable :vX.Y.Z + npm artifacts exist, then conservatively promotes mutable latest channels.
  • tests/ — host CLI and privileged-helper regression tests run before both real-devcontainer workflow smoke suites. Security fixes normally add a fast host fixture here and a runtime assertion in both workflows.
  • package.json — its version is the source of truth for the GHCR tag aic init pins. Never bump it by hand; use npm version (see "Releasing").
  • CHANGELOG.md — hand-maintained (Keep a Changelog format); source of the GitHub Release notes and a release precondition.
  • scripts/promote-changelog.mjs — zero-dep helper run by npm version: promotes ## [Unreleased] to the new version (date + compare links). Never generates content.
  • .githooks/pre-push — local mirror of the CI changelog gate; opt-in via git config core.hooksPath .githooks.

Read the full file on GitHub · 839 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. 7d ago First seen · 839 lines · 12,504 tokens per session scan D 997484f4995e

Subscribe to this mod's changes

aicontainer AGENTS.md is an instructions file published in the GitHub repository stefanoginella/aicontainer (20 stars, last pushed 2d ago), licensed MIT. It adds 12,504 tokens to every session, about $0.0625 per session on Opus 5. A static security scan graded it D with 4 findings (asks for root, cloud metadata endpoint, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other instructions, from other repositories

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,182 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens