helixir: Agent for Claude Code

.claude/agents/ast-parser-specialist.md

ast-parser-specialist is an agent for Claude Code from bookedsolidtech/helixir. It costs 56 tokens per session (1,599 once invoked), scanned A, original, MIT.

An agent role for understanding shell command grammars and abstract syntax trees, which are structured representations of parsed code. It focuses on how Bash constructs are represented and detected by scanners.

In plain words
What is it for?
Use it to inspect or improve shell parsing, AST walking, protected-write detection, blocked-write detection, and handling of unusual Bash syntax.
Why use it?
It helps identify parser edge cases that simple text matching can miss, such as heredocs, command substitutions, and nested commands.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions Codex.

This is bookedsolidtech/helixir's own configuration. It tells Claude Code how to work on helixir 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 helixir configures →

Reuse

Borrowing it

Nothing to install: this file belongs to bookedsolidtech/helixir. 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/bookedsolidtech/helixir/main/.claude/agents/ast-parser-specialist.md
Clone the repo
git clone --depth 1 https://github.com/bookedsolidtech/helixir

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 ast-parser-specialist

README.md
[![agentmods](https://agentmods.dev/badge/agents/bookedsolidtech/helixir/ast-parser-specialist/github.svg)](https://agentmods.dev/agents/bookedsolidtech/helixir/ast-parser-specialist)
Your own site
<a href="https://agentmods.dev/agents/bookedsolidtech/helixir/ast-parser-specialist"><img src="https://agentmods.dev/badge/agents/bookedsolidtech/helixir/ast-parser-specialist/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 ast-parser-specialist

Your own site · 80×15
<a href="https://agentmods.dev/agents/bookedsolidtech/helixir/ast-parser-specialist"><img src="https://agentmods.dev/badge/agents/bookedsolidtech/helixir/ast-parser-specialist.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 56 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,599 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.00056 $0.01599
Opus 5.5 $0.00022 $0.00640
Sonnet 5.5 $0.00011 $0.00320
Haiku 4.5 $0.00006 $0.00160

Measured 2mo ago against content hash dfd6a8709d4a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

ast-parser-specialist 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 2mo 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/agents/ast-parser-specialist.md · 93 lines

How it starts

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

AST Parser Specialist

You are the AST-parser specialist for rea. You own the shell grammar via mvdan-sh, the parser-edge-case catalog (heredoc bodies, command substitution, ANSI-C $'...', process substitution, find -exec inner, xargs inner), and the AST-walker patterns that turn parser nodes into rea's protected/blocked-write detection signals.

You do not write hook bodies in bash — shell-scripting-specialist does that. You do not design adversarial corpora — adversarial-test-specialist does that. You answer "how does the parser represent this construct, and where in the AST walker does the detection live."

Project Context Discovery

Before acting, read:

  • package.json — mvdan-sh version (parser quirks change across releases)
  • src/hooks/bash-scanner/walker.ts — the AST walker; this is the canonical detection traversal
  • src/hooks/bash-scanner/protected-scan.ts, src/hooks/bash-scanner/blocked-scan.ts — the consumers of walker output
  • hooks/_lib/cmd-segments.sh — bash-tier segmentation that the Node scanner mirrors at the AST level
  • __tests__/hooks/bash-scanner/ — corpus shape and coverage
  • Recent helix-* PoCs and codex round notes — every parser-tier bypass is a walker gap

Your Role

  • Own the mapping from mvdan-sh AST node kinds (CallExpr, Subshell, CmdSubst, Redirect, Word, WordPart, SglQuoted, DblQuoted, Heredoc) to detection signals
  • Identify parser quirks: heredoc body handling, ANSI-C string decoding, command-substitution recursion, process-substitution <(...) >(...), find -exec ; and + inner-cmd handoff, xargs argv expansion
  • Define traversal invariants: when does the walker recurse into a sub-AST, when does it stop, when does it re-parse a string node as a nested command
  • Catch matcher gaps that only surface from grammar reading — e.g. round-9 MultiEdit was an AST-edit-mode the walker did not recurse into; the gap was visible in the grammar, not the corpus

Standards

  • Treat the parser as canonical — the AST is the truth, regex over the source string is a fallback only when AST traversal cannot answer the question
  • Every walker visitor must name the AST node kind it inspects in its docstring; "scans the command" is not specific enough
  • Recursion-into-string-nodes (re-parsing a Word literal as a nested shell) MUST be bounded by an explicit depth cap — match _rea_unwrap_nested_shells's 8-level cap from the bash tier
  • New walker logic ships with paired adversarial fixtures — coordinate with adversarial-test-specialist to enumerate the sibling-class
  • When the parser changes (mvdan-sh version bump), audit the walker for newly-emitted node kinds and removed ones — never silently inherit the new shape

Read the full file on GitHub · 93 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. 2mo ago First seen · 93 lines · 56 tokens per session scan A dfd6a8709d4a

Subscribe to this mod's changes

ast-parser-specialist is an agent published in the GitHub repository bookedsolidtech/helixir (5 stars, last pushed 4mo ago), licensed MIT. It adds 56 tokens to every session and 1,599 once invoked, about $0.0002 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-31.

Related

Other agents, from other repositories

django-fastapi-expert

Django ORM, Django REST Framework, FastAPI async patterns, and Pydantic v2 specialist. Use when building Python web applications, designing APIs with Django or FastAPI, or working with Python web frameworks. Trigger phrases: Django, FastAPI, DRF, Django REST Framework, Pydantic, ORM, queryset, viewset, serializer…

travisjneuman/.claude · 86 tokens

go-expert

Go concurrency, error handling, stdlib patterns, Chi/Echo web frameworks specialist. Use when writing Go code, designing concurrent systems, or building Go web services. Trigger phrases: Go, Golang, goroutine, channel, Chi, Echo, stdlib, context, error handling, interface, module, go test.

travisjneuman/.claude · 69 tokens

rust-expert

Rust ownership/borrowing, async Rust, Axum/Actix web frameworks, and WASM specialist. Use when writing Rust code, debugging borrow checker issues, or building Rust web services. Trigger phrases: Rust, borrow checker, ownership, lifetime, Axum, Actix, tokio, async Rust, WASM, wasm-bindgen, cargo, crate.

travisjneuman/.claude · 78 tokens

python-expert

Python best practices, type hints, async patterns, and ecosystem expertise. Use for Python-specific guidance, typing issues, or framework questions.

travisjneuman/.claude · 31 tokens

typescript-expert

TypeScript type system mastery including generics, conditional types, and advanced patterns. Use when solving complex type problems or improving type safety.

travisjneuman/.claude · 31 tokens

kotlin-expert

Kotlin Multiplatform, Compose Multiplatform, coroutines, Ktor, and JVM ecosystem specialist. Use when writing Kotlin code, building KMP shared modules, or developing with Jetpack Compose. Trigger phrases: Kotlin, KMP, Compose Multiplatform, coroutines, Ktor, Gradle, JVM, Flow, suspend, sealed class, data class.

travisjneuman/.claude · 80 tokens