DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

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.

Short answer: Open perch.yaml in the project root, or create it; then add a rule with name, where, each, and ensure fields, as shown in the README example; run perch scan to apply the new rule. All steps.

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.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for lakeday-org/perch and "Write a custom rule for your own code standard"

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer