β‘ Slash Commands & Skills
Speed up your workflow with built-in shortcuts and create your own custom commands for tasks you do repeatedly.
In this module
Built-in slash commands
Type / at any point in a Claude Code session to see available commands. Here are the most useful ones:
| Command | What it does | When to use |
|---|---|---|
/help | Show all commands and shortcuts | When you forget something |
/clear | Start a fresh conversation (keep files) | When conversation gets too long |
/compact | Summarise conversation to save context | Long sessions with lots of context |
/status | Show current usage and model info | Check how much context is left |
/model | Switch between Claude models | Use a cheaper model for simple tasks |
/cost | Show estimated cost for this session | Keep track of spending |
/exit | Exit Claude Code | End of session |
/bug | Report a bug to Anthropic | Something isn't working right |
/doctor | Diagnose your Claude Code installation | Something seems broken |
What are skills?
Skills are custom slash commands you create. They're Markdown files that contain
instructions β when you type the skill name with a /, Claude Code reads those instructions
and uses them as context for the current task.
Where skills live
βββ CLAUDE.md
βββ .claude/ β Claude Code config folder
βββ commands/ β Your custom skills go here
βββ balance-table.md
βββ summarise-data.md
βββ referee-response.md
Once a skill file exists, you use it by typing /balance-table (or whatever you named it) in your session.
Creating your own skills
A skill file is just a Markdown file with instructions. Here's how to create one:
# Create the directory
mkdir -p .claude/commands
# Create your skill file
# (Claude Code will help you write the content)
claude
> Create a skill called "balance-table" that generates a
standard balance table comparing treatment and control groups.
Save it to .claude/commands/balance-table.md
Or write it manually. Here's what a skill file looks like:
# .claude/commands/balance-table.md
Create a balance table for the current project's main dataset.
Follow these steps:
1. Look at the CLAUDE.md to identify the main dataset and key variables
2. Load the dataset
3. Create a table comparing treatment vs. control groups for all key variables
4. Include: mean, SD, and p-value of t-test for each variable
5. Format with stars: * p<0.10, ** p<0.05, *** p<0.01
6. Export to output/tables/balance_table.tex and balance_table.xlsx
7. Report how many observations are in each group
Use the statistical software defined in CLAUDE.md.
Follow the coding conventions in CLAUDE.md.
Research skills examples
Inspired by Scott Cunningham's MixtapeTools and Pedro Sant'Anna's workflow, here are skills that researchers commonly create:
/data-audit β Audit a dataset for issues
Perform a comprehensive data audit on the main dataset.
Check for:
- Missing values (by variable, report % missing)
- Duplicates (by key identifier)
- Outliers (values beyond 3 SD from mean for continuous variables)
- Implausible values (negative ages, incomes above $1M, etc.)
- Variables with near-zero variance (might be errors)
Output a formatted report to logs/data_audit.txt
/summarise-data β Quick data summary
Load the main dataset and produce:
1. A table with N, mean, SD, min, max for all numeric variables
2. Frequency tables for all categorical/string variables
3. A note about any obvious data quality issues
Print to screen and save to output/tables/data_summary.tex
/draft-results β Draft results section
Read the main regression results table (output/tables/main_results.tex)
and the balance table (output/tables/balance_table.tex).
Draft a "Results" section for the paper (~600 words).
Rules:
- Only state what the numbers actually show
- Don't make causal claims beyond what's identified
- Reference tables with \ref{} using the LaTeX labels
- End with a robustness check subsection header
/improve-writing β Polish academic prose
Read the file specified after this command.
Improve the writing by:
1. Cutting sentences longer than 30 words in half
2. Replacing passive voice where possible
3. Removing hedge words (arguably, seemingly, quite)
4. Making the first sentence of each paragraph the main point
Show tracked changes (before β after) for every edit.
/check-parallel-trends
Check the parallel trends assumption for my DiD specification.
1. Load the panel dataset from CLAUDE.md
2. Create an event study plot showing pre-treatment trends
3. Run a formal test for pre-trends using the 2 pre-periods
4. Report: are pre-trends parallel? What does the test say?
5. Save the event study plot to output/figures/event_study.pdf
Use the estimator specified in CLAUDE.md (default: fixest::feols)
Community skill libraries
Researchers have published their skill collections on GitHub β a fast way to bootstrap your own library without starting from scratch.
| Repo | Skills available | Best for |
|---|---|---|
| MixtapeTools | DiD event studies, RDD, IV, parallel trends | Causal inference / applied micro |
| dariia-m/my_claude_skills | abstract, academic_writing, event-studies, paper_verification, econ_intro_writing | Paper writing & verification |
| AI-research-feedback | review-paper, review-paper-light, review-paper-code, review-pap, review-grant | Pre-submission self-review |
| results-db-skill | results-db (structured ledger of all regression estimates) | Managing many specifications |
Spotlight: /review-paper
The review-paper skill from Claes BΓ€ckman's AI-research-feedback repo shows what a production-quality skill looks like β it orchestrates six parallel sub-agents, each checking a different dimension:
# .claude/commands/review-paper.md (excerpt from claesbackman/AI-research-feedback)
Run a rigorous pre-submission review of the paper in this project.
Use six parallel review agents:
Agent 1: Spelling and grammar (every sentence)
Agent 2: Internal consistency (tables, figures, text all agree)
Agent 3: Unsupported claims (every factual assertion has a citation or comes from the data)
Agent 4: Mathematics and statistics (check all formulas and reported numbers)
Agent 5: Figures and tables (axis labels, sample sizes, notes)
Agent 6: Contribution quality (is the paper's claim of novelty accurate?)
Synthesise findings into a structured report with severity levels (critical / major / minor).
Save the report to output/review_report.md
Spotlight: /results-db
The results-db-skill solves a common problem: keeping track of dozens of regression specifications across multiple paper drafts.
# Usage β log a result
> /results-db log
outcome: log_yield
sample: full_sample
estimator: OLS with county FE
coef: 0.23
se: 0.05
p_value: 0.000
section: main_text
validation: parallel_trends_passed
# Before submission β run integrity check
> /results-db check-integrity
# Flags: mismatched p-values, failed validations in main text, etc.
# Export for paper
> /results-db export --format latex
Sharing skills with your team
Because skills are just files in your .claude/commands/ folder, they're automatically
shared when you share your project via Git. Your whole lab can use the same skills with zero setup.
~/.claude/commands/ (your home folder) to make them available
in every project you work on. Great for things like /improve-writing or
/data-audit that you want everywhere.
Module 6 Exercise: Build your first skill
Create two custom skills for your research workflow:
- Create
.claude/commands/in one of your project folders. - Ask Claude to help you write a skill called
summarise-datathat generates a summary statistics table for your main dataset. - Create a second skill for something you do regularly (e.g.,
draft-abstract,check-regression, orclean-column-names). - Test both skills by typing
/summarise-datain a Claude Code session.