@MushtaqBilalPhD: https://x.com/MushtaqBilalPhD/status/2057786613795639582

X AI KOLs Timeline Tools

Summary

A comprehensive beginner's guide to using Claude Code for non-technical academics, covering installation, project organization, and automation of research tasks without requiring coding skills.

https://t.co/Fn0hvChHbb
Original Article
View Cached Full Text

Cached at: 05/22/26, 05:57 PM

A Beginner’s Guide to Claude Code for (Non-Technical) Academics

This is a beginner’s guide to Claude Code written specifically for non-technical academics. I have written in an accessible and simple language.

You don’t need any technical background to understand this guide or to use Claude Code. If you can write sentences in English, you can use Claude Code.

This guide is 8,000+ words long and covers everything from installing Claude Code to organizing a longer research project (dissertation, monograph, etc.) to chaining subagents to automate repetitive tasks.

Chapter 1: Getting Started

1. Why You Should Care About Claude Code?

You are a researcher and have a folder on your computer with several PDFs, drafts of your papers, spreadsheets, datasets, and a few transcripts of interviews. All these documents are relevant to your project, but you need to make connections across published literature, gathered data, and your own notes.

This is the kind of use-case that Claud Code was built for.

Most academics and researchers have used AI apps in their browsers (ChatGPT, Claude, Gemini, etc.) You open a tab and type in a prompt and the AI replies. If you want to ask questions about your papers or drafts, you add them to ChatGPT or Claude.

Claude Code is different because instead of you bringing your files to an AI app in the browser, you bring the AI into the folder containing all your data.

1.1 What Is Claude Code?

Claude Code is a tool that runs on your computer. Don’t be intimidated by the word “code.” You don’t need any coding or programming skills to use it. You install Claude Code on your computer just like you would an app like Zoom or Zotero.

Once you have it on your computer, you open your project folder (dissertation, paper, etc.) and let Claude work inside the folder. Claude can read every file in the folder, edit existing files, and create new ones. It can also remember what you were working on after you end a session.

Unlike browser-based apps like ChatGPT and Gemini that only “talk,” Claude Code can actually “do” things for you.

1.2 Why Claude Code Matters for Academic Work

There are two fundamental ways in which Claude Code can work as your reliable and powerful research assistant.

First, Claude Code remembers you, your research, your writing style, and your ever-evolving research requirements. You won’t have to explain your requirements repeatedly.

Second, since Claude Code works within a folder on your computer, it can process multiple files at a time. For example, it can go through all forty-five PDFs in your folder and extract relevant information (objectives, methodology, etc.) from all of them. You can even ask it to create a new file based on extracted information.

Claude Code can handle all types of files from Word files to Excel sheets, PDFs, etc.

1.3 What Does It Mean in Practical Terms?

If you are a qualitative researcher, load a folder full of interview transcripts and ask Claude Code to give you every instance of a particular utterance, e.g. how each participant talked about a given subject. Then ask it to look for overarching themes across interviews.

If you are a quantitative researcher, add a messy CSV or an Excel sheet in your folder and ask Claude Code to clean it up for you. You can ask it to run descriptive statistics or ask it to explain a critical comment made by a reviewer.

1.4 What Claude Code is Not

Claude Code is an incredibly powerful tool, but it is not a replacement for your expert judgment. It can draft, summarize, code, but what counts as argument or evidence is your responsibility.

Academics who are likely to succeed using Claude Code are the ones who treat it as a research assistant and not those who outsource all their thinking and judgment to it.

2: Installing Claude Code App, Your First Session

If you’re new to Claude Code, set aside 15-20 minutes to install it and set it up. You don’t need any coding skills to use Claude Code.

You will need a Claude Pro or Max subscription to use Claude Code on your computer.

2.1 Installation

Claude Code is available for both Windows and Mac. Go to claude.com/download and download the version compatible with your computer. Run it the way you would any other installer (e.g. Zoom, Zotero, etc.). On Windows, it appears in your Start Menu. On Mac, it appears in your Applications folder.

Open the app once you have installed in it. The first time you open it, Claude will ask you to sign in through browser. Once you have signed in, you will see a column on the left and a chat panel in the middle. The left column will show you a record of all your conversations just like in Claude or ChatGPT in browser.

2.2 Opening Your First Folder

Click “Open Folder.” It usually on top of the chat bar in the main panel. Its position keeps changing slightly with every update, but you will mostly find it in the vicinity of the chat bar.

Navigate to any folder on your computer in which you have stored PDFs or your drafts. If you want to be extra careful, create a dedicated “Claude Research Assistant folder” and navigate to that.

Now Claude Code is inside that folder. It has access to every file and subfolder inside the main folder.

2.3 What a Session Looks Like

A session is the conversation you have with Claude in the main chat panel just like you do it in browser apps like ChatGPT.

