Agent skill

Perch

by lakeday-org in lakeday-org/perch

Semantic linting with perch. An agent skill from lakeday-org/perch.

MITAuto-check passedDevelopment

Install Perch

skills CLI
$ npx skills add lakeday-org/perch --skill perch -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install lakeday-org/perch perch --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
perch
GitHub stars
348
Token cost
~2.4k tokens
SKILL.md length
1,181 words
Files
1,351 (incl. scripts)
Skills in repo
2
Repo updated
First seen
Licence
MIT

At a glance

Semantic linting with perch. An agent skill from lakeday-org/perch.

  • Verify code changes in flight
  • SKILL.md covers Scan what changed, Read the JSON, Reading a finding and Check one method, plus 5 more sections
  • Lint behavior a compiler cannot check: bugs
  • Vulnerabilities

What it does

Perch is an agent skill from lakeday-org/perch. Semantic linting with perch. Use it to verify code changes in flight. Scan a branch or a diff. Check one method right after editing it. Confirm a fix landed before opening a pull request. Use it to lint behavior a compiler cannot check: bugs, vulnerabilities, swallowed errors, and a method that does not do what its name says. Use it to act on what a scan found. Use it to check which changed lines the tests ran, and which tests are worth keeping. Use it to write rules that turn a repeated mistake into verifiable…

Its SKILL.md is about 2.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1355 other files, including scripts (for example `.github/codeql.yml`, `.github/dependabot.yml` and `.github/workflows/ci.yml`).

It sits in Development, covering Linting and formatting and Pull requests. The repository describes itself as: Semantic code linting with Decision Models. The licence is MIT.

When your agent uses it

  • Verify code changes in flight
  • Lint behavior a compiler cannot check: bugs
  • Vulnerabilities
  • Swallowed errors

Example prompts

  • “/perch”

What it can do on your machine

Read from SKILL.md and the folder at commit 0bc7e10. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/, which the agent can run.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Perch loads about 2.4k tokens when it runs. Until then it costs about 133 tokens; SKILL.md has 1,181 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~133
When it runs · the whole SKILL.md, loaded when a task matches
~2.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from lakeday-org/perch at commit 0bc7e10, republished under its MIT licence (© lakeday-org). 1,181 words, ~2,415 tokens.

