Skip to content
Automation
Skill

/cleaning-up-research-sessions

Safely remove intermediate files from completed research sessions while preserving important data

From plugin
auto-empirical-research-skills
4.9k200 skills

Claude Code

$ npx -y skills add brycewang-stanford/Auto-Empirical-Research-Skills --skill cleaning-up-research-sessions --agent claude-code

SKILL.md

cleaning-up-research-sessions.SKILL.md
name: Cleaning Up Research Sessions
description: Safely remove intermediate files from completed research sessions while preserving important data
when_to_use: After research session is complete and consolidated. When research folder has accumulated temporary files. Before archiving or sharing research session.
version: 1.0.0

<!-- โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•— โ•‘ ๆœฌๆ–‡ไปถไธบๅผ€ๆบ Skill ๅŽŸๅง‹ๆ–‡ๆกฃ๏ผŒๆ”ถๅฝ•ไป…ไพ›ๅญฆไน ไธŽ็ ”็ฉถๅ‚่€ƒ โ•‘ โ•‘ CoPaper.AI ๆ”ถ้›†ๆ•ด็† | https://copaper.ai โ•‘ โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

ๆฅๆบไป“ๅบ“: https://github.com/kthorn/research-superpower ้กน็›ฎๅ็งฐ: research-superpower ๅผ€ๆบๅ่ฎฎ: MIT License ๆ”ถๅฝ•ๆ—ฅๆœŸ: 2026-04-02

ๅฃฐๆ˜Ž: ๆœฌๆ–‡ไปถ็‰ˆๆƒๅฝ’ๅŽŸไฝœ่€…ๆ‰€ๆœ‰ใ€‚ๆญคๅค„ๆ”ถๅฝ•ๆ—จๅœจไธบ็คพไผš็ง‘ๅญฆๅฎž่ฏ็ ”็ฉถ่€… ๆไพ› AI Agent Skills ็š„้›†ไธญๅ‚่€ƒใ€‚ๅฆ‚ๆœ‰ไพตๆƒ๏ผŒ่ฏท่”็ณปๅˆ ้™คใ€‚ -->

Cleaning Up Research Sessions

Overview

Remove intermediate files created during research workflow while preserving all important data.

**Core principle:** Conservative cleanup with user confirmation. Never delete anything important.

When to Use

Use this skill when:

  • Research session is complete and consolidated
  • Preparing to archive or share research session folder
  • Research folder has accumulated temporary/intermediate files
  • User explicitly asks to clean up

**When NOT to use:**

  • Research is still in progress
  • User hasn't reviewed final outputs yet
  • Unsure what files are safe to delete

Files That Are ALWAYS KEPT

**NEVER delete these (protected list):**

**Core outputs:**

  • `SUMMARY.md` - Enhanced findings with methodology
  • `relevant-papers.json` - Filtered relevant papers
  • `papers-reviewed.json` - Complete screening history
  • `papers/` directory - All PDFs and supplementary files
  • `citations/citation-graph.json` - Citation relationships

**Methodology documentation:**

  • `screening-criteria.json` - Rubric definition (if exists)
  • `test-set.json` - Rubric validation papers (if exists)
  • `abstracts-cache.json` - Cached abstracts for re-screening (if exists)
  • `rubric-changelog.md` - Rubric version history (if exists)

**Auxiliary documentation (if exists):**

  • `README.md` - Project overview
  • `TOP_PRIORITY_PAPERS.md` - Curated priority list
  • `evaluated-papers.json` - Rich structured data

**Project configuration:**

  • `.claude/` directory - Permissions and settings
  • `*.py` helper scripts that were created - Keep for reproducibility

Files That May Be Cleaned Up

**Candidates for removal (with confirmation):**

**Intermediate search results:**

  • `initial-search-results.json` - Raw PubMed results before screening
  • Safe to delete: Data is in papers-reviewed.json
  • Reason to keep: Shows raw search results for reproducibility

**Temporary files:**

  • `*.tmp` files
  • `*.swp` files (vim swap files)
  • `.DS_Store` (macOS)
  • `__pycache__/` (Python cache)
  • `*.pyc` (Python compiled)

**Log files:**

  • `*.log` files
  • `debug-*.txt` files

Cleanup Workflow

Step 1: Analyze Research Session

cd research-sessions/YYYY-MM-DD-description/

# List all files with sizes
find . -type f -exec ls -lh {} \; | awk '{print $5, $9}' | sort -rh

**Identify files by category:**

  • Core outputs (MUST keep)
  • Methodology files (SHOULD keep)
  • Intermediate files (candidates for cleanup)
  • Temporary files (safe to delete)

Step 2: Present Cleanup Plan to User

**Show what will be deleted:**

๐Ÿงน Cleanup Analysis for: research-sessions/2025-10-11-btk-selectivity/

