scientific-writer-init
The /scientific-writer-init slash command sets up a Scientific Writer project configuration by creating or updating a CLAUDE.md file with research and writing templates. Use this command to initialize a new project workspace or integrate Scientific Writer capabilities into an existing Claude project structure, with options to back up, merge, or replace existing configurations.
mkdir -p ~/.claude/commands && curl -fsSL https://raw.githubusercontent.com/K-Dense-AI/claude-scientific-writer/HEAD/commands/scientific-writer-init.md -o ~/.claude/commands/scientific-writer-init.mdscientific-writer-init.md
# Scientific Writer Project Setup
When the user runs `/scientific-writer:init`, do the following:
## ⚠️ CRITICAL RULE: NEVER READ THE TEMPLATE FILE
**Throughout this entire process, you must NEVER use the read_file tool on the template file. The template file is 1362 lines long and reading it wastes time and tokens. Only use terminal commands (`cp`, `cat`, `mv`) to handle the file.**
## Step 1: Check for Existing CLAUDE.md
1. Check if a `CLAUDE.md` file exists in the current working directory.
2. If it exists:
- Ask the user whether to:
- a) **Back up** the existing file as `CLAUDE.md.bak` and replace it with the Scientific Writer configuration, or
- b) **Merge** the Scientific Writer settings into the existing file (append to end), or
- c) **Cancel** the operation.
3. Wait for user response before proceeding.
## Step 2: Locate the Template File Path
**CRITICAL: Do NOT use the read_file tool. Do NOT read the template contents. Only locate the file path.**
Find the path to the Scientific Writer template file. Use one of these methods:
1. **Use glob_file_search** to find `CLAUDE.scientific-writer.md` in the templates directory
2. **Use list_dir** to check if the file exists in known locations
3. **Directly try these paths** (in order):
- `/Users/vinayak/Documents/claude-scientific-writer/templates/CLAUDE.scientific-writer.md`
- `~/.claude/plugins/*/claude-scientific-writer/templates/CLAUDE.scientific-writer.md`
Once you have the path, immediately proceed to Step 3. **Do NOT read or verify the file contents.**
## Step 3: Create or Update CLAUDE.md
**All options below must use terminal commands only. Do NOT read the template file contents.**
Based on the user's choice (or create new if no existing file):
### Option A: Replace (with backup)
Use terminal commands to:
1. Rename existing `CLAUDE.md` to `CLAUDE.md.bak`:
```bash
mv CLAUDE.md CLAUDE.md.bak
```
2. Copy the template file to `CLAUDE.md`:
```bash
cp {template_path} CLAUDE.md
```
3. Print: "✅ Backed up existing CLAUDE.md to CLAUDE.md.bak and created new Scientific Writer configuration"
### Option B: Merge
Use terminal commands to:
1. Append a separator to existing `CLAUDE.md`:
```bash
echo -e "\n\n---\n\n# Scientific Writer Configuration (Added by Plugin)\n" >> CLAUDE.md
```
2. Append the template file contents directly (without reading):
```bash
cat {template_path} >> CLAUDE.md
```
3. Print: "✅ Merged Scientific Writer configuration into existing CLAUDE.md"
### Option C: Create New (Default)
If no existing file, use terminal command to:
1. Copy the template file to `CLAUDE.md`:
```bash
cp {template_path} CLAUDE.md
```
2. Print: "✅ Created CLAUDE.md with Scientific Writer configuration"
## Step 4: Summarize What Was Installed
After writing the file, provide a brief summary:
```
🎉 Scientific Writer has been initialized in this project!
📋 What's Included:
- A deep research and writing tool that combines AI-driven research with well-formatted written outputs
- Complete scientific writing workflow with real-time literature search and verified citations
- 19+ specialized skills for academic writing:
• research-lookup: Real-time literature search
• peer-review: Systematic manuscript evaluation
• citation-management: BibTeX and reference handling
• clinical-reports: Medical documentation standards
• research-grants: NSF, NIH, DOE proposal support
• scientific-slides: Research presentations
• latex-posters: Conference poster generation
• And 12 more specialized skills...
📝 Document Types Supported:
- Scientific papers (Nature, Science, NeurIPS, IEEE, etc.)
- Clinical reports (case reports, trial documentation)
- Grant proposals (NSF, NIH, DOE, DARPA)
- Research posters and presentations
- Literature reviews and systematic reviews
🚀 Getting Started:
1. Your CLAUDE.md file is now configured at: {path to CLAUDE.md}
2. All skills are automatically available in this project
3. Start with prompts like:
- "Create a Nature paper on [topic]"
- "Generate an NSF grant proposal for [research]"
- "Review this manuscript using peer-review standards"
- "Create conference slides on [topic]"
💡 Tips:
- The research-lookup skill automatically finds real papers and citations
- All documents default to LaTeX format (publication-ready)
- Peer review is conducted automatically after paper generation
- You can edit the CLAUDE.md file to customize behavior
📚 Documentation:
- Skill details: Browse the skills/ directory
- Full docs: https://github.com/K-Dense-AI/claude-scientific-writer
Happy writing! 🔬📄
```
## Step 5: Final Reminders
Remind the user:
- The `CLAUDE.md` file can be opened and edited manually at any time
- All 19 skills are now available for use in this project
- They can ask "What skills are available?" to see the full list
- They can reference specific skills like "@research-lookup" in their prompts
## Error Handling
If any errors occur during file creation:
- Report the specific error to the user
- Suggest manual steps (e.g., creating the file manually)
- Provide the template paths to try:
- `/Users/vinayak/Documents/claude-scientific-writer/templates/CLAUDE.scientific-writer.md` (local dev)
- `~/.claude/plugins/*/claude-scientific-writer/templates/CLAUDE.scientific-writer.md` (installed plugin)
- If template still can't be found, offer to create a basic CLAUDE.md with minimal scientific writing instructionsComprehensive citation management for academic research. Search Google Scholar and PubMed for papers, extract accurate metadata, validate citations, and generate properly formatted BibTeX entries. This skill should be used when you need to find papers, verify citation information, convert DOIs to BibTeX, or ensure reference accuracy in scientific writing.
Generate professional clinical decision support (CDS) documents for pharmaceutical and clinical research settings, including patient cohort analyses (biomarker-stratified with outcomes) and treatment recommendation reports (evidence-based guidelines with decision algorithms). Supports GRADE evidence grading, statistical analysis (hazard ratios, survival curves, waterfall plots), biomarker integration, and regulatory compliance. Outputs publication-ready LaTeX/PDF format optimized for drug development, clinical research, and evidence synthesis.
Write comprehensive clinical reports including case reports (CARE guidelines), diagnostic reports (radiology/pathology/lab), clinical trial reports (ICH-E3, SAE, CSR), and patient documentation (SOAP, H&P, discharge summaries). Full support with templates, regulatory compliance (HIPAA, FDA, ICH-GCP), and validation tools.
Document toolkit (.docx). Create/edit documents, tracked changes, comments, formatting preservation, text extraction, for professional document processing.
PDF manipulation toolkit. Extract text/tables, create PDFs, merge/split, fill forms, for programmatic document processing and analysis.
Presentation toolkit (.pptx). Create/edit slides, layouts, content, speaker notes, comments, for programmatic presentation creation and modification.
Spreadsheet toolkit (.xlsx/.csv). Create/edit with formulas/formatting, analyze data, visualization, recalculate formulas, for spreadsheet processing and analysis.
Generate or edit images using AI models (FLUX, Gemini). Use for general-purpose image generation including photos, illustrations, artwork, visual assets, concept art, and any image that isn't a technical diagram or schematic. For flowcharts, circuits, pathways, and technical diagrams, use the scientific-schematics skill instead.