thesis-chapter

thesis-chapter is a command for Claude Code from KhaledSaeed18/dotclaude. It costs 89 tokens per session (919 once invoked), scanned A, original, MIT.

A command for drafting or revising one thesis chapter from its outline, research question, notes, results, and bibliography. It applies academic writing practices and finishes with citation checks and a pass to make the prose sound natural.

In plain words
What is it for?
It helps create or revise chapters in LaTeX or Markdown, use notes and results, organize sections, check references, and resolve the named chapter's target file.
Why use it?
It keeps a chapter tied to the research question and available evidence instead of encouraging unsupported or invented material. It also gives the chapter a complete structure rather than disconnected fragments.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: model in frontmatter.

Part of the thesis plugin — 21 skills, 3 commands, 2 agents shipped together

Good fit It helps create or revise chapters in LaTeX or Markdown, use notes and results, organize sections, check references, and resolve the named chapter's target file.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/khaledsaeed18/dotclaude/thesis-chapter
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/KhaledSaeed18/dotclaude

Made for: Claude Code.

Or install thesis, the plugin that ships this one along with the rest of its 21 skills, 3 commands, 2 agents.

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 thesis-chapter

README.md
[![agentmods](https://agentmods.dev/badge/commands/khaledsaeed18/dotclaude/thesis-chapter/github.svg)](https://agentmods.dev/commands/khaledsaeed18/dotclaude/thesis-chapter)
Your own site
<a href="https://agentmods.dev/commands/khaledsaeed18/dotclaude/thesis-chapter"><img src="https://agentmods.dev/badge/commands/khaledsaeed18/dotclaude/thesis-chapter/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 thesis-chapter

Your own site · 80×15
<a href="https://agentmods.dev/commands/khaledsaeed18/dotclaude/thesis-chapter"><img src="https://agentmods.dev/badge/commands/khaledsaeed18/dotclaude/thesis-chapter.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 89 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 919 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00089 $0.00919
Opus 5.5 $0.00036 $0.00368
Sonnet 5.5 $0.00018 $0.00184
Haiku 4.5 $0.00009 $0.00092

Measured 25d ago against content hash fbae91eb5522, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

thesis-chapter scanned grade A with 1 finding 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 25d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

allowed-tools: Read, Write, Edit, Glob, Grep, Bash(git:*), Bash(ls:*), Bash(find:*), Bash(wc:*), Bash(texcount:*), Bash(pandoc:*), Bash(curl:*)
.claude-plugin/plugins/thesis/commands/thesis-chapter.md · 64 lines

How it starts

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

Context

Target: $ARGUMENTS

Chapters present:

!ls chapters 2>/dev/null || ls *.tex *.md 2>/dev/null | head -20 || echo "(no chapters directory)"

Research question record (head):

!head -40 research/QUESTION.md 2>/dev/null || echo "(no research/QUESTION.md; run research-question first)"

Notes available:

!ls research/notes 2>/dev/null | wc -l | xargs -I{} echo "{} notes in research/notes/"

Bibliography:

!ls *.bib references/*.bib 2>/dev/null | head -3 || echo "(no .bib found)"

Task

Produce or revise the chapter named in the arguments. A chapter is written once, in full, from an agreed outline; it is not written in fragments across sessions, because the argument has to hold across sections.

Step 1: Establish the inputs

  • Resolve the target to a file (chapters/04-results.tex, chapters/04-results.md, or a new file following the existing naming). With --revise, read the current chapter in full first.
  • Read research/QUESTION.md; identify which research questions this chapter serves.
  • Read the outline for the chapter (a comment block at the top of the file, research/OUTLINE.md, or the proposal's chapter plan). If there is no outline, write one as a list of claims, one per intended paragraph, show it, and stop for agreement before drafting.
  • Read every note in research/notes/ marked relevant to this chapter, and any results files or tables it must present.

Step 2: Draft or revise

Apply academic-writing for the section types in this chapter. Constraints:

  • Every paragraph starts with its claim.
  • Every citation is a key that exists in the .bib; the citation-guard hook reports misses as you write. Never add a key that is not in the file; leave [[CITE: what is needed]] for the student.
  • Every number comes from a results file or a note, with its source in a comment (% from results/latency.csv row 12 or <!-- ... -->).
  • Figures and tables are referenced by label before they appear; missing ones are placeholders [[FIG: what it should show]] so research-figures can produce them.
  • Match the document's format: LaTeX (\section, \cite, \cref) or Pandoc Markdown (#, [@key], @fig:x).
  • With --length, aim within 10% of the target; otherwise use the chapter plan's target or the department norm.
  • With --revise, keep the student's sentences where they work; change structure and wording only where the section rules require it, and list what changed.

Read the full file on GitHub · 64 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. 25d ago First seen · 64 lines · 89 tokens per session scan A fbae91eb5522

Subscribe to this mod's changes

thesis-chapter is a command published in the GitHub repository KhaledSaeed18/dotclaude (5 stars, last pushed 2d ago), licensed MIT. It adds 89 tokens to every session and 919 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-22.