[PATCH v3] agents: Add a skill for finding your way around QEMU

Paolo Bonzini posted 1 patch 2 weeks, 2 days ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260910075338.139437-1-pbonzini@redhat.com
.agents/skills/qemu-codebase/SKILL.md | 59 +++++++++++++++++++++++++++
.claude/skills                        |  1 +
.gemini/skills                        |  1 +
3 files changed, 61 insertions(+)
create mode 100644 .agents/skills/qemu-codebase/SKILL.md
create mode 120000 .claude/skills
create mode 120000 .gemini/skills
[PATCH v3] agents: Add a skill for finding your way around QEMU
Posted by Paolo Bonzini 2 weeks, 2 days ago
As a side effect, establish scaffolding for the .agents/.claude/.gemini
directories, as a base for future patches to build on.

Some parts of this skill are based on
https://lore.kernel.org/r/20260529101437.410181-4-alex.bennee@linaro.org/.

Co-authored-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 .agents/skills/qemu-codebase/SKILL.md | 59 +++++++++++++++++++++++++++
 .claude/skills                        |  1 +
 .gemini/skills                        |  1 +
 3 files changed, 61 insertions(+)
 create mode 100644 .agents/skills/qemu-codebase/SKILL.md
 create mode 120000 .claude/skills
 create mode 120000 .gemini/skills

diff --git a/.agents/skills/qemu-codebase/SKILL.md b/.agents/skills/qemu-codebase/SKILL.md
new file mode 100644
index 00000000000..559f0075976
--- /dev/null
+++ b/.agents/skills/qemu-codebase/SKILL.md
@@ -0,0 +1,59 @@
+---
+name: qemu-codebase
+description: >-
+  Route broad or unfamiliar QEMU tasks to relevant subsystem,
+  documentation, build, and test entry points. Do not use for work
+  where the files, subsystems and abstractions are already known.
+---
+
+# Finding your way around QEMU
+
+Use this skill for orientation, not as a general prerequisite for QEMU
+work. Start from the code and nearby tests when the request already
+identifies a file, function, subsystem, or commit.
+
+## Finding the subsystem
+
+For a broad request, use `grep`/`rg` and `MAINTAINERS` to locate
+likely code and subsystem boundaries. Use `scripts/get_maintainer.pl
+--nogit -f <path>` when the maintainance status matters.  Read
+`docs/devel/codebase.rst` only when the top-level directory or execution
+mode is unclear.
+
+## Focused documentation
+
+Read documentation only when the task involves the corresponding
+abstraction or its invariants:
+
+- QOM types, properties, composition, or lifecycle: `docs/devel/qom.rst`.
+- qdev realize/unrealize, buses, GPIO, or hotplug: `docs/devel/qdev-api.rst`.
+- Device or machine reset behavior: `docs/devel/reset.rst`.
+- MemoryRegion topology, transactions, mappings, or dirty tracking:
+  `docs/devel/memory.rst`.
+- TCG frontend/backend boundaries or IR: `docs/devel/tcg.rst`; for the TCG IR,
+  also read `docs/devel/tcg-ops.rst`.
+- RCU lifetime, grace periods, or atomic ordering: `docs/devel/rcu.rst` and
+  `docs/devel/atomics.rst`.
+- AioContext migration, iothreads, or block/device concurrency:
+  `docs/devel/multiple-iothreads.rst`.
+- BQL ownership or code running outside the BQL: `include/qemu/main-loop.h`
+  and nearby callers.
+
+Prefer source declarations and nearby callers when they answer the
+question more directly. A `kernel-doc::` directive points to comments
+in the source; inspect those comments without building the documentation.
+
+## Building and testing
+
+QEMU builds out of tree and a checkout may have several build
+directories. When building or testing, find the applicable configured
+tree from context (for example, directories containing `meson-info`)
+instead of assuming one. Use that build directory's `run` wrapper for
+`meson test` so its environment and Python paths are active.
+
+For C changes, run `scripts/checkpatch.pl` on the patch; for Rust changes,
+consider `make clippy` and `make rustfmt`.
+
+Choose the narrowest test that exercises the behavior. Use `make
+check-unit`, `make check-qtest`, `make check-functional`, or `make
+check-rust` only when a suite-level run is justified.
diff --git a/.claude/skills b/.claude/skills
new file mode 120000
index 00000000000..a7540c24423
--- /dev/null
+++ b/.claude/skills
@@ -0,0 +1 @@
+.agents/skills/
\ No newline at end of file
diff --git a/.gemini/skills b/.gemini/skills
new file mode 120000
index 00000000000..a7540c24423
--- /dev/null
+++ b/.gemini/skills
@@ -0,0 +1 @@
+.agents/skills/
\ No newline at end of file
-- 
2.55.0