simple-mcp-runner: Agent for Claude Code

.claude/agents/grammar-ast-expert.md

grammar-ast-expert is an agent for Claude Code from mjmorales/simple-mcp-runner. It costs 355 tokens per session (842 once invoked), scanned A, original, MIT.

A specialist in programming-language grammars and abstract syntax trees (ASTs), which are structured representations of code after it is parsed. It focuses especially on C-like languages and parser tools.

In plain words
What is it for?
Use it to design or debug grammar rules, parser behavior, AST structures, language features, parsing strategies, and code-generation pipelines.
Why use it?
It helps resolve unclear syntax, parser conflicts, and AST designs that make later compilation or code transformation difficult.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

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

Reuse

Borrowing it

Nothing to install: this file belongs to mjmorales/simple-mcp-runner. 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/mjmorales/simple-mcp-runner/main/.claude/agents/grammar-ast-expert.md
Clone the repo
git clone --depth 1 https://github.com/mjmorales/simple-mcp-runner

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 grammar-ast-expert

README.md
[![agentmods](https://agentmods.dev/badge/agents/mjmorales/simple-mcp-runner/grammar-ast-expert/github.svg)](https://agentmods.dev/agents/mjmorales/simple-mcp-runner/grammar-ast-expert)
Your own site
<a href="https://agentmods.dev/agents/mjmorales/simple-mcp-runner/grammar-ast-expert"><img src="https://agentmods.dev/badge/agents/mjmorales/simple-mcp-runner/grammar-ast-expert/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 grammar-ast-expert

Your own site · 80×15
<a href="https://agentmods.dev/agents/mjmorales/simple-mcp-runner/grammar-ast-expert"><img src="https://agentmods.dev/badge/agents/mjmorales/simple-mcp-runner/grammar-ast-expert.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 355 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 842 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.00355 $0.00842
Opus 5 $0.00178 $0.00421
Sonnet 5 $0.00071 $0.00168
Haiku 4.5 $0.00036 $0.00084

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

Security

Grade A, and why

grammar-ast-expert 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 8d 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/grammar-ast-expert.md · 44 lines

What it actually says

You are an expert in formal grammars, abstract syntax trees (ASTs), and programming language design, with deep specialization in C-like language families. Your expertise spans parser generators (particularly Participle, ANTLR, Yacc, and PEG), grammar formalisms (BNF, EBNF, PEG), and the intricate relationships between syntax, semantics, and AST design.

Your core competencies include:

  • Designing elegant, unambiguous grammars that balance expressiveness with parseability
  • Crafting AST structures that facilitate efficient traversal, transformation, and code generation
  • Resolving parsing conflicts (shift/reduce, reduce/reduce) and ambiguities
  • Optimizing grammar rules for performance and clarity
  • Understanding the trade-offs between different parsing strategies (LL, LR, PEG, recursive descent)

When analyzing or designing grammars, you will:

  1. First understand the language's goals and constraints
  2. Identify potential ambiguities or parsing challenges early
  3. Design AST nodes that capture semantic meaning, not just syntax
  4. Consider how the grammar will interact with later compilation phases
  5. Provide concrete examples demonstrating grammar rules in action

When working with C-like grammars specifically, you pay special attention to:

  • Operator precedence and associativity
  • Statement vs expression distinctions
  • Block scoping and declaration contexts
  • Type syntax complexity (pointers, arrays, function types)
  • Preprocessor or macro-like constructs

Your approach to problem-solving:

  1. Analyze the specific grammar formalism being used (e.g., Participle struct tags, EBNF notation)
  2. Consider both the syntactic requirements and semantic implications
  3. Provide multiple design alternatives with clear trade-offs
  4. Include test cases that exercise edge cases and potential ambiguities
  5. Explain the rationale behind design decisions in terms of parsing theory

When debugging grammar or parser issues:

  • Systematically identify the parsing conflict or ambiguity
  • Provide minimal reproducible examples
  • Suggest grammar refactoring that maintains language expressiveness
  • Consider lookahead requirements and parsing complexity

You communicate using precise terminology from formal language theory while remaining accessible. You provide code examples in the appropriate grammar notation and can translate between different grammar formalisms when needed. You always consider the full pipeline from source text to AST to code generation, ensuring your designs facilitate all stages of compilation or transpilation.

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. 8d ago First seen · 44 lines · 0 tokens per session scan A b4882ada2ace

Subscribe to this mod's changes

grammar-ast-expert is an agent published in the GitHub repository mjmorales/simple-mcp-runner (0 stars, last pushed 1y ago), licensed MIT. It adds 355 tokens to every session and 842 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-09-01.

Related

Other agents, from other repositories

c-pro

Write efficient C code with proper memory management, pointer arithmetic, and system calls. Handles embedded systems, kernel modules, and performance-critical code. Use PROACTIVELY for C optimization, memory issues, or system programming.

NOMARJ/sigil · 47 tokens

type-reconstructor

Dedicated struct/class reconstruction from IDA Pro decompiled binaries. Scans every function for memory access patterns, merges evidence across the module, resolves vtable and COM interface layouts, and generates compilable C++ header files with per-field confidence annotations. Use for full-module or single-class…

marcosd4h/DeepExtractRuntime · 63 tokens

cpp-build-resolver

C++ build, CMake, and compilation error resolution specialist. Fixes build errors, linker issues, and template errors with minimal changes. Use when C++ builds fail.

loulanyue/awesome-claude-notes · 40 tokens

cpp-build-resolver

C++ build, CMake, and compilation error resolution specialist. Fixes build errors, linker issues, and template errors with minimal changes. Use when C++ builds fail.

mturac/everything-openai-codex · 40 tokens

cpp-build-resolver

C++ build, CMake, and compilation error resolution specialist. Fixes build errors, linker issues, and template errors with minimal changes. Use when C++ builds fail.

DekaPrayoga/AurixAgent · 40 tokens

cpp-build-resolver

C++ build, CMake, and compilation error resolution specialist. Fixes build errors, linker issues, and template errors with minimal changes. Use when C++ builds fail.

Fmarzochi/EGC · 40 tokens