ast-grep vs Semgrep: which should you use?

Use ast-grep for fast structural search, rewrites and custom lint rules in your own code. Use Semgrep when you need security rules or matches that follow imports and aliases. Both engines are free. In my run on 2,473 Python files, Semgrep found a call ast-grep missed, and ast-grep was about five times faster.

Updated December 1, 2026

A warm wave of orange and red light over deep blue

Put your code on continuous maintenance.

Scan a public repository now, or give your agent one line.

See how out of date your code is.

Any public GitHub repository. No sign-in.

Tell your agent what changed since it was trained.

claude mcp add --transport http since https://api.since.dev/mcp

Codex, Cursor and any MCP client use https://api.since.dev/mcp.