Skip to main content
ClaudeWave
Slash Command4.3k repo starsupdated 7d ago

mine-writing-patterns

The mine-writing-patterns command extracts reusable writing conventions, structural patterns, and stylistic signals from academic papers and merges them into a persistent writing memory file. Use it to study how strong papers frame sections, construct arguments, handle rebuttals, and conform to venue expectations before drafting your own work or composing reviewer responses.

Install in Claude Code
Copy
mkdir -p ~/.claude/commands && curl -fsSL https://raw.githubusercontent.com/Galaxy-Dawn/claude-scholar/HEAD/commands/mine-writing-patterns.md -o ~/.claude/commands/mine-writing-patterns.md
Then start a new Claude Code session; the slash command loads automatically.

mine-writing-patterns.md

# /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:

```text
~/.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

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

### Mine from an arXiv paper

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

### Focus on rebuttal or venue signals

```bash
/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 |

### Step 4: Update the canonical memory only

The canonical write target is the active installed skill memory:

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

Update one or more of these sections:
- `Writing patterns mined`
- `Structure signals`
- `Reusable phrasing`
- `Venue-specific signals`
- `How this helps our writing`
- `Source index`

If that file is unavailable in the current runtime, use the configured installed skill home for the active runtime and state the exact path in the final summary. Do not silently fall back to the repository checkout.

Do not create project-local writing memory.
Do not scatter the mined result across multiple maintained knowledge files.

### Step 5: Return a standardized mining summary

The final response should follow the `paper-miner` standardized output format:
- metadata
- memory write summary
- new reusable patterns
- how we should reuse this
- blockers or limits

## Related integrations

- `ml-paper-writing` reads this active installed memory before drafting or revising sections.
- `review-response` reads this active installed memory when tone, phrasing, and rebuttal structure matter.
- `paper-miner` is the agent that performs the actual mining work.

## Success criteria

- the target paper is read successfully,
- reusable writing knowledge is merged into the canonical memory,
- source attribution is preserved,
- no project-specific writing memory is created,
- the user receives a standardized mining summary.
code-reviewerSubagent

Expert code review specialist. Proactively reviews code for quality, security, and maintainability. Use immediately after writing or modifying code. MUST BE USED for all code changes.

kaggle-minerSubagent

Use this agent when the user provides a Kaggle competition URL or asks to learn from Kaggle winning solutions. Examples:

literature-reviewerSubagent

Use this agent when the user asks to "conduct literature review", "search for papers", "analyze research papers", "identify research gaps", "review related work", or mentions starting a research project. This agent integrates with Zotero for automated paper collection, organization, and full-text analysis. Examples:

paper-minerSubagent

Use this agent when the user provides a research paper (PDF/DOCX/arXiv link) or asks to learn writing patterns from papers, extract venue-specific writing signals, study paper structure, or mine rebuttal strategies. The agent writes extracted knowledge into the active installed paper-miner writing memory for ml-paper-writing. It does not maintain project-specific writing memory.

rebuttal-writerSubagent

Use this agent when the user asks to "write rebuttal", "respond to reviewers", "analyze review comments", or needs help with academic paper review response. This agent specializes in systematic rebuttal writing with professional tone and structured responses.

tdd-guideSubagent

Test-driven development guide for writing tests first, implementing the smallest passing change, and keeping verification tight. Use when the user explicitly wants TDD or when a task should be driven by failing tests before code.

analyze-resultsSlash Command

Run a blocker-first post-experiment workflow: validate evidence, produce strict statistical analysis when possible, and generate a decision-oriented results report only when the analysis bundle is sufficient. Uses results-analysis + results-report as a gated two-stage workflow.

commitSlash Command

Commit changes following Conventional Commits format (local only, no push).