docs: add a "how to use sensorwatch" agent skill (#16)
* docs: add a "how to use sensorwatch" agent skill
Add skills/sensorwatch/, a portable Agent Skills bundle that teaches an AI
agent to use sensorwatch against the surfaces that exist today: read the
current hardware state via the sensorwatch.native API, run the CLI logger to
collect JSON Lines history, and analyze the logs. Bundles a one-shot
scripts/snapshot.py (live snapshot -> JSON) and agents/openai.yaml for Codex
discovery.
The skill ships in the repo and sdist but not the wheel (packages already
excludes it, like examples/), so no pyproject/MANIFEST change is needed.
Agent guidance is kept read-only per SECURITY.md section 4.
Wire discoverability: turn the README roadmap line into a delivered Skills
pointer (+ a Skills section) and add a short CONTRIBUTING note.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* docs: document building and linking the C core (static lib + DLL)
Agents (and C/C++ consumers) had no guidance on how to build or link the native
core. Both a static library (sensorwatch_static) and a shared library/DLL
(sensorwatch) build from CMakeLists.txt, both ON by default.
README "Building the native core": add the SW_BUILD_SHARED / SW_BUILD_STATIC
toggles, single-target build recipes (tests off -> no cmocka network fetch), the
artifact locations, and a "Linking against the core" subsection -- compile static
consumers with -DSW_STATIC; the DLL resolves to dllimport on Windows; CMake
add_subdirectory/FetchContent propagates the right defines. Note that
cmake --install / find_package(sensorwatch) is still a planned follow-up.
SKILL.md: add a compact build-and-link recipe under "Other language surfaces"
with a pointer to the README section.
Verified both recipes via the VS2026 Dev Shell (Ninja): the static-only build
produces sensorwatch_static.lib and the DLL-only build produces sensorwatch.dll
plus its import library.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* docs: address round-1 review on the sensorwatch skill
- SKILL.md: show the real SensorwatchError text ("[-4] Sensor source is not
running or not enabled") instead of the symbolic SW_ERR_* name, which never
appears in str(exc); clarify the catch-all reading type is upper-case
(OTHER/UNKNOWN) via the native API but title-case ("Other"/"unknown(<N>)")
in the logger JSONL and read_sensors().
- snapshot.py: close the Snapshot via a context manager instead of relying on
GC timing; emit the logger's title-case "type" labels (shared SENSOR_TYPES)
so a snapshot matches a logged record; reject negative --indent; add type
hints.
- CONTRIBUTING.md: correct the distribution claim -- the skill lives in the git
repo only (its links assume the full tree), not the sdist or wheel.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* docs: round-2 review polish on the sensorwatch skill
- snapshot.py: the native UNKNOWN sentinel (255) now maps to a bare "unknown"
instead of "Unknown". The native binding has already collapsed the raw HWiNFO
code, so it cannot reproduce the logger's "unknown(<N>)" form -- the docstring
now says so precisely rather than overclaiming a full vocabulary match.
- SKILL.md: the Recipe 1 headline example now uses the Snapshot context manager
(with session.snapshot() as snapshot:), matching snapshot.py and the Snapshot
docstring's recommendation.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* docs: address Copilot round-3 notes on snapshot.py
- Validate --type against the known ReadingType names up front: a typo now
fails loudly (exit 2, listing the valid values) instead of silently filtering
to an empty array that looks like "no such sensors".
- Document exit code 2 (argparse usage errors) in the script docstring and the
SKILL.md helper notes.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Leonard Janke <lcjanke2020@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> A
Agent for Leonard Janke committed
f51d3b2643a707f246fe8a3f7f29f19572698a54
Parent: 4b4ece8
Committed by GitHub <noreply@github.com>
on 6/30/2026, 10:19:14 PM