Skip to main content

Overview

Claude Code is an agentic AI assistant that lives in your terminal, designed to help you manage research projects through natural language commands. Unlike traditional AI chat interfaces, Claude Code can directly read files, create folders, run analyses, and manage your entire research workflow. Key Benefits for Research Memex:
  • File-aware AI: Reference papers with @filename syntax
  • Project memory: CLAUDE.md stores your research protocol
  • Custom commands: Create slash commands for repetitive tasks
  • MCP integration: Connect to Zotero, filesystems, web search
  • Autonomous execution: Plan and execute multi-step workflows
  • Version control: Built-in Git integration
Not Just for Coding: Despite the name, Claude Code is excellent for research workflows - managing literature, analyzing papers, drafting sections, and organizing complex projects. It’s agentic AI for researchers!

Step 1: Installation

1.1 Prerequisites

System Requirements:
  • Node.js 18 or newer
  • Terminal/command-line access
  • Claude.ai account or API key
Check Node.js version:
node --version
If you need to install Node.js, download from nodejs.org

1.2 Install Claude Code

Via npm (Terminal):
npm install -g @anthropic-ai/claude-code
Verify installation:
claude --version
First launch:
cd ~/your-research-project
claude
Official Documentation: For detailed installation instructions, see Claude Code Overview | GitHub Repository

1.3 Alternative: VS Code Extension

For users who prefer a graphical interface:
  1. Open VS Code
  2. Install “Claude Code” extension from marketplace
  3. Configure API key in settings
  4. Access via sidebar

Step 2: Core Concepts

2.1 What is CLAUDE.md?

CLAUDE.md is a special file that Claude automatically reads at the start of every conversation. It acts as your project’s “memory” or “constitution.” What to put in CLAUDE.md:
  • Project overview and goals
  • File structure explanation
  • Research protocol or methodology
  • Custom commands you’ve created
  • Style guidelines (citation format, writing tone)
  • Important context Claude should always know
Example CLAUDE.md for a research project:
# Research Project: AI in Education

## Project Goal
Analyze the impact of AI tools on student learning outcomes through
literature synthesis and empirical analysis.

## File Structure
- /literature/ - Curated papers in markdown format
- /analysis/ - Data files and R scripts
- /drafts/ - Paper sections and outlines
- /exports/ - Final outputs (PDF, Word)

## Research Protocol
- Citation style: APA 7th Edition
- Inclusion criteria: Peer-reviewed, 2020-2025, empirical studies
- Analysis approach: Thematic synthesis

## Custom Commands
- /summarize: Create structured summary of a paper
- /compare: Compare methodologies across papers
- /synthesize: Identify themes across multiple papers
Best Practice: Keep CLAUDE.md concise and updated. Claude reads this at the start of EVERY conversation, so it should contain essential context, not your entire literature review!
Official Guide: CLAUDE.md Best Practices

2.2 Plan Mode vs Act Mode

Plan Mode (Default - Recommended):
  • Claude shows you what it will do BEFORE executing
  • You approve/reject each action
  • Perfect for learning and complex operations
  • Toggle: Shift+Tab (Mac/Linux) or Alt+M (Windows)
Act Mode:
  • Claude executes immediately
  • Faster for trusted operations
  • Use for simple tasks (reading files, searches)
Recommendation: Stay in Plan Mode when working with research data! Preview operations before they modify your files.

2.3 File References with @ Syntax

Add files to context:
"Summarize the key arguments in @/literature/smith2024.md"

"Compare the methodologies in @/literature/jones2024.md
and @/literature/lee2024.md"

"Analyze all papers in @/literature/ and identify common themes"
Folder references:
  • @/literature/ - Adds entire folder to context
  • @CLAUDE.md - Always available as project memory

Step 3: Creating Custom Slash Commands

3.1 What Are Slash Commands?

Slash commands are reusable prompt templates you create once and invoke with /commandname. They’re perfect for repetitive research tasks. Examples for research:
  • /summarize - Structured paper summary
  • /compare - Compare two papers
  • /extract - Pull out specific information
  • /critique - Review writing for quality

3.2 Create Your First Command

Step 1: Create the commands folder
mkdir -p .claude/commands
Step 2: Create a command file Create .claude/commands/summarize.md:
Summarize the following paper in this exact structure:

Paper: $ARGUMENTS

## Summary Template
- **Research Question**: [What problem does it address?]
- **Methodology**: [How did they study it?]
- **Key Findings**: [What did they discover?]
- **Theoretical Contribution**: [What does it add to knowledge?]
- **Limitations**: [What are the gaps?]
- **Relevance**: [How does this relate to my research?]

Be specific and cite page numbers where relevant.
Step 3: Use your command
claude  # Launch Claude Code
Then type:
/summarize @/literature/smith2024.md
Claude executes your template!
**ARGUMENTSMagic:TheARGUMENTS Magic:** The `ARGUMENTS` keyword gets replaced with whatever you type after the slash command. This makes commands flexible and reusable!

3.3 Useful Research Commands

Create .claude/commands/compare.md:
Compare these two papers systematically:

Papers: $ARGUMENTS

