DEDUPED Hot AI repos, turned into use cases Get 5 a day

How to write a custom rule for your own code standard with Perch

Add a plain-English rule to Perch.yaml so Perch checks a practice your team cares about.

Who it is forA team lead who has a house rule, such as keeping secrets out of logs, that generic linters do not check.

The problemBuilt-in checks do not cover every team standard, and a written rule is easy to forget in review.

The outcomeA committed rule in Perch.yaml that Perch applies to matching files on every scan.

What you need first

  • Node.js with npm, to install the @lakeday/perch package
  • A Perch Cloud account, created by running perch login (the first $5 is free)
  • A project folder with source code to scan

Steps

  1. Open perch.yaml in the project root, or create it
  2. Add a rule with name, where, each, and ensure fields, as shown in the README example
  3. Run perch scan to apply the new rule
  4. Run perch issues to review what the rule found
  5. Commit perch.yaml so the rule applies to the team

Prompt for your agent

In the perch repo at <project path>, add a rule named private-logs to perch.yaml with where set to src/**/*.ts, each set to method, and ensure set to 'Keep passwords and access tokens out of logs.' Run `perch scan`. Verify that the scan output includes findings from this rule.

Caveat. Rule syntax beyond the README example (such as `sees` and `min`) is documented elsewhere, so this example covers only the basic fields.

Share: X LinkedIn Hacker News Email Copy link

Disclaimer

Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked "Seen in the wild", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email [email protected] and we will look at it promptly. Full disclaimer page