tiiuae/ghaf/ghaf-hw-test

Claude Code and agent skill by tiiuae/ghaf

Trust tier 2
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Run hardware tests on Ghaf devices (darter-pro, jetson-agx) with automatic fix proposals. Use this skill to flash devices, run Robot Framework tests, analyze failures, and generate code fixes.

Install

npx vskill@latest install tiiuae/ghaf/ghaf-hw-test

SKILL.md

Ghaf Hardware Test Automation Skill

This skill automates the hardware testing workflow for Ghaf Framework devices using the ci-test-automation Robot Framework test suite. It supports running tests on locally connected devices, flashing images, analyzing test failures, and proposing code fixes.

When to Use This Skill

Use this skill when the user wants to:

  • Run hardware tests on a connected Ghaf device (darter-pro, jetson-agx, lenovo-x1, etc.)
  • Flash a new Ghaf image to a device
  • Analyze test failures and identify root causes
  • Generate fix proposals for failing tests
  • Run a test-fix loop until all tests pass (with optional auto build+flash)

Supported Devices

DeviceArchitectureGhaf target (build/flash)-d value (test)
System76 Darter Prox86_64intel-laptop-debugdarter-pro
Lenovo ThinkPad X1x86_64intel-laptop-debuglenovo-x1
Dell Latitude 7330x86_64intel-laptop-debugdell-7330
NVIDIA Jetson AGX Orinaarch64nvidia-jetson-orin-agx-debug-from-x86_64orin-agx
NVIDIA Jetson Orin NXaarch64nvidia-jetson-orin-nx-debug-from-x86_64orin-nx

The two columns are different names for a reason. x86 laptops share the generic intel-laptop-* image — modules/reference/hardware/intel-laptop/ passes display, network and audio through by PCI class wildcard instead of per-device IDs, so one image covers the fleet. The Robot suite, however, still branches on the physical machine: Robot-Framework/ config/variables.robot compares DEVICE_TYPE against the exact lowercase strings above to decide IS_LAPTOP, so a mismatched value silently changes which tests apply.

Jetson entries name the -from-x86_64 variants because the native aarch64 attributes are not exposed in packages.x86_64-linux; naming them from a build host resolves to nothing.

Available Commands

Run these commands from the Ghaf repository root:

bash
# Check device connectivity and readiness
.github/skills/ghaf-hw-test/ghaf-hw-test status --device darter-pro --ip <IP>
# Run tests on a device
.github/skills/ghaf-hw-test/ghaf-hw-test test --device darter-pro --ip <IP>
.github/skills/ghaf-hw-test/ghaf-hw-test test --device Orin-AGX --ip <IP> --tag boot
.github/skills/ghaf-hw-test/ghaf-hw-test test --device darter-pro --ip <IP> --tag pre-merge
# Flash a device with a new image
.github/skills/ghaf-hw-test/ghaf-hw-test flash --device darter-pro --drive /dev/sda
.github/skills/ghaf-hw-test/ghaf-hw-test flash --device Orin-AGX --recovery
# Analyze test results and propose fixes
.github/skills/ghaf-hw-test/ghaf-hw-test analyze
.github/skills/ghaf-hw-test/ghaf-hw-test analyze --results /tmp/test_results
.github/skills/ghaf-hw-test/ghaf-hw-test analyze --propose-fixes
# Full workflow: test → analyze → fix → build → flash → retest
.github/skills/ghaf-hw-test/ghaf-hw-test run --device darter-pro --ip <IP> --fix-loop --drive /dev/sda
# Non-interactive mode (for AI agents)
.github/skills/ghaf-hw-test/ghaf-hw-test -y run --device darter-pro --ip <IP> --fix-loop --drive /dev/sda

Global Options

FlagDescription
-y, --yesSkip all interactive confirmations (flash warnings, fix-loop pauses)

Typical Workflow

1. Check Device Connectivity

Before running tests, verify the device is reachable:

bash
.github/skills/ghaf-hw-test/ghaf-hw-test status --device darter-pro --ip <IP>

This checks SSH connectivity and reports device readiness.

2. Run Tests

Run the pre-merge test suite (default):

bash
.github/skills/ghaf-hw-test/ghaf-hw-test test --device darter-pro --ip <IP>

Or run specific test tags:

bash
# Boot tests only
.github/skills/ghaf-hw-test/ghaf-hw-test test --device darter-pro --ip <IP> --tag boot
# Performance tests
.github/skills/ghaf-hw-test/ghaf-hw-test test --device darter-pro --ip <IP> --tag performance
3. Analyze Failures

If tests fail, analyze the results:

bash
.github/skills/ghaf-hw-test/ghaf-hw-test analyze --propose-fixes