## Comparison Framework
1. **Research Questions**: How do they differ?
2. **Methodologies**: Qualitative vs quantitative? Samples?
3. **Findings**: Do they agree or contradict?
4. **Theories**: What frameworks do they use?
5. **Gaps**: What does each paper miss that the other addresses?

Present in a comparison table.
Create .claude/commands/gaps.md:
Analyze the following papers for research gaps:

Papers: $ARGUMENTS

## Gap Analysis
1. **Methodological Gaps**: What methods are missing?
2. **Theoretical Gaps**: What theories are underexplored?
3. **Empirical Gaps**: What contexts are understudied?
4. **Temporal Gaps**: What recent developments aren't covered?

For each gap, explain why it matters and what research it suggests.

Step 4: MCP Servers for Research

MCP (Model Context Protocol) servers extend Claude Code’s capabilities with specialized tools.

4.1 Essential MCP Servers for Research

Zotero MCP:
  • Search your Zotero library from terminal
  • Get paper metadata instantly
  • Installation: See Zotero Setup Guide
Filesystem MCP:
  • Already built-in to Claude Code
  • Navigate and search project files
  • Create and modify documents
Sequential Thinking MCP: Web Search MCP:
  • Real-time literature discovery
  • Verify recent developments
  • Fact-checking and citation validation

4.2 Installing MCP Servers

Via Smithery (Easiest):
  1. Visit smithery.ai
  2. Search for MCP server you want
  3. Click “Install”
  4. Follow one-click setup
  5. Restart Claude Code
Manual Configuration: Edit ~/.config/claude-code/config.json to add MCP servers.
For complete MCP exploration, see the MCP Explorer Guide

Step 5: Project Structure for Research

General research project:
/Your-Research-Project/
├── CLAUDE.md                 # Project memory
├── .claude/
│   └── commands/             # Custom slash commands
├── literature/               # Curated papers (markdown)
├── analysis/                 # Data, scripts, results
├── notes/                    # Research notes, synthesis
├── drafts/                   # Paper sections
└── exports/                  # Final outputs

5.2 Setting Up a New Project

Option 1: Ask Claude to do it
Create a research project structure with folders for literature,
analysis, notes, drafts, and exports. Then create a CLAUDE.md file
documenting this project structure.
Option 2: Manual setup
mkdir -p literature analysis notes drafts exports .claude/commands
touch CLAUDE.md
claude

Step 6: Common Research Workflows

6.1 Literature Analysis

Analyze a single paper:
Read @/literature/smith2024.md and create a structured summary
following the format in CLAUDE.md
Compare multiple papers:
Compare the methodologies in @/literature/smith2024.md,
@/literature/jones2024.md, and @/literature/lee2024.md.
Create a comparison table.
Find themes across corpus:
Analyze all papers in @/literature/ and identify the 3 most
common themes. For each theme, list which papers discuss it
and how their perspectives differ.

6.2 Data Management

Organize files:
Review all files in @/literature/ and organize them into
subfolders by research method (qualitative, quantitative, mixed-methods)
Create synthesis tables:
Extract the following from each paper in @/literature/:
author, year, method, sample size, key finding.
Create a CSV table with this data.

6.3 Drafting and Writing

Generate section outlines:
Based on the papers in @/literature/, create an outline for
a literature review section covering theoretical frameworks.
Draft from synthesis:
Using the synthesis notes in @/notes/themes.md, draft a
2-page literature review section in academic style (APA 7th).

Step 7: Keyboard Shortcuts & Navigation

7.1 Essential Shortcuts

ShortcutAction
Shift+TabToggle Plan/Act mode (Mac/Linux)
Alt+MToggle Plan/Act mode (Windows)
Esc EscNavigate command history (double-tap)
Ctrl+CCancel current operation
Ctrl+DExit Claude Code

7.2 Command History

Double-tap Esc to jump back through previous commands:
  • Modify and re-run analyses
  • Fix typos without retyping
  • Compare different approaches quickly

Step 8: Learning Resources

8.1 Official Documentation

8.2 Video Tutorials

Beginner Series: Hands-On Tutorials:

8.3 Online Courses

8.4 Blog Posts & Guides


Step 9: Integration with Research Memex

9.1 Connect to Zotero

Setup Zotero MCP:
  1. Follow Zotero Setup Guide
  2. Install Zotero MCP server
  3. In Claude Code: Search your library with natural language
  4. Example: “Search my Zotero for papers on AI in education”

9.2 Export Papers for Analysis

From Zotero to Claude Code:
  1. Export papers from Zotero as markdown (via OCR)
  2. Save to /literature/ folder
  3. Reference with @/literature/author2024.md
  4. Claude can now analyze full text!
See: OCR PDF Conversion Guide

9.3 Workflow with Obsidian

Obsidian for synthesis, Claude Code for execution:
  1. Use Obsidian for literature notes
  2. Export synthesis to markdown
  3. Move to Claude Code project folder
  4. Claude Code automates analysis and drafting

Step 10: Example Research Workflows

10.1 General Literature Analysis

Create CLAUDE.md:
# Literature Analysis Project