Download SKILL.mdSave it as .claude/skills/perch/SKILL.md (or your agent's skills folder). This skill also uses 1350 other files; get the full folder from GitHub.
name
perch
description
Semantic linting with perch. Use it to verify code changes in flight. Scan a branch or a diff. Check one method right after editing it. Confirm a fix landed before opening a pull request. Use it to lint behavior a compiler cannot check: bugs, vulnerabilities, swallowed errors, and a method that does not do what its name says. Use it to act on what a scan found. Use it to check which changed lines the tests ran, and which tests are worth keeping. Use it to write rules that turn a repeated mistake into verifiable behavior.

perch

perch asks a model about the code in a repository. It reports what it believes, as a probability on every finding.

Scan what changed

console
$ perch scan --since origin/main
checkout.py
  ID        Line  Severity  Type    Confidence  Problem      Method
  bdc67421    14  P1 (0.8)  defect         81%  wrong_order  place_order

✖ 1 problem in 1 file, all failing
perch at commit 5e9d910: 3 methods, read 3
3 requests  10k tokens in / 2k out  $0.0004

--since <ref> covers what moved since that ref. That is what you want on a branch and in CI. --paths a,b covers named files or directories. Add --json for the full detail: perch scan --since origin/main --json.

A whole repository is hundreds of model requests. A branch is a handful. Never scan everything to check one change.

A method whose code and neighbours have not moved is skipped next run. Scanning again after a fix costs almost nothing.

Exit
0Nothing to act on.
3Something that fails was found.
1perch could not run.
2The command was typed wrong.

3 is a result rather than an error, so report what it found. Only 1 and 2 are failures.

Read the JSON

Every command takes --json. The table is rounded off for a terminal, and the JSON carries the detail.

console
$ perch issues
ID        Method             Location           Type      Kind                    Severity
05a5b5bd  scanRepository     src/scan.js:129    refactor  too_big 98%             -
b2d0885f  formatFinding      src/report.js:376  refactor  too_big 98%             -
990c94ac  scan               src/cli.js:350     refactor  too_big 92%             -

perch issues <id> --json gives one finding in full. Every question's answer carries the distribution behind it:

json
"has_bug": 0.46,
"kind": { "choice": "missing_null_handling", "probability": 0.84,
          "probabilities": { "missing_null_handling": 0.84, "wrong_return": 0.08, "boundary": 0.04 } },
"severity": { "level": "P2", "score": 1.4, "confidence": 0.38,
              "probabilities": { "0": 0.09, "1": 0.43, "2": 0.47, "3": 0.01 } }

Reading a finding

A finding is an advisory drawn from a probability and a rule. It does not locate a defect for you.

The number is belief. How bad the problem would be is a separate field. 72% means the model would say yes about seven times in ten.

Probabilities spread across several kinds mean the model is sure something is wrong and cannot say what. Say 0.4 on one kind and 0.3 on another. Read the method. Leave the label alone.

The line it points at carries its own confidence. A low one puts the problem somewhere in the method.

Expect the real problem to sit adjacent to what was reported. A missing_null_handling at 70% is often an unchecked error a few lines off.

Answers below a question's min stay out of the report and stay in the JSON. A 56% has_bug is worth a look while the report is silent about it.

Read the code before you change it. Close a finding when the code is right. Never rewrite working code to satisfy a probability.

Check one method

After a fix, ask about the thing you changed.

console
$ perch check src/store.js::openStore.scanDir
src/store.js:74  openStore.scanDir
5 checks, 0 broken.

  Also raised: does_not_do_what_it_claims 80%
2 requests  5k tokens in / 767 out  $0.0002

perch check src/store.js::openStore.scanDir --json gives the same reading in full, and an issue id works in place of a target.

This reads the file off disk, so it works on uncommitted code. It records nothing, so it will not move the numbers on the issue you are fixing. It exits 3 while something is still wrong.

Close a finding you have judged

console
$ perch close 05a5b5bd --reason "the walk is one job read top to bottom"
05a5b5bd  scanRepository  src/scan.js:129  closed  too_big

A close covers the kinds the issue was listing. A different problem found on that method later is still reported. --kind too_big closes one kind and leaves the rest open.

Always give a reason. That is what the next person reads instead of reopening it.

Check the tests a change needs

perch coverage --since main runs predictive mutation testing over the branch. It makes every mutant of every method a test reaches, from a removed call to a flipped comparison, and asks which tests would fail against each mutant. It runs no tests and reads nothing a test run wrote.

console
$ perch coverage --since main
src/cart.ts
  ID        Line  Problem   Confidence  Test or method  Note
  3945b1f7    12  survived         60%  applyDiscount   With `>` instead of `>=`, none of the 5 tests reaching it…
  d6f68653    12  survived         58%  applyDiscount   With `1` instead of `0`, none of the 5 tests reaching it …

test/cart.test.ts
  ID        Line  Problem    Confidence  Test or method              Note
  427fce7a    22  redundant         96%  applyDiscount > takes 75 …  Kills the same mutants as applyDiscount > ta…
shop at commit 861c607: 4 methods, 12 tests, 3 problems in changed code, 4 elsewhere
Report: .perch/coverage/index.html
14 requests  12k tokens in / 666 out  $0.0036

A survived mutant is a line the tests run but never check. --json gives each one in full: the finding names its mutant, and the method's mutants entry with that id has the line as written (original), as mutated (mutated), and the tests that were asked (asked). Write a test in one of those test files with an input for which the two lines give different results, and assert on the result. For if (percent >= 100) against if (percent > 100), that input is percent of exactly 100.

A redundant test kills exactly the mutants an earlier test kills: compare the two and delete one. checks_nothing kills no mutant in the code it reaches: make it assert on what that code returns. infra calls a live service: mock it.

Run perch coverage --since main again afterwards; the mutant should be gone from the list. It exits 3 while a problem remains in changed code. Close a problem with perch close <id> --reason "..." when the test is right as it is.

Show full SKILL.md (478 more words)Show less

Write a rule when a mistake repeats

The second time the same thing is corrected, write it down. Ask the user before adding a rule to their repository.

console
$ perch rules add no-silent-failure --where "src/**/*.js" --each method \
    --ensure "Errors are returned or raised. Catching one, logging it, and carrying on as though it succeeded breaks this."
Added no-silent-failure.

--where takes a glob. --each is file, method or test. --min N sets a floor for that rule alone. --gate no reports a rule without failing runs.

--ensure_absent is for a claim about the codebase as a whole. It searches the likeliest places and stops at the answer.

Rules ride in the request perch was already making about a method. Five rules on one method is one reading.

Say what breaks a rule and what satisfies it. A rule answering in the sixties about everything cannot tell anything apart. Reword it or drop it. Raising its floor until it keeps nothing is turning it off with extra steps.

perch rules list shows every rule and question in force, and whether each fails a run.

Tune a rule until it tells two things apart

A rule is a sentence put to a model, so a new one is a draft. Test it against two inputs before you trust it. One should pass. The other is a copy you broke in the way the rule is meant to catch.

perch check <path> --rules <name> reads off disk and costs a fraction of a cent, so the loop is fast.

The gap between the two readings is the rule's whole value. A rule that answers about the same on both is measuring something other than what it says.

Too broad. A file rule worded as a universal gets you there. "Every sentence is short" asks whether a counterexample exists anywhere in the file. Those odds rise with the file's length whatever the prose does. Three rules written that way over this project's docs ranked ten pages in almost exactly their line order. One page rewritten entirely in 34-word run-ons read 92%. The same page in short sentences read 88%. Four points between opposites.

Too narrow. Reworded to hunt the single longest sentence on a page, that rule caught both broken controls. It also fired 80% on a clean page. On a long page there is always some sentence to object to.

The middle. Name a bounded part of the file and judge only that. "Read the first four prose paragraphs" and "find the first block that runs a real perch command" both work. What they ask about does not grow with the page. The same three rules then read 84%, 79% and 95% against their broken controls, and passed every clean page.

Aim for a gap that wide. A pass and a fail within a few points of each other means the rule needs another pass.

Other commands

perch doctorWhether perch can run here, and what the last run asked.
perch issues --typesEverything --filter accepts.
perch --versionThe version in use.

© lakeday-org, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1,350 other files (scripts) in the repository root of lakeday-org/perch.

  • SKILL.md
  • .claude/skills
  • .github/codeql.yml
  • .github/demo.svg
  • .github/dependabot.yml
  • .github/logo-light.svg
  • .github/logo.svg
  • .github/rule-demo.gif
  • .github/workflows/ci.yml
  • .github/workflows/codeql.yml
  • .github/workflows/publish.yml
  • .github/workflows/release-please.yml
  • .gitignore
  • .perch/closed.jsonl
  • .perch/rules/billing.yaml
  • .perch/rules/cloud.yaml
  • … and 1,335 more

Open the folder on GitHubat commit 0bc7e10

Compare with similar skills

Perch next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Perch compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Perch this skilllakeday-org/perch348—~2.4kAutomated safety check: PassMIT
Babysit PR To Pass CIsgl-project/sglang37k2 repos~3kAutomated safety check: PassApache-2.0
Changesetbiomejs/biome26k—~839Automated safety check: PassApache-2.0
Pre Pipeline Reviewsuperplanehq/superplane7.7k—~1.2kAutomated safety check: PassCustom licence
Lint Commit PRTresjs/tres3.8k—~1.1kAutomated safety check: PassMIT
PR Pushicebear0828/codex-proxy1.8k—~2.2kAutomated safety check: NotesCustom licence

Similar skills

  • Babysit PR To Pass CI

    sgl-project/sglang

    Start and persistently pursue a goal to babysit an SGLang pull request until selected GitHub Actions workflows pass on the latest PR head.

    37k GitHub starsUsed in 2 repos~3k tokens
    DevelopmentAuto-check passed
  • Changeset

    biomejs/biome

    Official

    A skill your agent uses when a Biome change may affect users and you must decide whether it needs a changeset, choose the release level, or create and edit .changeset/.md release-note text.

    26k GitHub stars~839 tokensUpdated today
    DevelopmentAuto-check passed
  • Pre Pipeline Review

    superplanehq/superplane

    Reviews SuperPlane code changes for correctness and reuse, then runs fast Make targets (lint, format, build) that Semaphore CI runs so easy checks do not fail in the pipeline.

    7.7k GitHub stars~1.2k tokensUpdated today
    DevelopmentAuto-check passed
  • Lint Commit PR

    Tresjs/tres

    Lint local changes, auto-fix, conventional commit, and optionally create PR

    3.8k GitHub stars~1.1k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • PR Push

    icebear0828/codex-proxy

    Package the current working changes into a standards-compliant codex-proxy pull request: branch hygiene, commit message linting, CHANGELOG prompt, conventional commit, push, and gh pr create against…

    1.8k GitHub stars~2.2k tokensUpdated today
    DevelopmentAuto-check: notes
  • PR Push

    icebear0828/codex-proxy

    Package the current working changes into a standards-compliant codex-proxy pull request: branch hygiene, commit message linting, CHANGELOG prompt, conventional commit, push, and gh pr create against…

    1.8k GitHub stars~2.3k tokensUpdated today
    DevelopmentAuto-check: notes

More from lakeday-org/perch

  • Perch

    lakeday-org/perch

    Semantic linting with perch. An agent skill from lakeday-org/perch.

    348 GitHub stars~1.9k tokensUpdated today
    Auto-check passed

Categories

Questions about Perch

What does Perch do?

Semantic linting with perch. An agent skill from lakeday-org/perch. Perch is an agent skill from lakeday-org/perch. Semantic linting with perch.

When should I use Perch?

Perch fits situations like: verify code changes in flight; lint behavior a compiler cannot check: bugs; vulnerabilities; swallowed errors.

How do I install Perch in Claude Code?

Run `npx skills add lakeday-org/perch --skill perch -a claude-code`. Or copy the skill folder (the lakeday-org/perch repository) into .claude/skills/perch in your project. Claude Code loads it when a task matches its description.

How do I install Perch in Codex?

Run `npx skills add lakeday-org/perch --skill perch -a codex`. Or copy the skill folder (the lakeday-org/perch repository) into .agents/skills/perch in your project. Codex loads it when a task matches its description.

Can I use Perch in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add lakeday-org/perch --skill perch -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/perch, .gemini/skills/perch, .github/skills/perch and .opencode/skills/perch in your project.

What does Perch need to run?

SKILL.md names no scripts, command-line tools or credentials: Perch is instructions for the agent only.

Does Perch access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Perch safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Perch use?

Perch is published under the MIT licence (from the LICENSE file in the skill folder). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Perch use?

About 2.4k tokens (SKILL.md is roughly 9.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Perch?

Skills that share tags, products or a category with Perch: Babysit PR To Pass CI (sgl-project/sglang, 37k stars), Changeset (biomejs/biome, 26k stars), Pre Pipeline Review (superplanehq/superplane, 7.7k stars) and Lint Commit PR (Tresjs/tres, 3.8k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Perch?

lakeday-org (a GitHub organization) maintains it in lakeday-org/perch, which has 348 GitHub stars. The repository holds 2 skills in this directory. The repository was last updated on October 9, 2026.

Source: lakeday-org/perch on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.