agentleFS
coredevicescoredevices/PebbleOS/.agents/skills/pr-review/SKILL.md

pr-review

Skill1.5k starsChanged 3 days agoApache-2.0View on GitHub

Use when reviewing a PebbleOS pull request (number, URL or branch). Checks contribution policy first (big AI-assisted PRs, hardware proof, UX media, tests), runs a security analysis on syscall changes, then reviews the code.

195 other projects use a version of this.

Trending

More talk lately.about the whole repository

Dec 2025: 1 mentionJan 2026: 1 mentionFeb 2026: 2 mentionsMar 2026: 2 mentionsApr 2026: 6 mentionsMay 2026: 4 mentionsJun 2026: 5 mentionsJul 2026: 9 mentionsAug 2026: 2 mentionsSep 2026: 4 mentionsOct 2026: 11 mentionsNov 2026: 2 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the coredevices/PebbleOS repository that our weekly crawl found. There is no adoption data for this file yet.

Most recently taken up by

Who's talking about coredevices/PebbleOS

The biggest 5 of 51 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 51

Talked about on GitHub and Hacker News (51 times).

On GitHub · 50

45 more on GitHub

On Hacker News · 1

Used with

Projects with it also use oss-pr, pr-automation and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • CES-LtdSkill

    oss-pr

    Use when creating a pull request, after committing changes, or when user invokes /oss-pr. Covers branch management, quality checks, commit, push, and PR creation.

    Also in 3 projects that use this

  • CES-LtdSkill

    pr-automation

    PR Automation Orchestrator: poll open PRs, check CI, run review, fix, and merge eligible PRs. Use when: (1) Invoked by daemon via scripts/pr-automation.sh, (2) User says "/pr-automation".

    Also in 3 projects that use this

  • jtenniswoodSkill

    expert-reset

    Reimagine this repository from first principles using the current product and user experience as the target. Use when the user says "/expert-reset", asks how the project should be rebuilt if starting again, wants bold architecture or component-structure recommendations, or wants a research-only reset plan unconstrained by current implementation details.

    Also in 3 projects that use this

  • jtenniswoodSkill

    updates

    Summarize user-facing project updates from the last 7 days, ordered by importance and written as one-sentence "Feature: description" entries. Use when the user says "/updates", asks what changed recently, or wants a concise list of recent features, device support, fixes that users will notice, or other product value.

    Also in 3 projects that use this

  • openchamberSkill

    clack-cli-patterns

    Use when creating or modifying OpenChamber CLI commands, prompts, terminal output, non-TTY behavior, `--quiet`, or `--json` behavior.

    Also in 3 projects that use this

  • openchamberSkill

    drag-to-reorder

    Use when implementing or modifying OpenChamber sortable or drag-to-reorder behavior, especially `@dnd-kit`, touch/mobile interactions, variable-width items, or wrapping layouts.

    Also in 3 projects that use this

  • +6 more from openchamber
  • Other versions195 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 195

    1. Significant-Gravitas/AutoGPT★ 188ksame name
    2. pytorch/pytorch★ 106ksame name
    3. rtk-ai/rtk★ 87ksame name
    4. saadeghi/daisyui★ 43ksame name
    5. rustfs/rustfs★ 36ksame name
    6. dotnet/maui★ 23ksame name
    7. NVIDIA/Megatron-LM★ 18ksame name
    8. MiniMax-AI/skills★ 14ksame name
    9. btriapitsyn/openchamber★ 13ksame name
    10. openchamber/openchamber★ 13ksame name

    185 more not listed

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository3 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