## Goal
Analyze papers on [TOPIC] to identify themes, methodologies, and gaps.

## File Structure
- /literature/ - Papers in markdown format
- /synthesis/ - Theme notes and comparisons
- /outputs/ - Final analysis documents

## Analysis Protocol
- Extract: Research question, method, key findings
- Compare: Methodologies and theoretical frameworks
- Synthesize: Common themes and research gaps
Custom command .claude/commands/analyze.md:
Analyze this paper:

Paper: $ARGUMENTS

Extract:
1. Research question and objectives
2. Methodology (qualitative/quantitative/mixed)
3. Sample and data collection
4. Key findings (3-5 bullet points)
5. Theoretical contribution
6. Limitations and future research

Format as markdown table for easy compilation.

10.2 Multi-Paper Comparison

Workflow:
1. /analyze @/literature/paper1.md
2. /analyze @/literature/paper2.md
3. /analyze @/literature/paper3.md

Then: "Create a comparison table of the three analyses above,
focusing on methodological differences."

10.3 Theory Building

Use Sequential Thinking MCP:
Using Sequential Thinking, analyze the papers in @/literature/
and propose a novel theoretical framework that integrates their
key findings. Work step-by-step through:
1. Identifying core constructs
2. Mapping relationships
3. Proposing mechanisms
4. Identifying testable propositions

Step 11: Advanced Features

11.1 Parallel Agents

Run multiple analyses simultaneously:
"Use 3 parallel agents to analyze @/literature/smith2024.md:
- Agent 1: Focus on methodology quality
- Agent 2: Focus on theoretical contribution
- Agent 3: Focus on practical implications

Compare their assessments."

11.2 Git Integration

Built-in version control:
"Create a Git commit for the changes we just made with
message: 'Add literature analysis for Smith 2024'"

"Show me the diff of changes since yesterday"

"Create a new branch for the theory-building section"

11.3 Task Tracking with TodoWrite

Claude Code has built-in task management:
"Create a todo list for analyzing these 10 papers:
- Read and summarize each
- Extract methodologies
- Identify common themes
- Map theoretical frameworks
- Draft synthesis section"
Claude creates a checklist and tracks progress!

Step 12: Troubleshooting

Installation Issues

“npm command not found”
  • Install Node.js from nodejs.org
  • Restart terminal after installation
“Permission denied”
  • Use: sudo npm install -g @anthropic-ai/claude-code
  • Or fix npm permissions: npm docs

CLAUDE.md Not Loading

  • Verify filename is exactly CLAUDE.md (case-sensitive)
  • Must be in project root directory
  • Restart Claude Code: exit then claude

Slash Commands Not Working

  • Check folder exists: .claude/commands/
  • Verify file naming: commandname.md (no slashes)
  • Restart Claude Code after creating commands
  • Test with: /help (built-in command)

File References Failing

  • Use absolute paths from project root: @/literature/file.md
  • Check filename spelling and case
  • Verify file exists: ls literature/

Step 13: Best Practices for Research

13.1 Project Organization

DRY Principle (Don’t Repeat Yourself):
  • Create slash commands for repetitive tasks
  • Document protocols in CLAUDE.md once
  • Reuse across multiple papers/projects
Version Everything:
  • Use Git for tracking changes
  • Commit after major analyses
  • Branch for experimental approaches

13.2 Quality Control

Always verify AI outputs:
  • Check citations against your Zotero library
  • Validate statistical claims
  • Review for coherence and logic
  • See: Failure Museum
Use Plan Mode for:
  • File modifications
  • Data extraction
  • Writing operations
  • Complex multi-step tasks

13.3 Ethical Guidelines

Transparency:
  • Document AI use in CLAUDE.md
  • Track which tasks were AI-assisted
  • Maintain audit trail of prompts used
Verification:
  • Never trust AI-generated citations blindly
  • Verify every factual claim
  • Check for hallucinations and errors

Step 14: Advanced Use Cases

14.1 For Systematic Literature Reviews

For a complete SLR workflow with Claude Code (screening, extraction, PRISMA), see: Claude Code SLR Workflow

14.2 For Qualitative Analysis

Coding transcripts:
/code "Analyze @/data/interview1.md using thematic analysis.
Identify codes, group into themes, provide exemplar quotes."

14.3 For Theory Development

Build conceptual frameworks:
"Using Sequential Thinking MCP, develop a theoretical model
that integrates findings from @/synthesis/themes.md.
Work through: constructs → relationships → propositions → testable hypotheses."

Checklist

By the end of this guide, you should have:
  • Installed Claude Code (terminal or VS Code)
  • Created a research project folder
  • Written a CLAUDE.md file with project context
  • Created at least one custom slash command
  • Tested file references with @ syntax
  • Understood Plan vs Act mode
  • Installed at least one MCP server (Zotero or Sequential Thinking)
  • Watched at least one tutorial video
  • Tested a basic analysis workflow
Next Steps: For a complete example of Claude Code in action, see the SLR Workflow Guide which shows screening, extraction, and synthesis in detail.

Resources

Official Anthropic Resources

Community Resources

Research Memex Integration

Learning Paths

I