The interaction is like browser-based apps like ChatGPT. The only difference is that now Claude Code has access to your files on your computer. It also has the ability to create files on your computer.

Once you are in the folder, give Claude a simple prompt like:

Read all the papers in the folder and give me their main arguments as a separate file.

That’s it. Most of your interaction with Claude Code would be writing instructions like this.

Claude Code will go ahead and retrieve relevant information from the papers and start creating a new file. This file will show up in the folder that you are working in.

As it proceeds, it will ask you for permission to do so. You can make Claude Code bypass permissions, but in the beginning, it’s a good idea to make Claude Code ask for permissions. You don’t want Claude Code to end up deleting any important files without asking you.

Every session you start in Claude Code is automatically saved in the panel on the left.

3: Claude Code as Your Research Assistant

Every time Claude Code starts, it immediately looks for a file called CLAUDE.md for a set on of instructions to follow. Notice the block letters, this is important.

There are two ways you can create a CLAUDE md file: automatic and manual.

3.1 Manually

If you want to do it manually, open Notepad on Windows or TextEdit on a Mac and write down the kind of instructions you want Claude Code to follow. Please note that you only need to write these instructions in plain language. You don’t need to use any coding or programming language.

You can divide CLAUDE md file into following sections:

#Role (the hash sign here indicates that it’s a heading) Describe the kind of role you would like Claude Code to assume as your research assistant. Give it a few details about your research field and current project.

#Standards Describe academic standards relevant to your field of research. For example, you can tell Claude Code to follow a given citation style or a specific structure of a research paper.

#Writing Style Tell Claude Code the kind of writing style you would like it to follow, whether you want it to respond in academic style or in an informal style.

#Critique Style Describe how you would like Claude Code to critique your work, whether you would like to focus on your argument, evidence, or methodology.

Save the file as CLAUDE.md in your main Claude folder on your computer and you are done.

You don’t need to have a perfectly crafted CLAUDE.md file. You can always go back and edit it as your project evolves.

3.2 Automatically

If you don’t want to create a CLAUDE.md file manually, simply start a chat session in Claude Code and give it details about its role, standard, writing style, and critique style. Then ask it to create a CLAUDE.md file using this information.

Claude Code will create the file and save it to your Claude folder.

3.3 Auto-Memory

As you work through your project, Claude Code will write short notes about your work and save them for its own use. You won’t see them and you don’t need to bother about them too much. Claude Code puts these notes in a folder and manages it on its own.

Each time you start a session, Claude Code reads CLAUDE.md and its own notes and uses them to answer your questions.

Over time, your instructions and Claude Code’s notes gives it enough context about you and your work that it becomes a reliable research assistant.

You can ask Claude Code about its memory by typing “Tell me what you have stored in your memory.” If a certain piece of information is outdated (e.g. a citation style), simply ask it update its memory with the new information.

3.4 What Not to Put in CLAUDE.md

Don’t put any confidential information in CLAUDE.md or anything that you don’t the AI to use.

Don’t let CLAUDE.md become a set of outdated information because that will have considerable impact on its output. You may want to update the file every few weeks.

4: Working with Your Research Documents

A Claude folder does not have to be very neatly organized. This doesn’t mean you start putting irrelevant files in this folder. What it means is that you should not spend any time organizing it. Claude can do that itself. The only thing you may want to keep in mind is not to give your files confusing names like Dissertation (final) (final2) (use this one).

Add a bunch of PDFs, Word files, datasets, interview transcripts, etc. related to your project.

Suppose you have twenty research papers related to your research topic and you want to find a common theme that runs across all of them. Or maybe you have a certain claim or an argument, and you are looking for papers that present evidence supporting or contrasting that claim.

Open the folder in Claude Code and write a prompt like:

Read every PDF in this folder and tell me which articles disagree with the following argument: [paste the argument here]

Claude will read all the PDFs in the folder and will give you the relevant information from these articles. Claude’s answer may be in the form of a table.

4.1 Research Assistant for Literature Review

If you are a biomedical researcher or a social scientist who frequently runs systematic reviews, download fifty research articles and put them in a folder titled “Systematic Review with Claude.”

Open the folder in Claude Code and give it your screening (inclusion/exclusion) criteria and ask it to screen all the papers in the folder.

Claude Code will screen the papers according to your criteria and give you the results in the form of a table.

4.2 Working with Transcripts

If you are qualitative researcher, you can add interview transcripts in the Claude folder and ask it extract information related to a given topic.

For example, you can ask it to extract how each respondent answer a given question.

4.3 Give Claude a Tedious Task

Put fifty-odd PDFs in a folder and open it in Claude Code. Then ask it to go through them all and rename them using their titles.

You will see that Claude Code has done the needful in a couple of minutes.

4.4 Asking Claude Code to Create Files