Files to KEEP (protected):
  โœ… SUMMARY.md (45 KB)
  โœ… relevant-papers.json (12 KB)
  โœ… papers-reviewed.json (28 KB)
  โœ… papers/ (14 PDFs, 32 MB)
  โœ… citations/citation-graph.json (5 KB)
  โœ… screening-criteria.json (2 KB)
  โœ… abstracts-cache.json (156 KB)

Files that CAN be removed (intermediate):
  ๐Ÿ—‘๏ธ  initial-search-results.json (8 KB) - Raw PubMed results
  ๐Ÿ—‘๏ธ  .DS_Store (6 KB) - macOS metadata

Total space to recover: 14 KB

Proceed with cleanup? (y/n/review)

**Options:**

  • `y` - Delete intermediate files
  • `n` - Cancel cleanup, keep everything
  • `review` - Show contents of each file before deciding

Step 3: Confirm Deletions

**Before deleting ANY file:**

1. **Verify it's not in protected list** 2. **Check file isn't referenced in SUMMARY.md** 3. **Confirm with user one more time**

**Example confirmation:**

About to delete:
- initial-search-results.json (8 KB)

This file contains raw PubMed search results. The data is preserved in
papers-reviewed.json, so this is safe to delete.

Confirm deletion? (y/n)

Step 4: Perform Cleanup

**Delete confirmed files:**

# Move to trash instead of rm (safer)
# On macOS:
mv initial-search-results.json ~/.Trash/

# On Linux:
mv initial-search-results.json ~/.local/share/Trash/files/

# Or use rm if user confirms
rm initial-search-results.json

**Report results:**

โœ… Cleanup complete!

Removed:
- initial-search-results.json (8 KB)
- .DS_Store (6 KB)

Space recovered: 14 KB

Protected files preserved:
- All 8 core files kept
- All 14 PDFs kept
- All methodology documentation kept

Step 5: Verify Integrity

**After cleanup, verify critical files:**

# Check core files exist
test -f SUMMARY.md && echo "โœ“ SUMMARY.md"
test -f relevant-papers.json && echo "โœ“ relevant-papers.json"
test -f papers-reviewed.json && echo "โœ“ papers-reviewed.json"
test -d papers && echo "โœ“ papers/ directory"

# Verify JSON files are valid
jq empty relevant-papers.json && echo "โœ“ relevant-papers.json valid JSON"
jq empty papers-reviewed.json && echo "โœ“ papers-reviewed.json valid JSON"

**Report to user:**

โœ… Integrity check passed
   - All core files present
   - All JSON files valid
   - All PDFs intact

Special Cases

Case 1: Large abstracts-cache.json

**If abstracts-cache.json is very large (>100 MB):**

โš ๏ธ  abstracts-cache.json is 256 MB

This file enables re-screening if you update the rubric. Options:
1. Keep (recommended if you might refine rubric)
2. Compress (gzip to ~50 MB, can decompress later)
3. Delete (only if research is final and won't
Read more
@brycewang-stanford
Ships withauto-empirical-research-skills

## ๐Ÿ”ฅ ๅŠ›่ ยท StatsPAI โ€” Stata ไธŽ R ็š„ Python ๅนณๆ›ฟ๏ผŒไธบ AI Agent ่€Œ็”Ÿ ๐Ÿ” Stata / R ๅนณๆ›ฟ๏ผšreghdfeใ€csdidใ€rdrobustใ€synthใ€fixestใ€did ็ญ‰ๅธธ็”จๅ‘ฝไปคๅœจ Python ไธญไธ€็ซ™ๅผๆ›ฟไปฃ๏ผŒไธ€ไธช import statspai as sp ๆžๅฎš DID / RD / IV / SCM / DML / matching ๐Ÿค– ้ขๅ‘ Agent ่ฎพ่ฎก๏ผš็ป“ๆž„ๅŒ–็ป“ๆžœๅฏน่ฑก + ๅ†…็ฝฎ MCP Server๏ผŒClaude / Codex

4.9k200 skills
Get the whole plugin

Stars on GitHub

Momentum

stars in total
4.9k
Star history of brycewang-stanford/Auto-Empirical-Research-Skills on GitHub, a chart by star-history.com

More skills from other plugins.

agent-builder

agent-builder

Load immediately after an Agent intent, before the first agent_builder_* call. Governs how you create, configure, test, andโ€ฆ

n8n2w209k
@n8n-io@n8n-ioInstall Skill
browser-use

browser-use

Direct browser control via CDP for web interaction: automation, scraping, testing, screenshots, and site/app work. Also coversโ€ฆ

@browser-use@browser-useInstall Skill
agent-browser

agent-browser

Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, fillingโ€ฆ

@vercel-labs-2@vercel-labs-2Install Skill
add-anydoc

add-anydoc

Add local office-document-to-Markdown conversion to NanoClaw agent containers with the pinned Firecrawl AnyDoc CLI. Use whenโ€ฆ

@nanocoai@nanocoaiInstall Skill

Questions about cleaning-up-research-sessions.

Which coding agents can use cleaning-up-research-sessions?
cleaning-up-research-sessions installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.