tree-sitter-analyzer: Skill for Claude Code

.claude/skills/tsa-pr-review/SKILL.md

tsa-pr-review is a skill for Claude Code from aimasteracc/tree-sitter-analyzer. It costs 354 tokens per session (2,980 once invoked), scanned A, original, MIT.

A code-change review workflow that uses the program structure, dependency relationships, and architecture rules to judge a pull request or local diff.

In plain words
What is it for?
Use it to review local changes, staged changes, branch differences, GitHub pull requests, or CI checks. It produces a risk assessment and a BLOCK, REVIEW, or APPROVE decision.
Why use it?
It shows which changed functions affect other code and identifies the exact test command needed before merging, instead of relying only on a general reading of the diff.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions CLAUDE.md.

This is aimasteracc/tree-sitter-analyzer's own configuration. It tells Claude Code how to work on tree-sitter-analyzer itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything tree-sitter-analyzer configures →

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /Users/aisheng.yu/git-private/tree-sitter-analyzer.

Reuse

Borrowing it

Nothing to install: this file belongs to aimasteracc/tree-sitter-analyzer. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/aimasteracc/tree-sitter-analyzer/main/.claude/skills/tsa-pr-review/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/aimasteracc/tree-sitter-analyzer

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for tsa-pr-review

README.md
[![agentmods](https://agentmods.dev/badge/skills/aimasteracc/tree-sitter-analyzer/tsa-pr-review/github.svg)](https://agentmods.dev/skills/aimasteracc/tree-sitter-analyzer/tsa-pr-review)
Your own site
<a href="https://agentmods.dev/skills/aimasteracc/tree-sitter-analyzer/tsa-pr-review"><img src="https://agentmods.dev/badge/skills/aimasteracc/tree-sitter-analyzer/tsa-pr-review/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for tsa-pr-review

Your own site · 80×15
<a href="https://agentmods.dev/skills/aimasteracc/tree-sitter-analyzer/tsa-pr-review"><img src="https://agentmods.dev/badge/skills/aimasteracc/tree-sitter-analyzer/tsa-pr-review.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 354 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,980 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00354 $0.02980
Opus 5 $0.00177 $0.01490
Sonnet 5 $0.00071 $0.00596
Haiku 4.5 $0.00035 $0.00298

Measured 9d ago against content hash 110c6530a359, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

tsa-pr-review scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/tsa-pr-review/SKILL.md · 288 lines

How it starts

The opening of the file, as written. The whole thing — 288 lines — stays where its author put it; the contents beside it link to each section on GitHub.

tsa-pr-review — AST-grounded PR review with merge-gate verdict

Replaces "LLM reads the diff and guesses" with a deterministic pipeline that grounds the review in (a) the AST diff, (b) the persisted call graph, and (c) architectural-constraints.yml. Output is a structured verdict an agent can act on — including the exact pytest command to run before merge.

When to use

  • Local diff review: unstaged, staged, or branch-vs-main
  • GitHub PR review by URL (uses gh under the hood)
  • CI / agent pre-merge gate
  • Any time a generic "read the diff" review would be too shallow

Don't use when:

  • The diff is a one-line typo in a comment or doc
  • The change is in a file with no AST coverage (e.g. binary, image, .lock)
  • You only need to describe the diff, not judge it → use plain git diff

Why this beats a generic LLM diff-read

Concern LLM-only diff read tsa-pr-review
Classify signature vs body change Heuristic edit action=pr AST diff
Exact tests to run Invented / hallucinated edit action=impact verification_command
Caller blast radius Grep guess nav action=callers from persisted graph
Callee regression surface Read N files nav action=callees from persisted graph
Architecture rule violations None edit action=constraints vs YAML rules
Per-file pre-merge verdict Subjective edit action=safe SAFE/REVIEW/CAUTION/UNSAFE
Behaviour on Python 3.14 n/a Stable (grep-ast crashes, cgc silent-0)

(Source: docs/internal/COMPETITOR_HEAD_TO_HEAD_2026-05-23.md — the 4 fault-tolerance advantages: oracle-consistent AST, indexed-not-silent, Python 3.14-safe, no external DB dependency.)

Read the full file on GitHub · 288 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 288 lines · 354 tokens per session scan A 110c6530a359

Subscribe to this mod's changes

tsa-pr-review is a skill published in the GitHub repository aimasteracc/tree-sitter-analyzer (49 stars, last pushed today), licensed MIT. It adds 354 tokens to every session and 2,980 once invoked, about $0.0018 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

go-testing

Trigger: Go tests, go test coverage, Bubbletea teatest, golden files. Apply focused Go testing patterns.

Gentleman-Programming/gentle-ai · 26 tokens

memstack-development-test-writer

Use this skill when the user says 'write tests', 'add tests', 'test coverage', 'unit tests', 'integration tests', 'component tests', 'mocking', 'edge cases', or needs to generate tests with proper mocking and edge case coverage. Do NOT use for refactoring plans or database migrations.

cwinvestments/memstack · 70 tokens

coverage

Compute code coverage for active track or module. Targets 95%+ coverage with report and justification for uncovered lines. Complements TDD workflow.

drafthq/draft · 31 tokens

improving-tests

Improve test design, speed, and coverage with behavior-focused tests, useful seams, characterization tests, TDD, and test refactoring. Use when improving tests, optimizing slow suites, adding coverage, refactoring brittle tests, removing test waste, or working test-first. NOT for fixing production bugs (use…

alexei-led/cc-thingz · 89 tokens

write-unit-tests

Write comprehensive unit tests with proper setup, assertions, and coverage of happy paths, edge cases, and error scenarios.

andresharpe/dotbot · 26 tokens

write-tests

Write tests for existing production code. Processes ONE file at a time through a full pipeline: analyze, inventory (frozen BEFORE writing), write, executable coverage gate, verify, blind coverage audit, adversarial review, log. Uses CodeSift for discovery and analysis when available. Modes: [path] (specific target)…

greglas75/zuvo · 87 tokens