Since your project is going to evolve, you would want Claude Code to create certain files for you too so that can you go back to them if needed. It will also help Claude Code with easy retrieval as the project develops.

Anytime you ask Claude Code to do a significant task like screening papers or extracting information from transcripts, ask it to save your answer in folder as a file. Generally, Claude Code will save these files as markdown (md), which take up very less space and are very easy for Claude Code to retrieve information from. But you can also ask it to create a Word file or an Excel sheet.

5: Claude Code “Skills”

A Skill is a set of instructions that makes Claude Code a specialist for one task. Just like CLAUDE.md file, a Skill is also a markdown file written in plain English. And just like CLAUDE.md, you can create a Skill file both manually and automatically.

Once you create a Skill, Claude Code will remember when to use it. You do not have to remember yourself. But you can always invoke a Skill if want to, by using the forward-slash command.

The easiest way to create a Skill is to ask Claude Code to do it for you. Let’s say, you have regular Zoom calls, and you have transcripts of those calls. For every call or transcript, you want to extract actionable items or things to do.

To create a Skill, start a Claude Code session and simply ask it to create a Skill for extracting actionable items from Zoom transcripts.

Claude Code will get to work. It will ask you follow-up questions and create a Skill file that you can edit if you want to. Maybe you want Claude Code to follow a specific structure while responding.

Once the Skill is created, restart Claude Code and the Skill will be ready to use.

5.1 Difference between CLAUDE.md and Skills

CLAUDE.md contains global instructions about you and your project. It gives Claude Code the big picture about you and your research.

Skills, on the other hand, are meant for particular tasks. These files contain information that are much more specific and granular. CLAUDE.md, Skill, and auto-memory work in concert to give you the best possible response.

5.2 What Not to Delegate to Claude Code

Claude Code is great at labor intensive, time consuming, and repetitive tasks. Outsource these tasks to Claude Code. But Claud Code will not be able to create what actually counts as scholarship because it won’t be able to give you new and original arguments. It can synthesize information that you can then use in service of your argument, but the job of coming up with an original argument remains yours as a researcher.

Chapter 2: Organizing a Longer Academic Project

In the first chapter, we learned how to open a single folder, add your PDFs, and give Claude Code a CLAUDE.md file, which contains instruction for Claude Code. That kind of a set up works for a shorter project or when you are starting on Claude Code.

But as academic researchers, our projects run over months and even years accumulating hundreds of papers and several drafts.

In this chapter, we will learn how to structure a longer academic project with the help of Claude Code.

1: Structing a Longer Project

Let’s assume that we are working on a project like a dissertation, a monograph, or a research paper. If you organize a project like this in one folder with only one CLAUDE.md file, Claude will end up giving you the same kind of results. It won’t be able to give you precise and customized results suitable for your work.

Think of it this way, if you want your (human) research assistant to draft a section of your paper, clean a dataset, or annotate an article, you will give them a different set of instructions for each of these task.

We can use this exact organizing scheme in Claude Code by creating subfolders.

1.1 Subfolders for Better Organization

Let’s say you are working on a dissertation for which you have a main folder called “My Dissertation.” Inside the main folder, create subfolders:

  • Literature for PDFs and notes on published scholarship

  • Chapters for drafts of your chapters

  • Data for datasets

  • Notes for meeting notes and ideas

  • Correspondence for advisor emails, co-author exchanges, reviewer reports

This kind of organization will help both you and Claude Code. If you have to work on a draft of a chapter, you can go straight to the Chapters folder.

Similar is the case with Claude Code. If you ask it a question about, say, a certain data point, it will know to look for it in the Data folder.

1.2 CLAUDE.md files for Subfolders

In the 101 tutorial, we wrote a CLAUDE.md file, which is a set of instructions that Claude Code reads every time it starts a session.

In your main dissertation, write a CLAUDE.md file that tells Claude Code about you and your project in general terms. We’ll call this “global” CLAUDE.md file.

It doesn’t mean you should be vague. Be precise but give it the big picture. We will have time for specificity later. Treat this CLAUDE.md as your project’s constitution.

Inside each subfolder, put another CLAUDE.md file that applies only to that particular subfolder. We’ll call these “local” CLAUDE.md files. The purpose of local CLAUDE.md files in subfolder is to give Claude Code specific instructions about these tasks without bloating the main CLAUDE.md file.

For example, you’re the CLAUDE.md file in your Chapters subfolder might say:

If I ask you to critique my draft, follow the structure: argument, evidence, literature, counterargument. Always use MLA 9th edition citation style unless I specify otherwise.

You CLAUDE.md for the Data subfolder may contain an instruction like:

Treat all CSV files and Excel sheets as raw data unless I specify otherwise. Never overwrite any raw files. Save the cleaned versions with _clean added at the end of file names.

And your CLAUDE.md file for the Correspondence folder might say:

Always prioritize points that are common between the review reports and co-author exchanges.

1.3 Nested CLAUDE.md Files

When Claude Code works in a subfolder, it reads two CLAUDE.md files: one, which is in the subfolder and the other, which is in the main folder. These nested CLAUDE.md files give Claude Code a clear about what your overall project is about and how to respond to specific questions precisely.

1.4 Output Styles for Local CLAUDE.md Files

You should also consider adding a brief instruction about output style in each local CLAUDE.md file.

For example, in the Literature subfolder, you can ask Claude Code to give you a table with columns for argument, evidence, relevance to your project when you ask it to summarize a paper. Similarly, in the Notes subfolder, you can ask it to respond in bullet points.

You can always go back and revise these instructions.

1.5 Practical Example/Exercise

Open your main dissertation folder in Claude Code and type the following prompt:

Read the five papers that I added to the Literature subfolder today and tell me which ones support or refute my arguments in “Chapter 3 – Outline.md” in the Chapters subfolder.

Claude Code will read the global CLAUDE.md file and two local CLAUDE.md files in the Literature and Chapters subfolders and tells you which paper supports or refutes your arguments.

1.6 What Not to Do

Don’t duplicate instructions in global and local CLAUDE.md files. It’s unnecessary and will lead Claude Code to process more tokens.

The local CLAUDE.md files in subfolders should not contradict instructions in the global CLAUDE.md file. If there is a contradiction, Claude Code will follow the more specific instruction, but you will end up confused.

2: Plan Mode and Custom Slash Commands

A long academic project like a dissertation or a research paper involves certain repetitive tasks. For example, you may be screening papers for literature review over and over. You will have to write an outline every time you start drafting a chapter. If you write zero drafts (also known as free writing), you will need to “clean” them up almost on a daily basis.

But there are also tasks that complex and not repetitive. For example, responding to reviewers’ feedback requires a serious engagement with their critical feedback followed by rewriting your manuscript.

Claude Code can help you with both types of tasks. For complex, one-off tasks, Claude Code offers a Plan Mode and for repetitive tasks, it has Custom Slash Commands.

2.1 Plan Mode

Generally, when you give Claude Code a task, it immediately gets to work. For small, low-stakes tasks, it works fine. For example, you ask Claude Code to rename all PDFs in your Literature subfolder using their titles and author names. Claude Code does that immediately.

But this approach does not produce desirable results for complex tasks. Suppose you have your raw notes on thirty-five research papers, and you ask Claude Code to synthesize your notes. If Claude Code misunderstands an instruction for any reason, you will only realize once it has completed the task.

The Plan Mode gives you more control over Claude Code. Instead of acting immediately, it writes out a step-by-step plan of what it is going to do. You read the plan if you don’t agree with something, you ask it to amend the plan accordingly.

You can find the Plan Mode in the permissions menu under the chat bar. You can also open by using Ctrl + Shift + M. Or you can simply ask Claude Code to show you the plan in the prompt before executing anything.

2.2 When to Use Plan Mode

The Plan Mode is best suited for complex tasks involving three or more steps, a task that involves with more than one subfolder, or a task that produces a length output. Examples may include, synthesizing your notes, screening studies for a systematic review, or cleaning a dataset and producing a codebook.

You will not ask your (human) research assistant to just go and “draft chapter three” without asking them about their plan. The Plan Mode in Claude Code works the same way.

2.3 Custom Slash Commands

A Slash Command is a shortcut. Claude Code has several inbuilt Slash Commands. Open your Claude Code and type in forward slash, and it will show you a list of inbuilt Slash Commands. When you type in, for example the inbuilt Slash Command, /schedule, Claude Code will create a scheduled task that can run on demand or automatically.

A Slash Command is nothing more than a set of instructions written in plain English that Claude Code follows. You can think of it as a lengthy prompt that don’t have to type every time you want to use it for a repetitive task.

Recall, in Part 5 of the 101 tutorial, we learned to create a Skill both manually and automatically. If we create a Skill automatically, it will give us a Custom Slash Command.

When you create a Custom Slash Command, Claude Code will create an .md file in .claude/commands folder on your computer. You need to know this path so that if you have to edit the .md file, you’d know where to find it.

2.4 Creating First Custom Slash Command

The simplest way to create a Custom Slash Command is to ask Claude Code to create one for you. For example, you can open Claude Code, and type in the following:

Create a Slash Command called /firstdraft that converts my raw notes in my Notes folder into cohesive and coherent paragraphs without any redundant words of phrases.

Claude Code will write a set of instructions in an .md file and put it in the .claude/commands folder. Once Claude Code is done create the Slash Command, restart the session and type in forward slash. You will see /firstdraft in the menu.

You can build a library of Custom Slash Commands written specifically for your project.