This parses /tmp/test_results/output.xml and:

  • Identifies failing tests
  • Maps failures to Ghaf module paths
  • Generates actionable fix proposals
4. Apply Fixes and Re-run

Review the proposed fixes, apply them, then re-run tests:

bash
# Edit the files suggested in the fix proposals
# Then re-run tests
.github/skills/ghaf-hw-test/ghaf-hw-test test --device darter-pro --ip <IP>
5. Fix Loop Mode (Automated)

For automated test-fix iterations with build+flash:

bash
.github/skills/ghaf-hw-test/ghaf-hw-test run --device darter-pro --ip <IP> --fix-loop --drive /dev/sda

This will:

  1. Run tests
  2. If failures occur, analyze and output fix proposals
  3. Wait for fixes to be applied (or proceed immediately with --yes)
  4. Build and flash the new image (if --drive or --recovery was specified)
  5. Wait for the device to boot and become reachable via SSH
  6. Re-run tests
  7. Repeat until all tests pass or max iterations (5) reached

Without --drive/--recovery, the loop skips the build+flash step (useful when using nixos-rebuild externally).

Flashing Devices

x86 Devices (darter-pro, lenovo-x1, dell-7330, nuc)
bash
# Build and flash in one step
.github/skills/ghaf-hw-test/ghaf-hw-test flash --device darter-pro --drive /dev/sda
Jetson Devices (Orin-AGX, Orin-NX)
bash
# Put device in recovery mode (hold recovery button while powering on)
# Then run guided flash
.github/skills/ghaf-hw-test/ghaf-hw-test flash --device Orin-AGX --recovery

Test Tags Reference

TagDescription
pre-mergeQuick validation tests (default)
batBasic Acceptance Tests
bootBoot and connectivity tests
functionalVM, host, networking, apps
guiDesktop/GUI functionality
performanceBenchmarks, boot time
securitySecurity validation
suspensionSuspend/resume cycles
updateOTA update verification

Configuration

Device profiles and defaults are stored in .github/skills/ghaf-hw-test/config.yaml.

That file is shared, so it holds only what is true for the project: which image a device takes, which name the Robot suite expects, how it is flashed. Anything specific to the hardware on your desk -- host_ip, ssh_identity, netboot_iface, netboot_mac, flash_drive, serial_device -- belongs in `config.local.yaml` beside it, which is gitignored. Copy config.local.yaml.example to get started, or point GHAF_HW_TEST_LOCAL_CONFIG elsewhere.

The local file is merged over the shared one per device and per field. A null in the local file does not blank a value in the shared one, so a partly-filled override is safe, and you can add devices that do not appear in config.yaml at all.

You can override defaults via command-line arguments or by editing the config file. Each device has a boot_wait_seconds setting that controls how long wait_for_device polls SSH after flashing.

Output Files

Test results are stored in /tmp/test_results/:

  • output.xml - Robot Framework results (parsed by analyze)
  • log.html - Detailed test log
  • report.html - Test summary report

Integration with smoke-test Devshell

This skill wraps the existing robot-test command from the smoke-test devshell. You can also use the devshell directly:

bash
nix develop .#smoke-test
robot-test -i <IP> -d darter-pro -p ghaf

Tips for AI Agents

Important: The --ip address is the device's external/reachable IP, not an internal VM address. Always ask the user for the device IP before running commands — do not guess or use placeholder addresses.

When operating in fix-loop mode:

  1. Use `--yes` to skip interactive prompts: ghaf-hw-test -y run ...
  2. Use `--drive` to auto-rebuild and flash after applying fixes
  3. Read the fix proposals generated by analyze --propose-fixes
  4. Locate the relevant Ghaf modules using the paths in the proposals
  5. Make minimal, targeted fixes - change only what's needed
  6. Re-run the specific failing tests first before running the full suite
  7. Check the test code in ci-test-automation if the failure is unclear
Common Failure Patterns
Failure TypeLikely CauseWhere to Look
SSH connection timeoutNetwork/firewallmodules/common/networking/
Service not runningsystemd unit issuemodules/common/services/
GUI test failureDesktop/graphicsmodules/desktop/
VM communication failureGIVC configurationmodules/givc/
Performance regressionConfig or hardwaremodules/hardware/

Prerequisites

  • Ghaf repository cloned
  • Device connected via network (SSH) or serial
  • For flashing: physical access to device
  • Nix with flakes enabled

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
84
Repository forks
83
7-day trend score
22

Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 19 Mar 2026, 7 months ago.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/tiiuae/ghaf/ghaf-hw-test/badge)](https://verified-skill.com/skills/tiiuae/ghaf/ghaf-hw-test)

Something wrong with this skill or its page? Tell us.