mine-writing-patterns

mine-writing-patterns is a command for Claude Code from Galaxy-Dawn/claude-scholar. It costs 42 tokens per session (945 once invoked), scanned A, original, MIT.

A command that reads research papers and extracts reusable writing patterns into the active paper-writing memory. It accepts local PDFs and arXiv paper links.

In plain words
What is it for?
Use it to study how strong papers handle introductions, methods, results, venue-specific style, or rebuttals before drafting.
Why use it?
It saves useful examples of structure, phrasing, venue expectations, and rebuttal language so they can be reused when writing papers or responses.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: reads .claude/ paths.

Part of the claude-scholar plugin — 45 skills, 34 commands, 6 agents, 5 hooks shipped together

Good fit Use it to study how strong papers handle introductions, methods, results, venue-specific style, or rebuttals before drafting.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/galaxy-dawn/claude-scholar/mine-writing-patterns
About the project

Claude Scholar is a semi-automated research assistant for academic research and software development, supporting literature review, coding, experiments, reporting, writing, and project knowledge management. Computer science and AI researchers use it across the research workflow with several coding-agent platforms; the catalogue contains its skills, commands, agents, hooks, plugin, and instruction.

Galaxy-Dawn/claude-scholar · 5,407 stars · on GitHub

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/Galaxy-Dawn/claude-scholar

Made for: Claude Code.

Or install claude-scholar, the plugin that ships this one along with the rest of its 45 skills, 34 commands, 6 agents, 5 hooks.

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 mine-writing-patterns

README.md
[![agentmods](https://agentmods.dev/badge/commands/galaxy-dawn/claude-scholar/mine-writing-patterns/github.svg)](https://agentmods.dev/commands/galaxy-dawn/claude-scholar/mine-writing-patterns)
Your own site
<a href="https://agentmods.dev/commands/galaxy-dawn/claude-scholar/mine-writing-patterns"><img src="https://agentmods.dev/badge/commands/galaxy-dawn/claude-scholar/mine-writing-patterns/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 mine-writing-patterns

Your own site · 80×15
<a href="https://agentmods.dev/commands/galaxy-dawn/claude-scholar/mine-writing-patterns"><img src="https://agentmods.dev/badge/commands/galaxy-dawn/claude-scholar/mine-writing-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 42 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 945 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.00042 $0.00945
Opus 5 $0.00021 $0.00473
Sonnet 5 $0.00008 $0.00189
Haiku 4.5 $0.00004 $0.00094

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

Security

Grade A, and why

mine-writing-patterns 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 10d 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.

commands/mine-writing-patterns.md · 136 lines

How it starts

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

/mine-writing-patterns - Installed Writing Memory Mining

Read the paper source "$source" and update the active installed paper-miner writing memory.

Default target

Always write mined knowledge into the active installed skill memory, not the repository checkout copy:

~/.claude/skills/ml-paper-writing/references/knowledge/paper-miner-writing-memory.md

This command does not create project-specific writing memory unless the user explicitly asks for a project-local writing memory.

When to use

Use this command when you want to:

  • learn reusable writing patterns from a strong paper,
  • study how a venue frames introductions, methods, results, or rebuttals,
  • mine phrasing and structure signals before drafting,
  • enrich the writing memory that powers ml-paper-writing and review-response.

Usage

Basic usage

/mine-writing-patterns path/to/paper.pdf

Mine from an arXiv paper

/mine-writing-patterns https://arxiv.org/abs/2301.xxxxx

Focus on rebuttal or venue signals

/mine-writing-patterns path/to/paper.pdf rebuttal
/mine-writing-patterns path/to/paper.pdf venue

Workflow

Step 1: Resolve the paper source

Acceptable inputs:

  • local PDF
  • local DOCX
  • arXiv URL
  • readable web URL
  • short natural-language request that identifies the paper(s)

If the source is ambiguous, narrow it before mining.

Step 2: Invoke paper-miner

Use the paper-miner agent to:

  • extract paper content,
  • identify reusable writing knowledge,
  • merge it into the active installed writing memory,
  • avoid duplicate entries,
  • preserve source attribution.

Step 3: Respect the focus mode

Interpret $focus as follows:

Focus Priority
general Mine balanced signals across all major sections
introduction Emphasize framing, motivation, and contribution setup
method Emphasize exposition style, technical sequencing, and clarity
results Emphasize result narration, claim-evidence language, and interpretation
rebuttal Emphasize clarification phrases, response structure, and reviewer-facing tone
venue Emphasize venue-specific style and convention signals

Read the full file on GitHub · 136 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. 10d ago First seen · 136 lines · 42 tokens per session scan A adaadf7ffef1

Subscribe to this mod's changes

mine-writing-patterns is a command published in the GitHub repository Galaxy-Dawn/claude-scholar (5,407 stars, last pushed 13d ago), licensed MIT. It adds 42 tokens to every session and 945 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.