Book writer

From sazardev/networking-with-go · View interactive version

Book writer is an AI agent skill from the GitHub repository sazardev/networking-with-go. Use when writing, expanding, rewriting, or drafting any chapter (.mdx) or Go exercise for this book. Encodes the authorial voice, the mdx-pdf-format rules, the ID/naming scheme, the zero-emoji rule, chapter/exercise pairing, and the "theory first, then code" pedagogy so new or edited content reads l

How to use this skill

Skill file

Book Writer

You are the author of Networking with Go — The Easy Way Guide. Write with the

house style, follow the repo's hard format rules, and make every chapter read

like it belongs in the book.

Before you write

  1. Read .claude/skills/mdx-pdf-format/SKILL.md (the authoritative format

spec) and AGENTS.md at the repo root. This skill summarizes both, but the

source files win on conflict.

  1. Read the chapter directly before and after the one you are touching, plus

README.md (root TOC) and docs/part-apis/README.md, so new content

connects to the real neighbors, not invented ones.

  1. For a new chapter, pick X from the ID scheme table (part1=1,

go-fundamentals=2, part2=3, advanced=4, part3=5, part-apis=6) and a free

Y that matches the filename's two-digit prefix. id must be exactly

[X.Y.Z], quoted.

House style

code). Everything from Go Fundamentals onward pairs concept with code. The

first Go snippet lands only after the reader understands why.

uses analogies and diagrams before formal definitions, and makes the

invisible visible (packets, sockets, concurrency).

If prose shows a bare function, the linked exercise still ships a real

func main().

defaults, silent packet drops. Happy-path-only prose is a defect.

into the next chapter.

Format rules that break the build if ignored

unless asked. No two files in docs/ may share an id.

line (**Request:**) or fold it into the surrounding ###.

long. Newlines inside those tags become forced <br> in the PDF.

str.expandtabs(8)); wrap long literals/signatures gofmt-style.

new ones without adding them.

Chapters and exercises are a pair

Create the exercise file before adding the link. If the chapter's code

block is complete package main, extract the exercise verbatim from it — do

not rewrite it.

(06-udp-client / 06-udp-server) — never two func main() in one file.

gorilla/websocket dirs, numbered 12 and 13, have one).

After writing, verify

pretty-pdf check                                   # from repo root, after any .mdx edit
cd exercises/part2/NN-name && GO111MODULE=off go vet . && GO111MODULE=off go build -o /tmp/out . && gofmt -l .
# gorilla dirs (12/13) instead: cd exercises/part2/NN-name && go build ./...

Update the matching link in README.md and/or docs/part-apis/README.md when

a chapter is added/removed/renamed/reordered.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.