How_to_implment_PL_in_Antlr4: Command for Claude Code

.claude/commands/gc.md

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

A Git command that groups changed files and creates one or more commits with standard messages. Git is a system for tracking code changes, and a commit records a set of changes in the project history.

In plain words
What is it for?
Use it to inspect modified files, group them by project area, generate messages such as feature or bug-fix commits, and create focused commits.
Why use it?
It reduces manual work when separating changes by topic and helps keep commit messages consistent.

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/gc.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 gc

README.md
[![agentmods](https://agentmods.dev/badge/commands/whtoo/how_to_implment_pl_in_antlr4/gc.svg)](https://agentmods.dev/commands/whtoo/how_to_implment_pl_in_antlr4/gc)
Your own site
<a href="https://agentmods.dev/commands/whtoo/how_to_implment_pl_in_antlr4/gc"><img src="https://agentmods.dev/badge/commands/whtoo/how_to_implment_pl_in_antlr4/gc.svg" alt="Measured on agentmods" height="20"></a>
Per session 20 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 617 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.00020 $0.00617
Opus 5 $0.00010 $0.00309
Sonnet 5 $0.00004 $0.00123
Haiku 4.5 $0.00002 $0.00062

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

Security

Grade A, and why

gc 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/gc.md · 89 lines

What it actually says

Git Commit 快速命令

命令用途

快速创建符合项目规范的 git commit,自动分析修改文件并生成标准化提交信息。

使用方式

/gc [可选提交信息]

参数说明

  • [提交信息]: 可选,如果不提供则自动生成

执行流程

1. 分析修改

git status --short  # 查看未暂存文件
git diff --name-only # 查看已修改文件

2. 智能分组

按以下规则自动分组:

  • ep{NN}/** → ep{NN}组(例如:ep18、ep21)
  • docs/** → docs组
  • tests/****/test/**/*.java → test组
  • .claude/** → config组
  • 其他 → 根目录组

3. 生成提交信息

遵循项目规范:

[type](scope): description

类型 (type):

  • feat - 新功能
  • fix - 修复bug
  • docs - 文档变更
  • refactor - 代码重构
  • test - 测试相关
  • chore - 构建/工具/配置

作用域 (scope):

  • EP编号:ep18, ep21, ep18r, ep20
  • 模块名:vm, ir, cfg, ssa

4. 分主题提交

每个分组独立提交,确保每次提交聚焦单一主题。

示例

示例1: 无参数自动提交

/gc

执行结果:

  • 分析所有修改文件
  • 自动分组并生成提交信息
  • 逐个提交每个分组

示例2: 自定义提交信息

/gc feat(ep21): 实现SSA优化Pass

执行结果:

  • 将所有修改文件暂存
  • 使用指定的提交信息
  • 单次提交

最佳实践

  1. 单主题提交: 每次提交只包含一个主题的修改
  2. 清晰的提交信息: 使用 type(scope): description 格式
  3. 避免大提交: 单次提交建议不超过100行修改
  4. 测试通过: 提交前确保相关测试通过

注意事项

  • 提交前会运行 git status 确认
  • 禁止使用 --amend 除非明确要求
  • 提交后会运行 git log -1 验证

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 · 89 lines · 20 tokens per session scan A 81da4aab15e1

Subscribe to this mod's changes

gc 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 20 tokens to every session and 617 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.