qemu-image
Skill57 starsChanged 4 months agoMITView on GitHub
Inspect or package QEMU disk, SD, eMMC, flash, pflash, firmware, raw, and qcow2 images. Use for read-only image format, partition, region, offset, sector-size, and hash analysis, or for explicitly authorized image creation, conversion, partitioning, filesystem population, and fixed-offset writes with readback and rollback evidence.
In this repository17 other files it gives its agents.
- AGENTS.mdAGENTS.md
- qemu-agent-feedbackSkill
- qemu-board-modelingSkill
- qemu-boot-runSkill
- qemu-buildSkill
- qemu-debugSkill
- qemu-kernel-buildSkill
- qemu-linux-bootSkill
- qemu-model-verificationSkill
- qemu-peripheral-modelingSkill
- qemu-qtestSkill
- qemu-register-extractionSkill
- qemu-rst-documentationSkill
- qemu-tcg-backendSkill
- qemu-tcg-frontendSkill
- qemu-uboot-buildSkill
- qemu-workflowSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. About 0 are common, 10 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈10
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 24
Before writing task artifacts or configuring QEMU in a Git worktree, add .agents/, .oh-my-qemu/, and builds/ to the repository-local file …
- Distinctive: line 39
Use inspect by default, including for ambiguous requests.
- Distinctive: line 43
Use package only when the user explicitly requests creation, conversion, population, or mutation and the exact output path or device and …
- Distinctive: line 46
If a command's write behavior is uncertain, stop and resolve it before use.
- Distinctive: line 47
Prefer a task-local working copy for experiments and never mutate an input artifact by default.
- Very specific: line 72
Prefer read-only forms of locally available tools such as file, qemu-img info, fdisk -l, sfdisk --dump, and sha256sum or shasum -a 256.
- Very specific: line 79
Before writing, record this contract in audit.md:
- Very specific: line 107
Create a new output under output/ unless the user authorized another exact path.
- Distinctive: line 111
Create or convert the container, partition it, create filesystems, copy files, and perform fixed-offset writes in the recorded order.
- Distinctive: line 118
Read back every material write.
- Distinctive: line 125
Do not pass an image to QEMU as proof of correct packaging: boot behavior can mutate media and does not establish byte-for-byte placement.
- Distinctive: line 133
Prefer building a temporary output and publishing it only after readback.
- Distinctive: line 134
Never attempt in-place rollback without a known-good source and exact bounds.
- Distinctive: line 135
If packaging or readback fails, stop further writes, preserve evidence, run only the authorized rollback, and verify the restored target's …
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
QEMU Image
Audit workflow
For non-trivial tasks, use a stable .oh-my-qemu/<task-slug>/ directory and
create only needed entries:
.oh-my-qemu/<task-slug>/
├── audit.md # Baseline, mode, authorization, decisions, evidence, and gaps
├── commands.md # Redacted commands, working directories, and results
├── logs/ # Decisive inspection, packaging, and verification output
├── scripts/ # Task-specific helper scripts and intermediate documents
└── output/ # Working copies, backups, readbacks, and generated imagesBefore writing task artifacts or configuring QEMU in a Git worktree, add
.agents/, .oh-my-qemu/, and builds/ to the repository-local file from
git rev-parse --git-path info/exclude; preserve existing entries and avoid
duplicates. Keep QEMU builds under source-root builds/build-<target>/; never
use build/. Never stage or commit while using this skill.
Record baseline and handoff git status --short --untracked-files=all,
distinguish pre-existing changes, and verify no excluded path is tracked or
staged. Log redacted commands, working directories, and results in
commands.md; keep helpers in scripts/, decisive output in logs/, and
generated images, third-party dependencies, and non-QEMU binaries in
output/. Report the audit directory and unresolved gaps at handoff.
Select the mode
- Use inspect by default, including for ambiguous requests. Keep the target image or device read-only and limit actions to identification, measurement, hashing, and verification. Do not mount read-write, repair a filesystem or image, convert, resize, rebase, amend, repartition, or write raw bytes.
- Use package only when the user explicitly requests creation, conversion, population, or mutation and the exact output path or device and allowed changes are clear. Authorization to inspect is not authorization to write.
- If a command's write behavior is uncertain, stop and resolve it before use. Prefer a task-local working copy for experiments and never mutate an input artifact by default.
Record the selected mode, target, authorization boundary, and intended outputs
in audit.md before taking an action that can write.
Inspect an image
- Resolve the exact path without following an ambiguous glob. Record whether it is a regular file, block device, symlink, or backing-chain member.
- Identify the container format independently from its contents. Record raw, qcow2, or other format; virtual and allocated size; backing files; and any format features that affect mutation. Do not infer format from the suffix.
- Record the partition-table type and the logical sector size reported by the relevant tool. List partition and fixed-region start, end, size, type or GUID, filesystem, purpose, and alignment. Include boot data outside a partition table.
- Express every address with an explicit unit and base. Derive a byte offset
as
start_sector * logical_sector_size; never assume 512-byte sectors. Distinguish image-relative, partition-relative, and nested-container offsets. - Compute SHA-256 for the inspected image and important inputs when practical. Record the exact hashing command and identify any unhashable or changing target as a gap.
Prefer read-only forms of locally available tools such as file, qemu-img
info, fdisk -l, sfdisk --dump, and sha256sum or shasum -a 256. Treat
tool absence or an unsupported format as an unresolved gap, not as permission
to mutate the image.
Plan a package operation
Before writing, record this contract in audit.md:
| Output | Format | Virtual size | Existing target? | Mutation policy |
| --- | --- | --- | --- | --- |
| Region | Start byte | Start sector | Sector size | Size | Type/filesystem | Source |
| --- | --- | --- | --- | --- | --- | --- |
| Order | Operation | Input | Output region | Offset/seek | Block size | Bounds | Readback |
| --- | --- | --- | --- | --- | --- | --- | --- |- Resolve every input and output path, record available space, and hash each input. Separate firmware, bootloader, kernel, DTB, initrd, root filesystem, and modules even when the final output combines them.
- Record the image format, partition table, logical sector size, alignment, fixed regions, filesystem choices, write order, and expected final size.
- For each write, state whether the offset is in bytes or sectors and which
base it is relative to. When using
dd, recordbs,seek,skip,count, and truncation behavior. Prove thatoffset + payload_sizestays within its assigned region and the image, and reject unintended overlaps. - Classify the target as immutable input, working copy, disposable output, or reusable mutable media. Account for later guest, firmware, pflash, qcow2, or filesystem writes; use a clean copy or overlay when repeatability matters.
Package and verify
- Create a new output under
output/unless the user authorized another exact path. For an existing target, require explicit overwrite or in-place authorization and first prepare a verified backup or another documented, reversible strategy. - Create or convert the container, partition it, create filesystems, copy files, and perform fixed-offset writes in the recorded order. Preserve sparse allocation when required and do not let a raw write truncate the output unintentionally.
- Flush pending writes before verification. Re-inspect format, virtual and allocated size, partitions, sector size, regions, and filesystems without repair options.
- Read back every material write. Compare file contents or extracted byte ranges with their source by SHA-256 or byte comparison, and verify partition boundaries and filesystem contents independently of command success.
- Hash the complete output after packaging and record both pre-mutation and final hashes where an existing image or base copy was involved. A command exit status alone is not readback evidence.
Do not pass an image to QEMU as proof of correct packaging: boot behavior can mutate media and does not establish byte-for-byte placement.
Roll back safely
- Define rollback before the first write: remove an incomplete new output, or restore an existing target from the verified backup or clean base. Keep the backup until verification and handoff unless the user authorizes its removal.
- Prefer building a temporary output and publishing it only after readback. Never attempt in-place rollback without a known-good source and exact bounds.
- If packaging or readback fails, stop further writes, preserve evidence, run only the authorized rollback, and verify the restored target's format, layout, size, and hash. Report any partial mutation or failed rollback as an unresolved gap.
Handoff
Provide the selected mode, exact inspected or packaged path, format and layout summary, sector size and offset units, input and output SHA-256 values, mutation policy, readback results, rollback state, audit directory, and unresolved gaps.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