2.5 What Not to Do

Do not write Slash Commands for tasks you do once every six months. Those Commands will crowd your Slash Menu and will likely get outdated as your project evolves.

Do not add lengthy instructions involving multi-step processes in a Slash Command file. Keep one Slash Command for one specific, repetitive task. If your instructions exceed fifteen lines, you most likely need two Slash Commands.

For longer, complex tasks, do not skip the Plan Mode.

3: Subagents for Parallel Research Task

Up till now, we have only looked at tasks that can be done in a single Claude Code session either in Plan Mode or with Custom Slash Commands. You have one AI assistant that you work with in the main panel.

But for a longer project like a dissertation or a research paper, you may need multiple AI assistants. That’s where subagents come in.

3.1 Why One Assistant Is Not Enough

In longer projects, we come across two problems while using an AI agent like Claude Code.

If you ask Claude Code to read through twenty PDFs in your Literature folder, every page of every paper becomes part of the conversation for Claude Code. You ask it several questions, and it answers you.

Now all the text in the papers and your conversations is part of Claude Code’s memory for that session. Now if you ask it draft an outline for Chapter 4 of your dissertation, it’s responses will become slow and lack clarity because of all the context. This is called “context clutter.”

Secondly, in a single session, you can only assign Claude Code tasks sequentially. If you want three different critiques of your manuscript (one from a theorist, one from an informationist, and one from Reviewer 2), you can’t run them sequentially in a single session because each critique will influence the next one because of context clutter.

You want three independent sessions for a task like this.

3.2 What is a Subagent?

Think of a subagent as a specialist version of Claude Code with its own instructions and, more importantly, its own context window. Context window is Claude Code’s working memory for a single conversation. Everything Claude Code can “see” at any give moment from your files to your prompts to its own responses to instructions in CLAUDE.md sits inside the context window. When you ask a question, Claude Code uses its context window to answer.

Like Custom Slash Commands, a subagent also exists as an .md file. But unlike a Slash Command, which has no context window, a subagent has one.

Another important difference between a Slash Command and a subagent is that unlike a Slash Command, a subagent does not read the CLAUDE.md file. It has its own instructions in an .md file and that’s about it.

A subagent will have a very specific role, for example, a “Citation Checker” or a “Critical Reviewer.” And each agent has its own context. When you delegate a task from your main session to a subagent, its reading and reasoning will stay inside the subagent. You will only get the final answer. This way you can keep your main session from getting context clutter.

3.3 Subagents for Researchers

While the exact type of subagents that you need would depend on your project, following are a few general examples.

  • Literature Reviewer Subagent: reads every new PDF added to the Literature folder and gives you structured summaries with regard to your argument.

  • Citation Checker Subagent: takes a draft chapter and verifies every cited source against papers in the Literature folder and points out missing references.

  • Methodology Auditor Subagent: for empirical projects, checks if your methods section is consonant with data and analyses.

  • Reviewer 2 Subagent: critiques your drafts as a hostile reviewer.

3.4 Creating a Subagent

Just like creating Custom Slash Commands, the easiest way to create a subagent is to ask Claude Code to make one. Open a session and type:

Create a subagent called Citation Checker. It will take a draft from the Chapters folder, list every in-text citation, verify each one against papers in the Literature folder. Then it will create a markdown file with missing references. The subagent must never edit or change the draft.

Claude Code will create a file citation-checker.md and put it in the Agents folder inside your .claude folder.

Restart the session and your subagent is ready to use. To deploy a subagent, simply ask Claude Code to use it. For example, “Use Citation Checker on chapter_4.md in the Chapters folder.”

If you want, you can always go and edit the subagent .md file to suit your requirements.

3.5 Example: Parallel Critique

Suppose you have finished drafting a chapter and now you want feedback on it before you send it out to your supervisor or colleague. Open a session and type:

In parallel, get Methodology Auditor and Reviewer 2 to read and critique chapter_4 in the Chapters folder and give me review reports. Save the two reports as chatper_4_critiques under the subagent’s name in the same folder.

Both the subagents will use their own respective contexts to read and evaluate your draft. Once it’s done, you will have the two critiques as two separate files. Your main session never had to add your draft, or anything related in its context window.

Please note this may take a few minutes depending on the model you may be using.

3.6 What Not to Do

Do not create a subagent for minor tasks.

Do not give your subagents overlapping responsibilities.

Never let your subagent to edit your drafts. A subagent should always produce its reports as separate files.

4: Connecting Claude Code to Other Apps

Until now, now your project has remained within Claude Code with no integration with any other app. Everything Claude Code reads, edits, writes exists inside your project folder. But academic projects like dissertations and research papers involve complex organizational and structural processes that are spread across various applications. For example, your citations are in Zotero, your drafts in Google Drive, and your meeting notes in Zoom.

