Every premium and members-only resource for $9.99/month, as a no-commitment subscription. See the plans

PalateKit

Menu

Request a resource

Describe the resource you are missing in one sentence. We will email you when it is published.

0 / 280

Unlock PalateKit

Unlock everything

Plan

Paying means accepting our terms of sale.

Secure payment by Stripe. Receipts and invoices sent by email.

Welcome back

Sign in to install, download or save this resource. A free account is enough for free resources.

Write ast-grep rules v1.0.0

Use this resource to write, test and run an ast-grep rule across a repository

New

  • 423 downloads
  • 191 likes
  • 243 saves

Free

Install with the CLI

In a terminal, from the folder you want:

npx --yes palatekit@latest install ast-grep-rule-writing

With no option, the skill goes to ~/.agents/skills/; add --agent claude-code (or codex, cursor…) to target an agent.

First time: connect the CLI with

npx --yes palatekit@latest login

The agent follows five steps: understand the query, create example code, write the rule, test it on a file, then search the repository. You get a YAML rule checked against examples.

Mostly picked by

Updated November 2, 2026

Card for the “Write ast-grep rules” skill

Details

Generates with
Your agent's model
Licence
MIT

Similar resources

View all

What you get

  • AGENTS.md: rules by category, from patterns to constraints
  • references/compose-all-for-and-logic.md: combining conditions with AND; references/compose-not-for-exclusion.md: exclusions

Good fit for

  • You want to find a code pattern across a whole repository
  • Your lint rule never fires on a real example

Not for

    Tags

    • ast-grep
    • lint
    • code search
    • yaml

    About

    You say

    “Write an ast-grep rule that flags leftover console.log calls in production code.”

    Card for the “Write ast-grep rules” skill

    Skill published by pproenca under the MIT license, delivered in its original version.

    Show more

    How to use it

    1. Install the skill in your agent's skills folder
    2. Ask your agent to write, test and run an ast-grep rule across a repository
    3. Review and adjust the result

    Content preview

    Files

    • AGENTS.md70 KB
    • assets/templates/_template.md0.9 KB
    • LICENSE1.1 KB
    • metadata.json1 KB
    • NOTICE-PALATEKIT.md0.5 KB
    • README.md4.1 KB
    • references/_sections.md1.8 KB
    • references/compose-all-for-and-logic.md1.4 KB
    • references/compose-any-for-or-logic.md1.4 KB
    • references/compose-field-targeting.md3 KB
    • references/compose-has-for-children.md1.5 KB
    • references/compose-inside-for-context.md1.4 KB
    • references/compose-matches-for-reuse.md1.5 KB
    • references/compose-not-for-exclusion.md1.4 KB
    • references/compose-precedes-follows.md2.5 KB
    • references/const-kind-filter.md1.4 KB
    • references/const-not-inside-not.md1.4 KB
    • references/const-pattern-constraint.md1.3 KB
    • references/const-post-match-timing.md1.4 KB
    • references/const-regex-filter.md1.2 KB
    • references/meta-multi-match-lazy.md1.2 KB
    • references/meta-named-vs-unnamed.md1.3 KB
    • references/meta-naming-convention.md1.2 KB
    • references/meta-reuse-binding.md1.2 KB
    • references/meta-single-node.md1.2 KB
    • references/meta-underscore-noncapture.md1.4 KB
    • references/org-file-filtering.md1.4 KB
    • references/org-message-clarity.md1.5 KB
    • references/org-project-structure.md1.4 KB
    • references/org-severity-levels.md1.6 KB
    • references/org-unique-rule-ids.md1.3 KB
    • references/pattern-avoid-comments-strings.md1.1 KB
    • references/pattern-context-selector.md1.1 KB
    • references/pattern-debug-ast.md1.2 KB
    • references/pattern-kind-vs-pattern.md1.3 KB
    • references/pattern-language-aware.md1.1 KB
    • references/pattern-nthchild-matching.md1.8 KB
    • references/pattern-range-matching.md2 KB
    • references/pattern-strictness-levels.md1.4 KB
    • references/pattern-valid-syntax.md0.9 KB
    • references/perf-avoid-regex-heavy.md1.6 KB
    • references/perf-specific-patterns.md1.5 KB
    • references/perf-stopby-boundaries.md1.6 KB
    • references/perf-thread-parallelism.md1.5 KB
    • references/rewrite-meta-variable-reference.md1.3 KB
    • references/rewrite-preserve-semantics.md1.4 KB
    • references/rewrite-syntax-validity.md1.5 KB
    • references/rewrite-test-before-deploy.md1.4 KB
    • references/rewrite-transform-operations.md1.5 KB
    • references/test-edge-cases.md1.6 KB
    • references/test-playground-first.md1.5 KB
    • references/test-snapshot-updates.md1.5 KB
    • references/test-valid-invalid-cases.md1.5 KB
    • SKILL.md9.2 KB

    Origin and licence

    Listed unmodified

    Author
    pproenca
    Source
    github.com/pproenca/dot-skills/tree/cf93c57cac89d6fc3e4194686000411567f5caf3/skills/.experimental/ast-grep
    Licence
    MIT

    Notice

    « ast-grep » (pproenca, MIT) livré dans sa version d'origine : fiche en français et en anglais par PalateKit.

    User reviews

    –

    No ratings yet

    Loading reviews…

    Delete your review?

    Your rating and comment will be removed from the page.