8 rules. 0 are common, 6 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 179 edited versions we read keep these.

  • 6

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before reading the code, decide whether the PR is big, AI-assisted and not authored by a maintainer:

    line 25
  2. Distinctive:

    Check the PR and linked issues for prior agreement with a maintainer.

    line 34
  3. Distinctive:

    If all three hold and there is no prior agreement, stop.

    line 36
  4. Very specific:

    Run this whenever the PR adds or changes a PBL_SYSCALL/DEFINE_SYSCALL, an applib function that reaches the kernel, exported_symbols.json, …

    line 70
  5. Very specific:

    Every pointer argument uses the right kind (IN/OUT/*_BUF/ *_ARRAY/STR/STRN).

    line 77
  6. Distinctive:

    Check out the branch (use a git worktree.

    line 108
  7. Distinctive:

    Lifecycle: every exit path (stop, app kill, disconnect, phone app death, failed transfer, timeout) releases what start acquired.

    line 116
  8. Distinctive:

    Only report findings you can back with a concrete scenario: inputs or a sequence of events, and what goes wrong.

    line 152

“Common” is measured: kept by at least 6 in 10 of the 179 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Reviewing a PebbleOS pull request

The rules being enforced live in docs/community/contributing.md and docs/development/conventions.md; read them before starting. This skill says how to apply them, and what maintainers repeatedly catch in review.

1. Gather

gh pr view N --json number,title,author,body,labels,files,additions,deletions,commits,isDraft
gh pr diff N
gh pr view N --comments            # earlier review rounds, author replies
gh api repos/coredevices/pebbleos/pulls/N/comments   # inline threads

Maintainers are the owners in .github/CODEOWNERS.

2. Gate: big AI-assisted pull requests

Before reading the code, decide whether the PR is big, AI-assisted and not authored by a maintainer:

  • AI-assisted: an Assisted-by: LLM trailer, a leftover tool trailer (Co-Authored-By: <model>), a "Generated with ..." line in the body, or the usual tells (verbose comments restating the commit message, a long templated PR body, many near-duplicate code paths).
  • Big: more than 1000 changed lines (ignore goldens, generated files and vendored code), or changes to multiple unrelated areas.
  • Check the PR and linked issues for prior agreement with a maintainer.

If all three hold and there is no prior agreement, stop. Report the size, the AI signals and the policy line ("Big pull requests are not allowed ... unless previously agreed with the maintainers"), and ask the user whether to review anyway. Only continue if they say so.

3. Policy checks

Report each missing item; none of these needs reading the code.

  • Hardware proof for low-level changes: anything matched by pending:hw-validation in .github/labeler.yml (drivers, kernel, soc, Bluetooth, HALs, NimBLE), plus power management, flash/storage and connectivity code elsewhere. Logs, scope/logic captures or measurements from a named board. QEMU runs or "it builds" do not count.
  • Power impact where the change can affect it (sleep, wake-ups, radios, timers, sensors, display refresh): numbers from a power meter or battery logs, ideally A/B against main.
  • UX media: user-visible changes carry screenshots or a video; changes to an existing screen show before and after. Check every affected shape (rect/round, colour/B&W, touch/buttons) is covered or argued irrelevant. No AI-generated images, icons or SVGs.
  • Tests: new behaviour has unit tests or integration tests (docs/development/tests/). Test the API, not the implementation.
  • Commits: area: description matching git log for those files; one logical change each, bisectable; no fixups or reverts of something added in the same PR; Signed-off-by matching the author; Assisted-by: LLM where AI was used and no tool/vendor names. Run gitlint --commits upstream/main..HEAD on the checked-out branch.
  • Scope: unrelated drive-by changes split out; English only.
  • Cross-repo: changes needing a phone (CoreApp) side or a submodule PR link to it; submodule SHAs point at merged commits.

4. Syscall and trust-boundary security analysis

Run this whenever the PR adds or changes a PBL_SYSCALL/DEFINE_SYSCALL, an applib function that reaches the kernel, exported_symbols.json, or code parsing data from the phone/BLE. Read docs/sdk/exporting.md and include/pbl/kernel/syscall.h first.

Syscalls — assume the caller is a hostile app or watchface:

  • Every pointer argument uses the right kind (IN/OUT/*_BUF/ *_ARRAY/STR/STRN); nothing is declared VAL that is then dereferenced. Lengths and counts come from the same checked argument.
  • New syscalls use PBL_SYSCALL, never DEFINE_SYSCALL (only the ones in pebble/syscall/legacy_syscalls.txt may).
  • Non-copied buffers (*_BUF, *_ARRAY, STR) are app memory the app can change: no check-then-use on their contents (TOCTOU); copy first.
  • Ownership checks the kinds cannot express go in the body under from_user: handles, sessions and IDs belong to the caller, the caller is in the foreground when that matters.
  • Enum and index arguments are range-checked, including values the internal API accepts but apps must not (e.g. a new enum value placed before ...Count silently becoming app-reachable).
  • No PBL_ASSERT/PBL_ASSERTN reachable from app input: an app must not be able to reset the watch.
  • Integer overflow in size arithmetic; int16 coordinate wraparound in rects/points from app memory.
  • Nothing kernel-private leaks back: kernel pointers, uninitialised padding in OUT structs, other apps' data.
  • Resource exhaustion: kernel heap allocations, timers, flash writes or events an app can trigger in a loop; freed on every stop/kill path.
  • Blocking, locks and flash I/O inside the body, and on which task.
  • SDK side: exported_symbols.json revision bumped, declarations still C99, pending:sdk-review applies.

Phone/BLE input: records, blob DB entries and protocol messages are range-checked before they reach cron, UI, persistence or array indexing; size checks alone are not enough.

5. Code review

Check out the branch (use a git worktree; the main tree may be switching branches), build the affected board and run the affected tests. Then look for what review rounds on this repo keep finding:

  • Concurrency: lock-order inversions (including bt_lock, driver mutexes), event_put() or blocking sends while holding a lock, heavy work on timer tasks, state published before it is fully set up, unlocked reads of shared state.
  • Lifecycle: every exit path (stop, app kill, disconnect, phone app death, failed transfer, timeout) releases what start acquired; stale callbacks/session IDs from a previous run are rejected.
  • Persistence and sync: persisted or synced structs have a fixed layout (uint8_t not enums/bool); migrations run once, handle default and partially customised values, and don't change semantics silently; legacy keys stay in sync in both directions with old phone apps; flash wear from frequent writes.
  • Compatibility: old apps (SDK revisions, legacy framebuffer sizes), old phones, older firmware peers; capability bits gate new protocol fields.
  • Platforms: B&W vs colour (PBL_COLOR/PBL_BW), round displays, rotation, touch, boards without the hardware (Kconfig capabilities, not stubs or CONFIG_BOARD_* checks).
  • Cost: permanently resident RAM (.bss) for features that are rarely active, stack use on small task stacks, extra flash reads on hot paths, scans on every DB change.
  • Error handling: int 0/-errno with early return; errors mapped to the right public meaning (a transient ENOMEM is not "unsupported"); retries have backoff or a cap.
  • Dead and duplicate code: APIs left with only test callers, unused resources, chains no longer invoked, the same gate or state machine written twice.
  • Product fit: duplicates an existing setting, or a design maintainers already prefer; new settings default to the old behaviour.
  • i18n: user-visible strings reachable by extraction (pbl_i18n_noop), strncpy with translated text NUL-terminated.
  • Tests: catch the bug they claim to (no pass-by-construction, e.g. swapped memset arguments); cover the case actually fixed, not a neighbouring one.
  • Style: comments short, no rationale that belongs in the commit message, no issue references in code; naming per conventions; logging levels per CLAUDE.md.

6. Verify, then report

Only report findings you can back with a concrete scenario: inputs or a sequence of events, and what goes wrong. Reproduce where cheap (unit test, QEMU, a quick patch). Drop anything speculative.

Report to the user first. Post to the PR only when the user asks, and only the findings they kept: the comments are for the author, written as the user's own review. Never reply to other AI review comments or bot threads on the PR, and never post on your own pull request; there, fix the confirmed bugs instead.

  • One summary line: verdict, and which findings block merging.
  • Policy gaps from section 3.
  • Findings ranked most severe first, each with file:line, the scenario and a suggested fix. Mark minor ones nit:; mark issues the PR did not introduce as pre-existing.
  • On a re-review, go through each earlier thread and say whether it is fixed in the new head, quoting the commit SHA reviewed.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.