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.
curl -O https://raw.githubusercontent.com/aimasteracc/tree-sitter-analyzer/main/.claude/skills/tsa-refactor-queue/SKILL.mdgit clone --depth 1 https://github.com/aimasteracc/tree-sitter-analyzerWrote 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.
[](https://agentmods.dev/skills/aimasteracc/tree-sitter-analyzer/tsa-refactor-queue)<a href="https://agentmods.dev/skills/aimasteracc/tree-sitter-analyzer/tsa-refactor-queue"><img src="https://agentmods.dev/badge/skills/aimasteracc/tree-sitter-analyzer/tsa-refactor-queue/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.
<a href="https://agentmods.dev/skills/aimasteracc/tree-sitter-analyzer/tsa-refactor-queue"><img src="https://agentmods.dev/badge/skills/aimasteracc/tree-sitter-analyzer/tsa-refactor-queue.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00265 | $0.03286 |
| Opus 5.5 | $0.00106 | $0.01314 |
| Sonnet 5.5 | $0.00053 | $0.00657 |
| Haiku 4.5 | $0.00026 | $0.00329 |
Grade A, and why
tsa-refactor-queue 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 1mo 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.
How it starts
The opening of the file, as written. The whole thing — 306 lines — stays where its author put it; the contents beside it link to each section on GitHub.
tsa-refactor-queue — Top-N prioritized refactor slices
Three signals, one ranked list. Health × churn × dead-code → the five files you'd refactor first if you had a week. Each row carries a target symbol, a blast radius, and a concrete action.
When to use
- "What should we refactor next?" — daily/weekly engineering triage
- Post-feature cleanup pass — find rot that accumulated while shipping
- Pre-sprint planning — turn "we should clean up" into 5 concrete tickets
- After a CI grade-drop alert from
tsa-health-watch— re-rank with churn
Don't use when:
- You already know the file (one-file deep dive →
health action=fileortsa-edit-safety) - The codebase is brand-new (<2 weeks of git history) — churn signal is noise
- You want to optimize one hot function — use
tsa-graph+edit action=refactordirectly - Shallow clone in CI —
git_state=shallowmakes mod_count_30d unreliable
Procedure
Step 0 — Try the one-call route first (RFC-0027 §L8)
The three-signal join and the Step 2 formula now live in code:
health action=refactor_queue top_n=5 # MCP
uv run python -m tree_sitter_analyzer --refactor-queue --refactor-queue-top-n 5 # CLI
It returns the ranked rows directly (rank, file_path, grade,
weakest_dimension, churn_30d, dead_symbols, total_symbols, priority,
action) and echoes the formula it used. If it answers
status=CHURN_UNAVAILABLE, the AST index has no 30-day churn — build the index
and retry rather than hand-computing zeros.
Fall through to Steps 1-4 below only when you need signals the action does not
carry (e.g. the heatmap view, or a per-candidate blast radius).
Step 1 — Single fan-out (parallel, 3 MCP calls)
Call these in ONE message:
health action=projectwithmin_grade: "D"andmax_files: 20— F/D files + per-fileweakest_dimensionhealth action=deadwithmax_dead: 200— symbol-level dead candidates, grouped by filehealth action=heatmapwithtop_n: 20— complexity-weighted file list (covers structural smell)
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.
- 1mo ago Changed · +25 lines faf036e536aa
- 2mo ago First seen · 281 lines · 265 tokens per session scan A 322a12e7604c
tsa-refactor-queue is a skill published in the GitHub repository aimasteracc/tree-sitter-analyzer (61 stars, last pushed today), licensed MIT. It adds 265 tokens to every session and 3,286 once invoked, about $0.0011 per session on Opus 5.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.
Other skills, from other repositories
plan-eng-review
Eng manager-mode plan review. Lock in the execution plan — architecture, data flow, diagrams, edge cases, test coverage, performance. Walks through issues interactively with opinionated recommendations. Use when asked to "review the architecture", "engineering review", or "lock in the plan". Proactively suggest when…
memstack-development-code-reviewer
Use this skill when the user says 'review code', 'code review', 'check my code', 'audit this', 'review PR', 'review changes', 'what's wrong with this', or is requesting a structured review of code quality, security, performance, or maintainability. Do NOT use for refactoring plans or test generation.
autoplan
Auto-review pipeline — reads the full CEO, design, eng, and DX review skills from disk and runs them sequentially with auto-decisions using 6 decision principles. Surfaces taste decisions (close approaches, borderline scope, codex disagreements) at a final approval gate. One command, fully reviewed plan out. Use when…
pre-landing-review
Pre-landing PR review. Analyzes diff against the base branch for SQL safety, LLM trust boundary violations, conditional side effects, and other structural issues. Use when explicitly asked for the specialized pre-landing workflow. Product /review requests are handled by OpenBitFun's unified Review mechanism instead.…
shard
Use when the user says 'shard this', 'split file', or when working with files over 1000 lines.
pr-review-canvas
Create a OpenBitFun Canvas for reviewing a pull request, branch diff, or change set with Cursor-style diff cards, review maps, risk callouts, and focused reviewer flow. Use when the user asks for a PR review canvas, diff walkthrough, change-set overview, or visual review summary.