Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Agent Skills

Reusable agent skills organized as a catalog for installation with the
[`skills`](https://github.com/vercel-labs/skills) CLI.

## Install

List the skills available in this repository:

```sh
npx skills add https://github.com/processmission/agent-skills --list
```

Install one skill into the current project (project scope is the default):

```sh
npx skills add https://github.com/processmission/agent-skills --skill zephyr-debug -y
```

Install every skill into the current project:

```sh
npx skills add https://github.com/processmission/agent-skills --skill '*' -y
```

Add `--global` (or `-g`) to any install command to install at user scope
instead.

## Catalog

Skills are grouped by ecosystem using the catalog layout supported by the CLI:

```text
skills/
└── <ecosystem>/
└── <skill-name>/
├── SKILL.md
└── references/ # optional
```

### Zephyr

- [Zephyr agent skills](skills/zephyr/README.md)

## License

All content in this repository is licensed under the [MIT License](LICENSE).
72 changes: 72 additions & 0 deletions skills/zephyr/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Zephyr Agent Skills

Agent skills for [Zephyr Project](https://www.zephyrproject.org/) development,
debugging, exploration, patch review, and safety evidence work.

Source repository: <https://github.com/processmission/agent-skills>

## Install

The following commands discover and install only the skills in the
`skills/zephyr/` catalog.

Install all Zephyr skills into the current project:

```sh
npx skills add https://github.com/processmission/agent-skills/tree/main/skills/zephyr \
--skill '*' \
-y
```

Install one skill, such as `zephyr-debug`:

```sh
npx skills add https://github.com/processmission/agent-skills/tree/main/skills/zephyr \
--skill zephyr-debug \
-y
```

Project scope is the default. Add `--global` or `-g` to install at user scope:

```sh
npx skills add https://github.com/processmission/agent-skills/tree/main/skills/zephyr \
--skill '*' \
-g \
-y
```

## Repository workflow

Each Zephyr skill is self-contained, can be installed independently, and does
not require another Zephyr skill. Every skill includes the same compact audit
workflow. For non-trivial tasks that write to the workspace, agent plans, audit
records, command journals, decisive logs, and other temporary evidence go under
`.zephyr-skills/<agent-task>/`. Build artifacts do not: use a build path chosen
by the user or the relevant Zephyr tool's default build or output directory.

## Skills

### `zephyr-debug`

Reproduce and isolate Zephyr build, toolchain, QEMU, boot, board, or runtime
failures. Use targeted Zephyr logging, QEMU GDB stubs, or OpenOCD and J-Link
remote debugging according to the target and available tools.

### `zephyr-explore`

Investigate Zephyr source, branch history, external precedent, and design
constraints before making changes. Use it to clarify current behavior,
maintainer boundaries, and compatibility requirements.

### `zephyr-patch-review`

Review Zephyr diffs or patch stacks for correctness, integration impact, test
coverage, reviewer boundaries, and merge readiness. Report only actionable,
source-backed findings.

### `zephyr-safety-evidence`

Plan or review Zephyr safety evidence, requirements traceability, and
certification gaps for ASIL, ISO 26262, IEC 61508, SIL, MC/DC, HARA,
FMEA/FMEDA, and tool qualification work. It never presents draft or partial
evidence as completed certification.
96 changes: 96 additions & 0 deletions skills/zephyr/zephyr-debug/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
---
# SPDX-FileCopyrightText: Copyright (c) 2026 Process Mission
# SPDX-License-Identifier: MIT
name: zephyr-debug
description: >-
Use when reproducing or isolating the root cause of a Zephyr build,
toolchain, QEMU, boot, board, or runtime failure.
---

# Zephyr Debug

## Audit workflow

For every non-trivial task that writes to the workspace, choose a stable task
slug and keep agent-only records under:

```text
.zephyr-skills/<agent-task>/
├── audit.md # Baseline, decisions, evidence, verification, and gaps
├── commands.md # Redacted commands, working directories, and results
└── logs/ # Decisive build, test, runtime, or diagnostic logs
```

Keep other agent plans and temporary evidence in the same task directory. Keep
build trees and test outputs separate: honor a user-specified path, otherwise
use Zephyr-native defaults such as configured `build.dir-fmt`, `build/`, or
`twister-out/`. Record the effective paths, do not stage `.zephyr-skills/`
unless requested, and report the task directory and unresolved gaps at handoff.

## Diagnose

1. Capture expected and observed behavior, the narrowest reproducer, and the
first decisive log.
2. Exclude wrong revisions, boards, configuration, stale output, and generated
artifact or toolchain mismatches before changing source.
3. Locate the first broken invariant across Kconfig, CMake, devicetree,
generated files, runner commands, boot flow, and runtime state.
4. Test each hypothesis with the smallest reversible probe and distinguish
observations from inferences.
5. For diagnosis-only requests, stop at the supported cause and remaining
uncertainty. Implement a fix and regression gate only when requested.

## Choose a debugging path

- Use Zephyr logging and targeted instrumentation when the failure remains
observable without stopping the system.
- Use a QEMU GDB stub for reproducible emulated failures, early boot, exception
state, memory inspection, breakpoints, and instruction-level stepping.
- Use the board's configured debug runner with OpenOCD or J-Link for hardware
failures. Select the runner from the board, probe, and user environment; do
not assume that one backend is universally available.
- Combine logs with GDB when console history or timing explains state that a
stopped target cannot.

## Run a remote GDB session

1. Preserve the exact ELF and build configuration that reproduce the failure.
Use the matching toolchain GDB and keep symbols in the Zephyr build tree.
2. Start the remote endpoint with the configured Zephyr runner: a QEMU GDB
stub for emulation, or a debug server backed by OpenOCD or J-Link for
hardware. Prefer runner-generated arguments over guessed probe, transport,
reset, or device settings.
3. If installed, use Tmux for concurrent panes; otherwise use Zellij, then
separate terminals. Keep the debug server or QEMU in one pane, GDB in a
second, and optional console or log monitoring in a third.
4. Generate a task-specific GDB command file under
`.zephyr-skills/<agent-task>/`, including the symbol file, remote endpoint,
breakpoints or watchpoints, thread inspection, and evidence-producing
commands. Avoid changing global GDB configuration.
5. Connect with `target remote` or `target extended-remote` as required by the
server. Capture the server command, GDB command file, decisive backtraces,
register or memory state, and target logs in the audit directory.
6. For a live hardware target, prefer attach semantics when flashing or reset
is not requested. Record any operation that changes target state.

## Use Zephyr logging and instrumentation

- Enable the Zephyr logging subsystem and the narrowest useful module or
subsystem log level through task-specific configuration or overlays.
- Add `LOG_DBG`, `LOG_INF`, `LOG_WRN`, `LOG_ERR`, or hexdump probes at state
transitions, error paths, ownership changes, and relevant interrupt or
scheduling boundaries.
- Include stable identifiers and state in messages, but never log secrets or
unbounded data. Keep probes minimal and easy to remove or gate.
- Account for timing changes from added logging, synchronous output, transport
buffering, and log overflow. Recheck the failure with reduced instrumentation
before treating the result as causal.
- Save decisive console output under `.zephyr-skills/<agent-task>/logs/` and
state which logging configuration and probes produced it.

## Guardrails

- Do not hide a failure by weakening assertions or tests.
- Stop only QEMU processes started for the task; never kill broad process
groups.
- Stop only debug servers and multiplexer sessions started for the task.
49 changes: 49 additions & 0 deletions skills/zephyr/zephyr-explore/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
# SPDX-FileCopyrightText: Copyright (c) 2026 Process Mission
# SPDX-License-Identifier: MIT
name: zephyr-explore
description: >-
Use when Zephyr source, branch history, external precedent, or design
constraints must be investigated before a decision can be made.
---

# Zephyr Explore

## Audit workflow

For every non-trivial task that writes to the workspace, choose a stable task
slug and keep agent-only records under:

```text
.zephyr-skills/<agent-task>/
├── audit.md # Baseline, decisions, evidence, verification, and gaps
├── commands.md # Redacted commands, working directories, and results
└── logs/ # Decisive build, test, runtime, or diagnostic logs
```

Keep other agent plans and temporary evidence in the same task directory. Keep
build trees and test outputs separate: honor a user-specified path, otherwise
use Zephyr-native defaults such as configured `build.dir-fmt`, `build/`, or
`twister-out/`. Record the effective paths, do not stage `.zephyr-skills/`
unless requested, and report the task directory and unresolved gaps at handoff.

## Investigate

1. Bound the question to paths, symbols, configuration, and behavior.
2. Search current source, tests, documentation, and `MAINTAINERS.yml` before
using history or external material.
3. For branch comparisons, use the user-specified target. Otherwise resolve the
configured upstream and use `git merge-base HEAD <upstream>`; report a
missing target or upstream instead of guessing.
4. Use local history when current source does not explain intent or a
compatibility constraint.
5. Consult primary external sources only when local evidence is insufficient.
6. Stop when the evidence supports the next design, review, or verification
decision.

## Report

- Separate implemented, verified, documented, inferred, and unknown behavior.
- Cite decisive paths, symbols, commits, or external revisions.
- Treat external code as precedent unless import is explicitly in scope and
license-compatible.
59 changes: 59 additions & 0 deletions skills/zephyr/zephyr-patch-review/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
# SPDX-FileCopyrightText: Copyright (c) 2026 Process Mission
# SPDX-License-Identifier: MIT
name: zephyr-patch-review
description: >-
Use when reviewing Zephyr diffs or patch stacks for correctness,
integration, coverage, reviewer boundaries, or merge readiness.
---

# Zephyr Patch Review

## Audit workflow

For every non-trivial task that writes to the workspace, choose a stable task
slug and keep agent-only records under:

```text
.zephyr-skills/<agent-task>/
├── audit.md # Baseline, decisions, evidence, verification, and gaps
├── commands.md # Redacted commands, working directories, and results
└── logs/ # Decisive build, test, runtime, or diagnostic logs
```

Keep other agent plans and temporary evidence in the same task directory. Keep
build trees and test outputs separate: honor a user-specified path, otherwise
use Zephyr-native defaults such as configured `build.dir-fmt`, `build/`, or
`twister-out/`. Record the effective paths, do not stage `.zephyr-skills/`
unless requested, and report the task directory and unresolved gaps at handoff.

## Review

1. Bound the review to an explicit base and intended behavior; separate
unrelated changes before judging the patch.
2. Inspect correctness and semantic integration, including ownership, lifetime,
locking, error paths, generated artifacts, and 32/64-bit assumptions.
3. Check the affected Kconfig, CMake, devicetree, architecture, board, SoC,
toolchain, documentation, and API-lifecycle boundaries.
4. Verify that targeted tests and logs support each behavior claim and state the
remaining coverage gaps.
5. Check patch order, reviewer-sized separation, bisectability, and applicable
SPDX and license conventions for new files.

## Ownership and precedent

- Use `MAINTAINERS.yml` for affected areas, reviewers, labels, and tests;
`CODEOWNERS` is not authoritative in this tree.
- Consult local history for unfamiliar APIs, regressions, or subsystem boundary
changes. Prefer `git log --follow`, `git log -S`, `git blame`, and `git show`.
- Query the current Gerrit change and patch-set state, or an upstream pull
request when explicitly in scope, only for merge readiness. Read current
submit, approval, and blocker policy instead of hard-coding it.
- Treat unavailable history as a gap, not evidence of a defect.

## Findings

- Report only actionable, source-backed findings, with file and line references
when available.
- Explain the failure mode, impact, and any missing or inadequate verification.
- If there are no findings, say so and list residual verification gaps.
50 changes: 50 additions & 0 deletions skills/zephyr/zephyr-safety-evidence/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
# SPDX-FileCopyrightText: Copyright (c) 2026 Process Mission
# SPDX-License-Identifier: MIT
name: zephyr-safety-evidence
description: >-
Use when planning or reviewing Zephyr safety evidence, safety requirements
traceability, certification gaps, or claims involving ASIL, ISO 26262,
IEC 61508, SIL, MC/DC, HARA, FMEA/FMEDA, tool qualification, or safety
cases.
---

# Zephyr Safety Evidence

## Audit workflow

For every non-trivial task that writes to the workspace, choose a stable task
slug and keep agent-only records under:

```text
.zephyr-skills/<agent-task>/
├── audit.md # Baseline, decisions, evidence, verification, and gaps
├── commands.md # Redacted commands, working directories, and results
└── logs/ # Decisive build, test, runtime, or diagnostic logs
```

Keep other agent plans and temporary evidence in the same task directory. Keep
build trees and test outputs separate: honor a user-specified path, otherwise
use Zephyr-native defaults such as configured `build.dir-fmt`, `build/`, or
`twister-out/`. Record the effective paths, do not stage `.zephyr-skills/`
unless requested, and report the task directory and unresolved gaps at handoff.

## Evidence workflow

1. Read the [safety guardrails](references/safety-guardrails.md) in full before
producing safety-facing output.
2. Bound the claim to a safety scope layer, owner, source baseline, and evidence
boundary.
3. Create only the artifacts the task needs: traceability, evidence, scope, or
assumptions.
4. For implementation claims, link requirements to code or configuration and
verification evidence. For product, process, or assessment claims, link the
applicable requirement, process, or assessment evidence and mark code or
test fields as not applicable or as gaps.
5. Separate facts, assumptions, human judgments, and gaps, and state what the
evidence does not prove.
6. Leave certification, risk acceptance, and scope-closure decisions to the
responsible humans and assessors.

Never treat draft or partial evidence as proof of product ASIL compliance,
IEC 61508 SIL/SC compliance, or completed certification.
Loading