ubuntu-cloud-init

ubuntu-cloud-init is a skill for Claude Code from air-gapped/skills. It costs 170 tokens per session (3,296 once invoked), scanned B, original, MIT.

A guide to cloud-init configuration for Ubuntu Server, a boot-time system that reads a configuration file and creates users, files, packages, certificates, disks, and services. It targets NoCloud, a way to provide that configuration locally or from an internal source.

In plain words
What is it for?
Use it to create and test `#cloud-config` files for users, SSH, package mirrors, internal certificates, time settings, storage, and first-boot commands.
Why use it?
It helps make Ubuntu setup repeatable on on-premise or air-gapped machines without relying on public cloud metadata services. Validation and clean reruns reduce errors during image and host provisioning.

Skill for Claude Code

Written for Claude Code: when-to-use in frontmatter.

Part of the ubuntu plugin — 3 skills shipped together

Good fit Use it to create and test #cloud-config files for users, SSH, package mirrors, internal certificates, time settings, storage, and first-boot commands.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/air-gapped/skills/ubuntu-cloud-init
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.

Any agent
npx skills add air-gapped/skills --skill ubuntu-cloud-init
Clone the repo
git clone --depth 1 https://github.com/air-gapped/skills

Made for: Claude Code.

Or install ubuntu, the plugin that ships this one along with the rest of its 3 skills.

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 ubuntu-cloud-init

README.md
[![agentmods](https://agentmods.dev/badge/skills/air-gapped/skills/ubuntu-cloud-init/github.svg)](https://agentmods.dev/skills/air-gapped/skills/ubuntu-cloud-init)
Your own site
<a href="https://agentmods.dev/skills/air-gapped/skills/ubuntu-cloud-init"><img src="https://agentmods.dev/badge/skills/air-gapped/skills/ubuntu-cloud-init/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ubuntu-cloud-init

Your own site · 80×15
<a href="https://agentmods.dev/skills/air-gapped/skills/ubuntu-cloud-init"><img src="https://agentmods.dev/badge/skills/air-gapped/skills/ubuntu-cloud-init.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 170 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,296 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00170 $0.03296
Opus 5.5 $0.00068 $0.01318
Sonnet 5.5 $0.00034 $0.00659
Haiku 4.5 $0.00017 $0.00330

Measured 1mo ago against content hash 74bdfb31fef9, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

ubuntu-cloud-init scanned grade B with 1 finding 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 1mo 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.

sudo cloud-init schema --system --annotate # validate the live system's user-data
.claude/skills/ubuntu-cloud-init/SKILL.md · 265 lines

How it starts

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

ubuntu-cloud-init

cloud-init runs early in boot, reads configuration from a datasource, and applies it through modules across four boot stages. This skill is authoring-led (produce correct cloud-config from a description) with a strong validation/debug path, aimed at on-prem / air-gapped Ubuntu Server LTS using the NoCloud datasource.

Mapping: 24.04 LTS ≈ cloud-init 24.x; 26.04 LTS ≈ 26.1.

Authoring workflow

  1. Identify the goal & datasource. On-prem/air-gapped → NoCloud (seed dir, cidata ISO/USB, HTTP seed, or SMBIOS serial). Pin datasource_list: [NoCloud] to stop cloud-init probing cloud metadata services and timing out.
  2. Choose the user-data format — almost always #cloud-config. Use MIME multipart only to combine cloud-config with scripts. (Formats table below.)
  3. Write the #cloud-config using the modules needed (see Quick reference).
  4. Validate: cloud-init schema -c user-data --annotate.
  5. Seed it (NoCloud) and set a unique instance-id in meta-data.
  6. Test on a throwaway boot, then cloud-init clean --logs to re-run as if first boot.

user-data formats

First line determines the format:

Header (line 1) Format
#cloud-config YAML config processed by modules (the usual choice).
#!/bin/sh (shebang) A script, run once per instance in the Final stage.
#cloud-boothook Runs very early, every boot (guard with cloud-init-per).
#include List of URLs, each fetched as user-data.
Content-Type: multipart/mixed MIME — combine cloud-config + scripts. Build with cloud-init devel make-mime.
## template: jinja Jinja template (line 1); real header on line 2. Variables = instance-data keys, e.g. {{ v1.instance_id }}.

Any of these may be gzipped.

Quick reference — the modules that matter on-prem

users / ssh (created in the Network stage):

#cloud-config
ssh_pwauth: false
users:
  - default                          # KEEP this first to retain the distro user + cloud keys
  - name: deploy
    groups: [sudo]
    sudo: "ALL=(ALL) NOPASSWD:ALL"
    lock_passwd: true
    shell: /bin/bash
    ssh_authorized_keys:
      - ssh-ed25519 AAAA... deploy@site

passwd (a hash) applies only to new users; hashed_passwd applies even to existing ones. Generate a hash with mkpasswd --method=SHA-512 --rounds=4096.

Read the full file on GitHub · 265 lines

Files

What ships with it

8 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 1mo ago First seen · 265 lines · 170 tokens per session scan B 74bdfb31fef9

Subscribe to this mod's changes

ubuntu-cloud-init is a skill published in the GitHub repository air-gapped/skills (5 stars, last pushed 2d ago), licensed MIT. It adds 170 tokens to every session and 3,296 once invoked, about $0.0007 per session on Opus 5.5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories