lfx-self-serve: Skill for Claude Code

.claude/skills/lfx-review-pr/SKILL.md

lfx-review-pr is a skill for Claude Code from linuxfoundation/lfx-self-serve. It costs 256 tokens per session (4,788 once invoked), scanned A, original, MIT.

A pull-request review process for checking code against LFX architecture standards. A pull request is a proposed change set awaiting review; architecture standards are the project's rules for how its systems should be built.

In plain words
What is it for?
Use it to review an opened pull request for general code quality, project-specific rules, architecture, API contracts, protected files, and review readiness.
Why use it?
It organizes different kinds of review, checks the branch against the latest main branch, and verifies that earlier review comments were addressed.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions subagents.

This is linuxfoundation/lfx-self-serve's own configuration. It tells Claude Code how to work on lfx-self-serve itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything lfx-self-serve configures →

Reuse

Borrowing it

Nothing to install: this file belongs to linuxfoundation/lfx-self-serve. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/linuxfoundation/lfx-self-serve/main/.claude/skills/lfx-review-pr/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/linuxfoundation/lfx-self-serve

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for lfx-review-pr

README.md
[![agentmods](https://agentmods.dev/badge/skills/linuxfoundation/lfx-self-serve/lfx-review-pr.svg)](https://agentmods.dev/skills/linuxfoundation/lfx-self-serve/lfx-review-pr)
Your own site
<a href="https://agentmods.dev/skills/linuxfoundation/lfx-self-serve/lfx-review-pr"><img src="https://agentmods.dev/badge/skills/linuxfoundation/lfx-self-serve/lfx-review-pr.svg" alt="Measured on agentmods" height="20"></a>
Per session 256 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,788 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00256 $0.04788
Opus 5 $0.00128 $0.02394
Sonnet 5 $0.00051 $0.00958
Haiku 4.5 $0.00026 $0.00479

Measured 8d ago against content hash a827216a6800, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

lfx-review-pr scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/lfx-review-pr/SKILL.md · 280 lines

How it starts

The opening of the file, as written. The whole thing — 280 lines — stays where its author put it; the contents beside it link to each section on GitHub.

LFX PR Review

You are reviewing an opened pull request against LFX standards. Pre-requisite: the reviewer's HEAD must be the PR's branch — author scenarios are natural (you're already on it); external reviewers run gh pr checkout <N> first (commit/stash uncommitted work first; gh pr checkout switches branches). Phase 1 verifies this. The code audit is split across two central plugin subagents launched in Phase 2 with the canonical full-branch prompt (branch\n\nReview the branch's diff against origin/main.): lfx-skills:lfx-general-code-reviewer handles generic senior-review findings, while lfx-skills:lfx-self-serve-code-reviewer handles rule/checklist/architecture walking and upstream API contract validation. Both audit the PR branch's diff against origin/main and return markdown review reports. PR-shape sanity (including protected files) is NOT the reviewer subagents' concern — this skill body walks it in Phase 4. This skill also handles what only a post-PR skill can do: verifying that prior review comments were addressed, applying new-contributor educational tone, compiling the subagent reports into a draft review, and posting via /review only after the user explicitly approves.

Walk through each phase in order. Phases may short-circuit when their preconditions are not met (noted inline) but none should be skipped outright.


Phase 1 — Parse arguments and fetch PR metadata

Args format: <PR number> [extra instructions].

  • First token is the PR number if numeric.
  • Everything after is extra focus (e.g. "focus on backend", "check that previous comments were addressed").
  • If no PR number is provided, use AskUserQuestion to ask for one. Do not guess.

Phases 3, 4, and 5 run in parallel with the background agents (Phase 2), so the skill body must fetch its own PR metadata up front — it can't depend on the agents' fetches (which don't return until Phase 6).

gh repo view --json nameWithOwner --jq '.nameWithOwner'   # sanity check; later phases re-derive `$REPO` inline as needed

# Fetch PR metadata the skill body needs (title, body, refs, author, size, changed files):
gh pr view <N> --json title,body,headRefName,baseRefName,author,additions,deletions,files \
  > /tmp/pr-<N>-meta.json

# Pull main (used by Phase 2's `branch` mode) and the PR's actual base ref (used by
# Phase 4's rebase check — usually the same as main) + the PR head via GitHub's
# `pull/<N>/head` refspec (mirrored even for fork PRs, so subsequent `git show` reads
# work uniformly via the local ref `refs/pr/<N>/head`).
BASE_REF=$(jq -r '.baseRefName' /tmp/pr-<N>-meta.json)
git fetch origin main
[ "$BASE_REF" = "main" ] || git fetch origin "$BASE_REF"
git fetch origin "+pull/<N>/head:refs/pr/<N>/head"

# Verify HEAD points at the PR's tip commit (required so Phase 2's `branch` mode diff
# against main is the PR's diff). Compare HEAD's commit SHA to the fetched
# refs/pr/<N>/head — works whether the reviewer is on the PR's branch, on a
# differently-named local branch (gh pr checkout collisions), or in detached HEAD.
# If commits differ, external reviewers run `gh pr checkout <N>` first (commit/stash
# any uncommitted work first; `gh pr checkout` switches branches).
HEAD_CHECK=/tmp/pr-<N>-head-check.txt
rm -f "$HEAD_CHECK"
if [ "$(git rev-parse HEAD)" = "$(git rev-parse refs/pr/<N>/head)" ]; then
  echo "HEAD_OK" > "$HEAD_CHECK"
else
  echo "HEAD_MISMATCH" > "$HEAD_CHECK"
  echo "HEAD is not at the PR's tip commit. Run: gh pr checkout <N>"
  exit 1
fi

Read the full file on GitHub · 280 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 280 lines · 256 tokens per session scan A a827216a6800

Subscribe to this mod's changes

lfx-review-pr is a skill published in the GitHub repository linuxfoundation/lfx-self-serve (11 stars, last pushed today), licensed MIT. It adds 256 tokens to every session and 4,788 once invoked, about $0.0013 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.