the signals and their derived score are provisional and subject to change.
validate manually before sharing.
b1043d68be188ad27ea72a14e160140e30e589f03a7ef6b0b8bd6 months agoCo-Authored-By: Claude Opus 4.7 <noreply@anthropic.com># TinyUSB Agent Instructions
TinyUSB is a cross-platform USB Host/Device stack for embedded systems: memory-safe (no dynamic allocation) and thread-safe (ISR events deferred to task context).
Reference these instructions first; fall back to search/bash only when reality diverges.
## Behavioral Guidelines
Bias toward caution over speed. For trivial tasks, use judgment.
- **Think first** — state assumptions; ask if unclear; present alternatives instead of picking silently.
- **Simplicity** — no featu---
name: pvs
description: Use when running PVS-Studio static analysis (SAST + MISRA C:2023 / C++:2008) on TinyUSB for a given board. Builds the examples with an exported compile_commands.json, runs pvs-studio-analyzer against .PVS-Studio/.pvsconfig, and emits readable + SARIF output.
---
# PVS-Studio Static Analysis
`run_pvs.sh <BOARD>` builds all examples for the board (with
`compile_commands.json` exported), runs `pvs-studio-analyzer` against
`.PVS-Studio/.pvsconfig`, then writes `pvs-<board>.log` and ---
name: hil
description: Use when running TinyUSB Hardware-in-the-Loop (HIL) tests on physical boards, debugging HIL failures, or copying firmware to the ci.lan test rig. Covers per-host config selection (htpc uses local.json, ci uses tinyusb.json), local execution on either htpc or ci, remote execution over SSH from htpc, and debugging tips.
---
# Hardware-in-the-Loop (HIL) Testing
Run TinyUSB HIL tests on real boards. **Run `hostname` first** — it tells you which host you are on, which determines th---
name: code-size
description: Use when comparing TinyUSB code size between a base ref (master by default) and the current branch to evaluate the size impact of changes. Three granularities — single example on one board (with optional bloaty), all examples on one board, or all examples across CI families combined.
---
# Code Size Comparison
Compare TinyUSB code size between a base ref (default `master`) and the current branch using `tools/metrics_compare_base.py`. Three granularities — pick the narrAGENTS.md# Repository setup
* Main branch is called `private`
* We do rebase-merges for the PRs. The user needs to manually squash fixup commits after approving, before merging.
# Coding style and contribution guidelines
@../doc/contributing.md
# Review instructions
* Always review commit-by-commit
* Don't report whitespaces/formatting issues. Clangd should take care of that.
name: Claude Code Review
on:
pull_request:
# opened/reopened/ready_for_review -> first auto review
# synchronize -> auto re-review on new pushes
#
# NOTE: pull_request (not _target) means fork PRs get a read-only GITHUB_TOKEN
# and NO repository secrets (CLAUDE_CODE_OAUTH_TOKEN), so they cannot be
# auto-reviewed. The job condition below skips them cleanly -> use @claude on
# those. Same-repo branches (yours or write-access contributors) auto-review.
tname: Claude Code
on:
issue_comment:
types: [created]
pull_request_review_comment:
types: [created]
issues:
# only "opened" — an issue's author_association gates the summon below;
# "assigned" would gate on the issue author, not the assigner, so a
# maintainer assigning an outsider's issue would be wrongly skipped.
types: [opened]
pull_request_review:
types: [submitted]
jobs:
claude:
# Only trusted actors (repo owner/member/collaborator) may summon @claude, so tnone