How_to_implment_PL_in_Antlr4: Command for Claude Code

.claude/commands/ga.md

ga is a command for Claude Code from whtoo/How_to_implment_PL_in_Antlr4. It costs 15 tokens per session (922 once invoked), scanned A, original, BSD-3-Clause.

A Git command for selecting files to place in Git's staging area, the list of changes prepared for the next commit. It can match files by project area, document or test type, or filename pattern.

In plain words
What is it for?
Use it to stage all changes, a named project area, documentation, tests, or files such as Java or Markdown files.
Why use it?
It avoids manually selecting each changed file and shows the matching files for confirmation before staging them.

Command for Claude Code

Written for Claude Code: installed under .claude/.

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

Reuse

Borrowing it

Nothing to install: this file belongs to whtoo/How_to_implment_PL_in_Antlr4. 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/whtoo/How_to_implment_PL_in_Antlr4/main/.claude/commands/ga.md
Clone the repo
git clone --depth 1 https://github.com/whtoo/How_to_implment_PL_in_Antlr4

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 ga

README.md
[![agentmods](https://agentmods.dev/badge/commands/whtoo/how_to_implment_pl_in_antlr4/ga.svg)](https://agentmods.dev/commands/whtoo/how_to_implment_pl_in_antlr4/ga)
Your own site
<a href="https://agentmods.dev/commands/whtoo/how_to_implment_pl_in_antlr4/ga"><img src="https://agentmods.dev/badge/commands/whtoo/how_to_implment_pl_in_antlr4/ga.svg" alt="Measured on agentmods" height="20"></a>
Per session 15 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 922 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.00015 $0.00922
Opus 5 $0.00008 $0.00461
Sonnet 5 $0.00003 $0.00184
Haiku 4.5 $0.00002 $0.00092

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

Security

Grade A, and why

ga 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 3d 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/commands/ga.md · 129 lines

What it actually says

Git Add 快速命令

命令用途

智能暂存文件,支持按模式自动识别并暂存相关文件。

使用方式

/ga [文件模式]

参数说明

模式选项

  • all / . - 暂存所有修改
  • ep{NN} - 暂存指定EP的所有修改(例如:ep18、ep21)
  • docs - 暂存所有文档
  • test - 暂存所有测试文件
  • *.java - 暂存所有Java文件
  • *.md - 暂存所有Markdown文件
  • 无参数 - 列出可暂存的修改,等待选择

执行流程

1. 查看未暂存修改

git status --short

2. 按模式匹配

  • 如果指定 ep{NN}: 暂存 ep{NN}/**/*
  • 如果指定 docs: 暂存 docs/**/*
  • 如果指定 test: 暂存 **/test/**/*.java
  • 如果指定扩展名: 暂存匹配的所有文件
  • 如果无参数: 显示分类列表供选择

3. 确认暂存

显示即将暂存的文件列表,等待确认。

示例

示例1: 暂存EP21的所有修改

/ga ep21

执行结果:

暂存以下文件:
  ep21/src/main/java/.../SSAGraph.java
  ep21/src/test/java/.../SSATest.java
确认暂存? [Y/n]

示例2: 暂存所有文档

/ga docs

执行结果:

暂存以下文件:
  docs/EP21_设计文档.md
  README.md
确认暂存? [Y/n]

示例3: 暂存所有Java文件

/ga *.java

执行结果:

暂存以下文件:
  ep18/src/main/java/.../CymbolStackVM.java
  ep21/src/main/java/.../SSAGraph.java
确认暂存? [Y/n]

示例4: 查看所有修改

/ga

执行结果:

未暂存的修改:

EP18 (3 files):
  - ep18/src/main/java/.../CymbolStackVM.java
  - ep18/src/main/java/.../StackFrame.java
  - ep18/src/test/.../VMTest.java

文档 (2 files):
  - README.md
  - docs/EP18_设计文档.md

使用 /ga [模式] 暂存文件

文件分类

类别 模式 匹配路径
EP18 ep18 ep18/**/*
EP18R ep18r ep18r/**/*
EP19 ep19 ep19/**/*
EP20 ep20 ep20/**/*
EP21 ep21 ep21/**/*
文档 docs docs/**/*, *.md
测试 test **/test/**/*.java
配置 config .claude/**/*, .gitignore
Java源码 *.java **/*.java

最佳实践

  1. 按EP暂存: 先确认修改属于哪个EP,再暂存
  2. 单主题暂存: 避免混合多个主题的文件
  3. 确认后暂存: 暂存前仔细检查文件列表
  4. 配合/gc使用: 暂存后使用 /gc 提交

注意事项

  • 暂存前会显示文件列表供确认
  • 支持多个模式(空格分隔)
  • 暂存后可使用 /gc 快速提交

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. 3d ago First seen · 129 lines · 15 tokens per session scan A d386ff1430cb

Subscribe to this mod's changes

ga is a command published in the GitHub repository whtoo/How_to_implment_PL_in_Antlr4 (34 stars, last pushed 3mo ago), licensed BSD-3-Clause. It adds 15 tokens to every session and 922 once invoked, about $0.0001 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-04.