How do we integrate these apps with our Claude Code?

In 2024, Anthropic introduced a method called Model Context Protocol (MCP) that lets users integrate apps like Zoom and Google Drive with Claude Code.

You don’t need to bother about what MCP is and how it works. You only need to know how to connect different apps using MCP.

4.1 How to Connect and App with Claude Code

Open your Claude Code and in the top-left corner, you will see an option “Customize.” Click on it and then select “Connect your apps” on the following screen.

This will show you Connectors, a list of apps approved by Anthropic to be used in Claude Code. Look for apps like Zoom or Google Drive and click on “Connect” on the following screen.

You will be prompted to grant Claude Code permissions. Once you do that your app will be connected with Claude Code.

4.2 Practical Examples

Connect your Zoom with Claude Code, open a session and type:

Pull the transcript of the three recent calls I had with my colleague. Extract all comments related to Chapter 4 in Drafts. Save all extracted comments in a new file in the Correspondence folder with today’s date.

4.3 Connectors and Subagents

As your project evolves, you can use a combination of Connectors and subagents to make your processes efficient.

For example, you can set up a subagent called Literature Reviewer that uses PubMed or arxiv databases available in the list of Connectors.

4.4 What Not to Do

Do not install too many Connectors. Be selective and install only the ones related to your project.

Do not connect apps that may have confidential information that you don’t want to share with AI. For example, if your Slack contains messages with unpublished confidential data, don’t connect it.

5: Hooks and Scheduled Tasks

One of the most important parts of any research project is to have a backup of all your files. You don’t want to have a single copy of your dissertation on a computer that crashes three days before your defense is due.

5.1 What is a Hook?

Hooks in Claude Code can automate the process of creating backups. A Hook is a short set of instructions that fires automatically when a specific event happens in Claude Code. Once you set up Hook, you won’t need to remember to use it. Claude Code will use it on its own.

5.2 Creating Your First Hook

The easiest way to create a Hook is to simply ask Claude Code to create one. Open a Claude Code session and type:

Set up a pre-edit safety hook that copies a chapter and saves its current version before it starts editing it.

This Hook will create a backup version of any chapter that you ask Claude Code to edit.

Once the Hook is ready to use, ask Claude Code the following

Edit Chapter_4.md in Drafts in light of the comments in the transcript of today’s Zoom meeting.

Claude Code will create a backup of the original file, place it in a backup folder, and edit a copy of it in the Drafts folder.

5.3 What are Scheduled Tasks

Longer academic writing projects involve tasks that need to be done at regular intervals. For example, you want to run literature scans every week to stay abreast of the latest publications.

You can set up Scheduled Tasks just like Hooks in Claude Code. Simply describe what should happen and when and Claude Code will write a routine for that. Scheduled Tasks will use the Connectors and subagents that we discussed in earlier parts.

5.4 Use Cases of Scheduled Tasks

As a researcher, you would like to schedule a regular backup of your drafts. You can ask Claude Code to create a Draft Backup task that copies everything in the Drafts folder and saves it to backup folder with a date stamp.

5.5 Example

Open a Claude Code session and type:

Create a Scheduled Task that runs every Monday morning at 9am. It should use the PubMed MCP to pull new papers on social media and mental health published in the last week. It should then hand over the papers to the Literature Review subagent to screen them. Save the screening table to a subfolder called Weekly Scans in the Literature folder.

5.6 What Not to Do

Do not set up Hooks or Scheduled Tasks involving deletion of any file.

Do not create too many Hooks so that you have difficulty remembering them. Or you can maintain a list of Hooks separately to remind you.

Do not set up a Hook or a Scheduled Task for something that you have not done at least four times manually.

Chapter 3: Building Subagents for Academic Tasks

The previous two chapters covered how to get started on Claude Code and how to organize a longer research project like a dissertation or a monograph in it.

In this chapter, we will learn about creating subagents and chaining them to build a research pipeline so that we can automate a variety of research tasks.

We will also learn how to maintain a version history of our project so that if we need to go back to a previous version, we can do so easily.

1: Chaining Subagents into a Research Pipeline

In Claude Code, you can not only create subagents (AI assistants for a specialized task) but also chain them together so that when Subagent 1 is done, it hands over its output to Subagent 2. And when Subagent 2 is done, it hands over its output to Subagent 3, and so on.

Think of it a relay race in which one runner hands the baton to the next one after completing their assigned task.

To create subagents and chain them together, you don’t need any coding skills whatsoever. As long as you can read and in plain English, you are good to go.

1.1 What is a Subagent?

A subagent is a specialized assistant with three characteristics. First, it is designed for doing one very specific task. Second, it has its own working memory. Third, it exists as a file that Claude Code creates on your computer.

The separate memory feature of a subagent is important because when you invoke a subagent in the middle of a session, it doesn’t clog up your session. Instead, it accomplishes what it’s supposed to and gives you the result as a file in your working folder.

