Tools & Practices
AI for Science
Using AI coding assistants safely and effectively in research — nascent guidance for lab members.
This section is nascent and evolving. The tools and practices here are new, and our guidance will grow as we learn what works. The goal is to help lab members use AI coding assistants safely, productively, and honestly.
Much of this page distills practical guidance from claude-academic-setup, a beginner-friendly setup for academic researchers using Claude Code and OpenAI Codex. That repository is worth reading in full if you want to go deeper.
Why and how we use AI in the lab
AI coding assistants (Claude Code, OpenAI Codex, Cursor, GitHub Copilot) can help with writing, debugging, and explaining code, drafting methods sections, and exploring unfamiliar libraries. They are assistive tools, not autonomous researchers.
Responsibility stays with you. The human researcher is responsible for every line of code, every analysis decision, and every sentence that appears in a paper or report. AI tools can suggest; you must verify, understand, and own the result.
Use AI to accelerate work you can check, not to generate work you do not understand.
Getting started with AI coding assistants
Several AI coding assistants are available. Each has official documentation:
- Claude Code (Anthropic): code.claude.com/docs
- Cursor (AI-integrated IDE): docs.cursor.com
- OpenAI Codex / ChatGPT: platform.openai.com/docs
Start with one tool and learn its permission model, context limits, and how to review its output before trying others.
Data hygiene and patient data
Never paste PHI, patient data, or identifiable human-subjects data into external AI tools. This includes anything that could identify a research participant, session recordings, identifiable EEG filenames, or clinical notes.
This is not optional. It is a matter of HIPAA compliance, IRB protocols, and research ethics. Violations put participants at risk and can end careers.
Before using any AI tool with research data:
- Confirm whether the tool stores or transmits your input.
- Use only de-identified, aggregated, or synthetic data when exploring analysis approaches.
- When in doubt, ask Salman or consult the IRB.
Follow Rutgers policy on generative AI and research data. If you are uncertain about a specific use case, ask first.
Good practices from claude-academic-setup
The claude-academic-setup repository addresses common problems with AI coding assistants: trusting unverified output, losing track of what was done, and accepting changes you do not understand. Here are key practices it recommends:
Plan before you code
Ask the AI to explain what it will do before it edits files. Review the plan yourself. A plan is short enough to read closely; a finished codebase is not.
Keep changes small and reviewable
Ask for surgical changes — only what the task requires. Large, sweeping edits are harder to verify and easier to regret.
Use version control
Commit often. Review diffs before accepting changes. Git gives you a checkpoint, but it does not replace understanding what changed.
Cross-model review
If you use two AI tools (e.g., Claude and Codex), have one review the other’s plan or output. Models from different companies catch different mistakes.
Test analysis code
Run the smallest relevant test after each change. For data analysis, check row counts, key distributions, and expected outputs before trusting a result.
Keep a napkin file
The napkin skill in claude-academic-setup keeps a small file of corrections, lessons, and project notes that persist across sessions. This helps the next session (or the next person) avoid repeating mistakes.
Reproducible evidence
For substantive analyses, save output to a dated log file (e.g., logs/2026-03-08_main-models.log). This provides evidence that the code ran and what it printed — not just what the AI claimed.
Using AI for literature and writing
AI tools can help draft text, suggest citations, and explain unfamiliar papers. They also hallucinate references that do not exist.
Verify every citation. Check that the paper exists, the authors are correct, and the claim matches what the paper actually says. Tools like hallucinator-cli can help check references against databases, but they are not infallible.
Disclose AI use per journal policy. Many journals now require disclosure of AI assistance in writing or analysis. Check the journal’s author guidelines before submission. For example:
- Nature editorial policies (see section on AI tools)
- ICMJE recommendations address AI-assisted authorship
When in doubt, disclose transparently. Reviewers and editors are more forgiving of honest disclosure than of undisclosed assistance discovered later.
Further reading
- claude-academic-setup — the beginner setup this page is based on
- Claude Code documentation
- Cursor documentation
- OpenAI platform documentation
- Nature editorial policies on AI
This section will grow as we develop more experience with these tools in the lab. If you find useful practices or encounter problems, share them so we can update this guide.