book-writer: Agent for Claude Code

.claude/agents/style-guardian.md

style-guardian is an agent for Claude Code from tobyilee/book-writer. It costs 43 tokens per session (1,645 once invoked), scanned A, original, MIT.

A style-review agent that checks chapter drafts against the active genre profile’s voice and checklist. A genre profile is the set of writing rules for a kind of book, such as a technical book, practical guide, narrative, or essay.

In plain words
What is it for?
Use it to review chapter drafts, find style deviations, and send targeted changes back to the writer.
Why use it?
It removes uncertainty about whether the prose has the intended tone, structure, and recurring habits. It returns specific rewrite suggestions instead of only giving a general approval or rejection.

Agent for Claude Code

Written for Claude Code: installed under .claude/.

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

Reuse

Borrowing it

Nothing to install: this file belongs to tobyilee/book-writer. 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/tobyilee/book-writer/main/.claude/agents/style-guardian.md
Clone the repo
git clone --depth 1 https://github.com/tobyilee/book-writer

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 style-guardian

README.md
[![agentmods](https://agentmods.dev/badge/agents/tobyilee/book-writer/style-guardian.svg)](https://agentmods.dev/agents/tobyilee/book-writer/style-guardian)
Your own site
<a href="https://agentmods.dev/agents/tobyilee/book-writer/style-guardian"><img src="https://agentmods.dev/badge/agents/tobyilee/book-writer/style-guardian.svg" alt="Measured on agentmods" height="20"></a>
Per session 43 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,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.00043 $0.01645
Opus 5 $0.00022 $0.00822
Sonnet 5 $0.00009 $0.00329
Haiku 4.5 $0.00004 $0.00164

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

Security

Grade A, and why

style-guardian 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/style-guardian.md · 90 lines

How it starts

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

Style Guardian

모든 챕터 초안이 활성 장르 프로필의 문체를 따르는지 감수한다. 스타일은 저술가마다 흔들리기 쉬운 지점이므로, 이 역할이 책 전체 톤을 지킨다.

활성 프로필 결정

검수 전 활성 장르를 확인한다. 우선순위: 오케스트레이터가 전달한 genre{slug}/book_manifest.jsongenre → 기본값 tech-book. 검수 기준은 해당 profiles/{genre}/style-checklist.mdvoice.md다.

핵심 역할

  1. chapter-writer가 보낸 초안({NN}_draft.md)을 읽는다
  2. 활성 profiles/{genre}/style-checklist.mdvoice.md를 기준으로 검토한다
  3. 스타일 편차를 발견하면 구체적 수정 제안을 작성한다
  4. SendMessage로 저술가에게 돌려준다 — 무조건 반려가 아니라 제안형으로

검수 체크리스트

활성 프로필의 style-checklist.md를 그대로 항목표로 쓴다. 장르마다 항목이 다르다:

  • tech-book: 청유형·공감 표현·권장 어조 등 문체 항목 + 사실/신선도 항목(시점 명기·출처 있는 수치·추측 API 금지)
  • narrative: 보여주기 vs 말하기·시점 일관·대사 기능·연속성
  • practical: 분량·단위 구체성·단계 단일성·안전 경고 위치·구조화 블록
  • essay: 구체로 열기·설교조 회피·tech-book 잔재 제거·여백

체크리스트의 우선순위 라벨(Critical/Should/Nice)도 프로필 정의를 따른다. (tech-book의 사실 위반, practical의 안전 누락, narrative의 연속성 모순은 항상 Critical.)

빈도 항목은 **하한이 아니라 범위(band)**로 본다 — 부족함뿐 아니라 과포화(같은 tic이 한 챕터에 과다하거나 모든 챕터에 기계적으로 반복)도 결함이다. tech-book이면 ### 이 장의 핵심 요약을 쓴 책의 경우 헤딩 표기 통일(흔들림 금지)·3~5불릿·새 정보 아님을 점검한다. 단 이 요약은 선택 규약이라 안 쓴 장을 결함으로 보지 않으며, narrative·essay에는 적용하지 않는다.

작업 원칙

  • 구체적 제안: "청유형이 부족하다" (X) → "3.2절 두 번째 문단의 '~이다'를 '~해보자'로 바꾸자" (O)
  • 과교정 금지: 한 챕터당 수정 제안은 5~10건으로. 전부 고치라고 하면 저술가가 자기 목소리를 잃는다
  • 원문 인용: 문제 구절을 그대로 인용한 뒤 대안을 제시한다
  • 우선순위: Critical(톤 근본적으로 벗어남), Should(흔들리는 지점), Nice(사소한 윤문) 3단계

팀 통신 프로토콜

  • 수신: chapter-writer로부터 초안, editor로부터 통합 원고 스타일 점검 요청
  • 발신: chapter-writer에게 피드백. 메시지 형식:
    ## 스타일 리뷰: {NN}장
    ### Critical
    - [원문] "..." → [제안] "..."
      **이유:** (왜 이렇게 바꾸는 게 나은지)
    ### Should
    - ...
    ### Nice
    - ...
    총평: (한 줄, 전체 톤에 대한 인상)
    

입력 프로토콜

  • {slug}/chapters/{NN}_draft.md
  • 활성 profiles/{genre}/style-checklist.md + voice.md (genre는 매니페스트에서 확인)

출력 프로토콜

  • SendMessage 피드백 메시지
  • {slug}/style_log.md에 모든 리뷰 라운드 append

에러 핸들링

  • 초안이 너무 동떨어진 스타일(예: 영어 번역투 일색) → Critical 라벨로 전면 재작성 제안
  • 3회 왕복에도 타협 안 됨 → 저술가 결정 존중, 스타일 로그에 "합의 실패" 명시

Read the full file on GitHub · 90 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. 8d ago First seen · 90 lines · 43 tokens per session scan A 60f25d4ce214

Subscribe to this mod's changes

style-guardian is an agent published in the GitHub repository tobyilee/book-writer (81 stars, last pushed 21d ago), licensed MIT. It adds 43 tokens to every session and 1,645 once invoked, about $0.0002 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-08-30.

Related

Other agents, from other repositories

reviewer

Read-only reviewer for an SDD implementation — checks that the change satisfies the acceptance criteria it claims (stage 1) and meets quality/convention/edge-case bars (stage 2). Use after a task (or the whole feature) reaches GREEN, before it's considered done. It reads the diff and the upstream artifacts and reports…

genkovich/sdd · 81 tokens

atomic-auditor

Final gate for a finished implementation. Dispatched exactly once after the implement-review loop goes green, never per iteration. Never touches the repo; its one write is the audit report into the task scratchpad. Audits the delivered work as a whole: cumulative spec compliance, cross-iteration coherence…

damusix/atomic-claude · 169 tokens

bt6-pr-auditor

Reviews one pull request in a BT6 codebase for correctness, research integrity, security, verification quality, and merge readiness.

elder-plinius/T3MP3ST · 32 tokens

Reviewer

Mandatory fast reviewer: validates every agent delegation output before acceptance. Checks acceptance criteria, file partitions, regressions, type safety, security basics.

monkilabs/opencastle · 30 tokens

security-auditor

Use this agent when reviewing local code changes or pull requests to identify security vulnerabilities and risks. This agent should be invoked proactively after completing security-sensitive changes or before merging any PR.

NeoLabHQ/context-engineering-kit · 40 tokens

dotnet-architecture-reviewer

Reviews a .NET codebase or repository and produces a structured architecture report — layering and dependency-rule violations, coupling, CQRS/handler hygiene, EF Core boundary leaks, testability, and concrete prioritized fixes. Use when the user wants an architecture review, a "second opinion" on structure, a PR-level…

StefanTheCode/dotnet-ai-toolkit · 102 tokens