1.2 Why Chain Subagents?

A subagent can only do a very specific task within the whole academic writing and research process. If you have multiple subagents, you will want to chain them together so that the output of one subagent feeds into the next.

Let’s say you have a subagent called “First-Drafter” that takes transcription of your raw voice notes, removes redundant words from them, and gives you a cohesive draft as 01_firstdraft. You have a second subagent called “Literature-Discoverer” that takes your 01_firstdraft, looks up relevant papers, and gives you a list as 02_relevantpapers.

Now what you want is to chain the two subagents together, so that when you upload your transcripts, “First-Drafter” hands over 01_firstdraft to “Literature-Discoverer” and you get the final product, a list of relevant papers.

1.3 Setting Up a Research Pipeline

To set up a research pipeline, let’s consider the example of the systematic review process. I am taking this as an example because a systematic review has clearly demarcated stages that are easily understood.

We will build a research pipeline with the following subagents:

  • Importer-Deduplicator Subagent: removes duplicates from imported files (RIS, PubMed, txt, etc.) and create 01_deduplicated.csv

  • Title/Abstract Screener Subagent: screens titles and abstracts in 01_deduplicated.csv according to your inclusion/exclusion and save the results in 02_title_abstract_screen.csv

  • Full-Text Screener Subagent: screens full texts of studies included in 02_title_abstract_screen.csv according to the criteria and save the results in 03_fulltext_screen.csv

  • Data Extractor Subagent: pulls the predefined fields (population, design, sample size, outcomes) from each included study in 03_fulltext_screen.csv and save the results in 04_extraction_table.csv

Before you start creating subagents, figure out the kind of pipeline that will work for the task you want to accomplish.

Since we are taking the example of a systematic review, we will also need a protocol with inclusion and exclusion criteria.

1.4 Setting Up a Project Folder

Create a new folder on your computer titled “Systematic Review with Subagents.” In this folder, create a protocol.md file containing your inclusion/exclusion criteria.

Also, create a subfolder called “Imported Papers” in which you will add RIS, PubMed, BibTeX, etc. files containing the metadata of papers. Almost all databases let you download the metadata as RIS files.

1.5 Building Subagents One at a Time

Start by building and testing one subagent at a time. This way if there is any error or problem in the workflow, you will be able to figure it out easily.

Open your “Systematic Review with Subagents” folder in Claude Code and type:

Create a subagent called Importer-Deduplicator. It jobs is to read every file in the “Imported Papers” folder, combine them into one single list, and remove duplicate paper. It should look at DOIs and paper titles to remove duplicates. After it’s done, it should save the results in a file titled 01_deduplicated.csv. It must show how many records it started with, how many duplicates it removed, and how many remain. It must never edit, modify, or delete any files in “Imported Papers.”

Claude Code may ask you follow-up questions after which it will tell you when the subagent is ready to use. You may have to restart the session, so the subagent loads properly.

Start a session and type the following:

Use Importer-Deduplicator on all files in “Imported Papers” folder.

The subagent will deduplicate the studies and create a file tiled 01_deduplicated.csv.

At this stage, you want to open 01_deduplicated.csv in Excel and see for yourself if the deduplicator subagent worked properly or not. If it didn’t work as expected, simply tell Claude Code to update the subagent according to your requirements.

Once you are satisfied with your first subagent, move on to the next one, Title/Abstract Screener. Type the following in your session:

Create a subagent for me called TA-Screener. It should read 01_records.csv and protocol.md. Then it should evaluate every paper in 01_records.csv according to the screening criteria in protocol.md and mark every paper as include, exclude, or unclear. It should save the results in a new file called 02_title_abstract_screen.csv, which contains the titles and abstracts of every study and a screening decision. It must never change, edit, or delete 01_records.csv or protocol.md.

Once your subagent is ready to deploy, type the following:

Run TA-Screener on 01_records.csv

The subagent will screen the studies and will give you 02_title_abstract_screen.csv. Go through this file to see if the subagent worked properly.

Follow the similar workflow to create and test two more subagents: Full-Text Screener and Data Extractor.

You can use the following prompts to create these two subagents.

Full-Text Screener

Create a subagent called Full-Text Screener. It should read 02_title_abstract_screen.csv and take only the records marker include. Then it should match each record against PDFs in the Full Texts folder. The it should evaluate the full text PDFs against the screening criteria in protocol.md. After it’s done, it should save the results in a new file 03_fulltext_screen.csv. It must never modify, edit, or delete any existing files including 02_title_abstract_screen.csv and protocol.md.

Data Extractor

