How_to_implment_PL_in_Antlr4: Skill for Claude Code

.claude/skills/tech-blogger/SKILL.md

tech-blogger is a skill for Claude Code from whtoo/How_to_implment_PL_in_Antlr4. It costs 50 tokens per session (3,645 once invoked), scanned A, original, BSD-3-Clause.

A writing skill for producing chapters of a practical book about modern compiler development with AI-assisted programming. It uses system, chapter-template, and example prompts to keep the chapters structured.

In plain words
What is it for?
Drafting compiler-engineering book chapters for Java, ANTLR, Maven, and JUnit readers, including explanations, AI collaboration, exercises, and summaries.
Why use it?
It provides a repeatable way to turn chapter details into material with a consistent structure and stated technical scope.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

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/skills/tech-blogger/SKILL.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 tech-blogger

README.md
[![agentmods](https://agentmods.dev/badge/skills/whtoo/how_to_implment_pl_in_antlr4/tech-blogger/github.svg)](https://agentmods.dev/skills/whtoo/how_to_implment_pl_in_antlr4/tech-blogger)
Your own site
<a href="https://agentmods.dev/skills/whtoo/how_to_implment_pl_in_antlr4/tech-blogger"><img src="https://agentmods.dev/badge/skills/whtoo/how_to_implment_pl_in_antlr4/tech-blogger/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 tech-blogger

Your own site · 80×15
<a href="https://agentmods.dev/skills/whtoo/how_to_implment_pl_in_antlr4/tech-blogger"><img src="https://agentmods.dev/badge/skills/whtoo/how_to_implment_pl_in_antlr4/tech-blogger.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 50 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,645 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.00050 $0.03645
Opus 5 $0.00025 $0.01822
Sonnet 5 $0.00010 $0.00729
Haiku 4.5 $0.00005 $0.00364

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

Security

Grade A, and why

tech-blogger 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 7d 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/skills/tech-blogger/SKILL.md · 337 lines

How it starts

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

技术图书写作专家 (Tech Blogger Agent)

🎯 垂直职责

单一职责: 基于三层Prompt架构,系统化生成《AI Context Engineer 视角下的现代编译器实战》技术书籍章节内容。

📚 三层Prompt架构 (Three-Layer Prompt Architecture)

第1层:系统级提示词 (SYSTEM_PROMPT.md)

位置: book/SYSTEM_PROMPT.md 作用: 定义技术写作代理的角色写作原则结构要求 核心内容:

  • 角色设定: 高级技术写作专家 + 编译器工程师 + AI 工程师
  • 写作原则: 双线叙事(人类工程师线 + AI协作线)
  • 目标读者: 1–5年Java工程师,有AI编程助手使用经验
  • 技术栈约束: Java 21, ANTLR4 4.13.2, Maven 3.8+, JUnit 5
  • 硬性要求: 每章必须包含6个强制小节(概述→动机→技术→AI→练习→小结)

第2层:章节级模板 (CHAPTER_TEMPLATE.md)

位置: book/CHAPTER_TEMPLATE.md 作用: 提供完整的章节结构模板,包含所有占位符 核心结构:

  1. 章节写作任务
  2. 本章基本信息(标题、模块、读者、EP范围等)
  3. 内容结构要求(6个强制小节)
  4. 章节内容检查清单(作者自检)

关键占位符:

  • {chapter_title} - 章节标题
  • {module_title} - 模块标题
  • {target_reader} - 读者特征
  • {prerequisites} - 前置知识
  • {ep_range} - 对应EP范围
  • {previous_chapters} - 前一章
  • {next_chapters} - 后一章
  • {learning_goal_1/2/3} - 学习目标

第3层:章节实例提示词 (CHAPTER_PROMPT_EXAMPLES.md & assets/prompts/)

位置:

  • book/CHAPTER_PROMPT_EXAMPLES.md - 示例章节提示词(第1章、第12章)
  • book/assets/prompts/chapterXX_prompt.md - 各章具体提示词

作用: 填充占位符后得到的具体章节Prompt,可直接发送给技术写作代理

🔗 关系图

ep-navigator (识别EP范围和技术上下文) → compiler-dev (理解编译器技术细节) ← document-writer (实际执行章节内容生成)

📖 书籍结构概览

5大模块,21个章节

模块 1: 基础语言与解释器 (EP1–EP12) - 第1-5章
模块 2: 从解释到编译 (EP13–EP16) - 第6-9章  
模块 3: 现代编译器架构 (EP17–EP18R) - 第10-12章
模块 4: 中间表示与优化 (EP19–EP20) - 第13-16章
模块 5: 高级优化与AI协作 (EP21) - 第17-20章

双线叙事要求

人类工程师线:

  • 正常编译器构造实践(概念 + 代码 + 实验)
  • 从基础解析器到研究级优化的完整路径

AI协作线:

  • 如何设计上下文(Context),让AI安全、高效地参与
  • Prompt模板、验证策略、回滚方案
  • AI应该做/不该做的明确边界

🚀 快速工作流

方法1:使用现有章节提示词(推荐)

# 1. 查看所有可用章节提示词
ls book/assets/prompts/

# 2. 阅读第N章提示词
cat book/assets/prompts/chapter02_prompt.md

# 3. 组合系统提示词 + 章节提示词
cat book/SYSTEM_PROMPT.md book/assets/prompts/chapter02_prompt.md > chapter02_full.md

# 4. 发送给技术写作代理(document-writer)
# 将chapter02_full.md内容发送给document-writer agent

方法2:创建新章节提示词

# 1. 复制章节模板
cp book/CHAPTER_TEMPLATE.md book/assets/prompts/chapterXX_prompt.md

# 2. 填充占位符(参考BOOK_IMPLEMENTATION_PLAN.md)
vim book/assets/prompts/chapterXX_prompt.md

# 3. 填充示例:
# {chapter_title}: 第2章:表达式、运算与解释器基础
# {module_title}: 模块 1:基础语言与解释器(EP1–EP12)
# {target_reader}: 会Java、有Maven使用经验...
# {prerequisites}: Java基础语法、命令行、基本Git操作
# {ep_range}: EP3–EP4(表达式求值、访问者模式、变量内存)
# {previous_chapters}: 第1章:为人和AI搭建最小工作台
# {next_chapters}: 第3章:语句与控制流
# {learning_goal_1}: 理解表达式求值的核心机制
# {learning_goal_2}: 掌握访问者模式的设计和应用
# {learning_goal_3}: 能够在编译器中复用表达式求值逻辑

# 4. 组合并发送(同方法1)

Read the full file on GitHub · 337 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. 7d ago First seen · 337 lines · 50 tokens per session scan A 670b98e16212

Subscribe to this mod's changes

tech-blogger is a skill published in the GitHub repository whtoo/How_to_implment_PL_in_Antlr4 (34 stars, last pushed 3mo ago), licensed BSD-3-Clause. It adds 50 tokens to every session and 3,645 once invoked, about $0.0003 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.

Related

Other skills, from other repositories