Create a subagent for me called Data Extractor. It should read 03_fulltext_screen.csv and take only the studies marked include and match them against PDFs in the Full Texts folder. Then it should extract the following information from the included PDFs: title, study design, objectives, sample size, country, interventions. If there is no relevant information available for a field in a paper, it should mark it “Not available.” It must never guess or extrapolate. It must never modify, edit, or delete any existing files.

1.6 Chaining Subagents

Once you are satisfied with the performance of your individual subagents, you can chain them together. Please make sure there is no mismatch between the file names you give to your subagents, because such a mismatch will break the chain.

Before you chain the subagents, you should switch to Plan Mode. This way Claude Code will give you a complete plan before executing anything. If you spot an error, you can easily ask Claude Code to rectify it.

Take an RIS file containing 20-50 studies and add it to your “Imported Papers” folder. Then type the following:

Run the systematic review pipeline on “Imported Papers” folder in the following order: Importer-Deduplicator, then TA-Screener. Stop after each stage and give me an update.

Since this is your first time orchestrating such a chain of subagents, you want to make sure that each subagent is handing over the required to file to the next one.

Once you are satisfied that the subagents are working properly, you can chain all four of them and run the pipeline on a larger set of studies.

1.7 What Not to Do

Do not give one subagent several tasks. Each subagent must have only specific task, the completion of which generates your desired output.

Do not chain a subagent without testing it individually first.

Do not overlook the file names. They are crucial for the chain to work.

Do not give your subagent pipeline a huge task right out the gate without testing it first on a smaller scale.

Do not let any subagent edit, modify, or delete any existing files.

2: Version Control for Academic Projects

Let’s say, one Tuesday afternoon, you revised a section of Chapter 4, edited a figure in your data folder according to the revisions, and deleted a couple of interview transcripts you thought the revisions had rendered unnecessary. This is a complex workflow spread across multiple documents and folders.

A couple of weeks later, you realize that the revisions are not working the way you had hoped and would like to revert to earlier version. Now you will need to undo multiple changes in the draft, in the data folder, and in transcripts folder. This is a cumbersome process prone to errors.

We can automate this process by using an app called Git.

2.1 What is Git?

Git is a free and open-source application that helps you control different versions of your project. Think of it as a camera that takes photos of your entire project (your drafts, reading materials, raw data, etc.) at once and keeps them in a folder.

This is the main difference between having a version history of a single Word file or a Google Doc. For example, a Word file will show you how your draft looked last Monday before you started revising it. Git, on the other hand, will tell you how your whole project (dissertation, research paper, etc.) looked a specific point in time.

2.2 Setting Up Git in Your Project

To set up Git, go to git-scm.com. Download the application on your computer and install it just like you would any other application.

Open your project (e.g. a folder titled “My Dissertation”) in Claude Code and type:

Set up Git in this folder and create an initial commit with all my current files.

A commit is a snapshot of your folder at a given point in time.

Claude Code will take a snapshot and save it. From this point on, your project has a version history, and you have complete control over it.

One thing you may want to keep in mind is that Git does not store a version of your project in the same format as the files in your folder. For example, a .docx file is not saved as a .docx file.

Git saves a snapshot of your project as a worktree in a hidden folder called .git.

You don’t need to know or understand how Git saves snapshots of your projects or what is in the .git folder. All you need to know is how to save a snapshot and how to recall one if needed.

2.3 Saving Snapshots

After you are done with a work session, the kind where you made substantial changes to your drafts and added new reading materials, ask Claude Code the following:

Commit the current state of the project with the note “Revised Chapter 4, aligned introduction with figure, and added new reading materials.”

Git will take a snapshot of the current state of your project and save it. The note is a commit message that will tell your future self about what was accomplished in a given work session.

It would be good practice to commit a git (or take a snapshot of your whole project) after every meaningful session in which you make substantial changes across documents.

2.4 Retrieving an Earlier Version of the Whole Project

The great thing about Git is that you don’t have to remember anything to retrieve an earlier version of your project.

You can simply ask Claude Code:

Show me the last ten commits with their dates and notes.

Claude Code will give you a dated list with your commit notes. Every commit (snapshot) will have a unique alphanumeric ID. Find the date or version you want to retrieve and type:

Restore the whole project to [Commit ID] and save it as “Restored Project [Date].”

Git will restore that version of your project, and you will have access to everything in it: the drafts, the PDFs, and so on.

2.5 What Not to Do?

Don’t label your commits vaguely with words like “Updates.” After a few times, you will have too many commits with Updates, and you won’t be able to see what exactly a given version contains. Instead, ask Claude Code to add a descriptive note mentioning what was accomplished in a given work session.

Don’t treat commits as something you’d do occasionally. Instead, make it a habit to take snapshots regularly.

Don’t assume that Git is a backup. Git saves a snapshot of your project at a given point in time and saves it on your computer. If your computer crashes, you lose access to these versions. You should keep a backup of your project on cloud or a separate drive.

Similar Articles