Skip to content

sankalpsharmaa/claude-config-public

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Claude Code Configuration

A modular, version-controlled configuration for Claude Code with rules, agents, skills, hooks, and slash commands. Designed for academic researchers but adaptable to any workflow.

What's Included

Directory Purpose Loaded
settings.json Permissions, env vars, hooks config Session start
CLAUDE.md Lightweight global instructions Every message
rules/ Path-specific rules (load conditionally) When path matches
agents/ Subagent definitions for delegation On Agent tool call
skills/ Domain knowledge, workflows On /skill or auto-match
commands/ Slash command definitions On /command
hooks/ Lifecycle scripts (pre-tool, post-error) On events

Rules (Path-Specific Loading)

File Triggers On
global.md Always loaded
stata.md **/*.do, **/*.ado, **/*.dta
python.md **/*.py, **/*.ipynb
research.md **/analysis/**, **/*.tex
gis.md **/*.shp, **/*.geojson, **/*.gpkg, **/*.tif
data-work.md **/data/**
directory-structure.md **/code/**, **/a/**, **/b/**
writing.md Writing tasks
r.md **/*.R, **/*.Rmd

Skills

Includes domain-specific skill packs for: econometrics, quantitative spatial economics, scientific visualization, statistical analysis, web scraping, Google Earth Engine, Dask, SymPy, survey design, technical writing, content research, and more.

Agents

Subagent definitions for context-preserving delegation: quick-search, code-explainer, doc-summarizer, dependency-checker, data-profiler, git-helper, economics-researcher, data-scientist, python-pro, and more.

Commands

Slash commands for: email drafting (/write-mail), brainstorming (/brainstorm), statistical analysis (/stats), visualization (/viz), prompt engineering (/prompt), writing assistance (/write), and more.

Architecture

~/.claude/                      ~/claude-config/ (git repo)
├── settings.json ──────────────► settings.json
├── CLAUDE.md ──────────────────► CLAUDE.md
├── agents/ ────────────────────► agents/
├── commands/ ──────────────────► commands/
├── hooks/ ─────────────────────► hooks/
├── rules/ ─────────────────────► rules/
└── skills/ ────────────────────► skills/

All files in ~/.claude/ are symlinks to this repo. Edit here, commit, push. Changes take effect immediately.

Setup

Prerequisites

Quick Start

# Clone this repo
git clone https://github.com/sankalpsharmaa/claude-config-public.git ~/claude-config

# Backup existing config if any
[ -d ~/.claude ] && mv ~/.claude ~/.claude.backup

mkdir -p ~/.claude

# Create symlinks
ln -sf ~/claude-config/settings.json ~/.claude/settings.json
ln -sf ~/claude-config/CLAUDE.md ~/.claude/CLAUDE.md
ln -sf ~/claude-config/agents ~/.claude/agents
ln -sf ~/claude-config/commands ~/.claude/commands
ln -sf ~/claude-config/hooks ~/.claude/hooks
ln -sf ~/claude-config/rules ~/.claude/rules
ln -sf ~/claude-config/skills ~/.claude/skills

# Make hooks executable
chmod +x ~/claude-config/hooks/*

One-Liner

git clone https://github.com/sankalpsharmaa/claude-config-public.git ~/claude-config && \
mkdir -p ~/.claude && \
ln -sf ~/claude-config/settings.json ~/.claude/settings.json && \
ln -sf ~/claude-config/CLAUDE.md ~/.claude/CLAUDE.md && \
ln -sf ~/claude-config/agents ~/.claude/agents && \
ln -sf ~/claude-config/commands ~/.claude/commands && \
ln -sf ~/claude-config/hooks ~/.claude/hooks && \
ln -sf ~/claude-config/rules ~/.claude/rules && \
ln -sf ~/claude-config/skills ~/.claude/skills && \
chmod +x ~/claude-config/hooks/*

Customization

This config is opinionated and built for econometric research workflows. To adapt it:

  1. settings.json: Edit permissions, add your own allow/deny rules
  2. rules/global.md: Adjust banned phrases, output limits, agent routing tables
  3. rules/: Add or modify path-specific rules for your file types
  4. commands/write-mail.md: The email drafting command uses [YOUR_NAME], [YOUR_WEBSITE], etc. placeholders. Replace these with your actual info in the reference files under commands/write-mail-references/
  5. skills/: Add domain-specific skills for your field

Auto-Sync on Session Start

The settings.json includes a hook that pulls latest changes on every Claude Code session:

{
  "hooks": {
    "SessionStart": [{
      "matcher": "",
      "hooks": [{
        "type": "command",
        "command": "cd ~/claude-config && git pull --quiet 2>/dev/null || true"
      }]
    }]
  }
}

Hooks

Hook Purpose
pre-bash Safety checks on dangerous commands
pre-edit / pre-write File modification guards
post-python-edit Auto-runs ruff format + ruff check --fix
post-latex-edit.sh LaTeX post-processing
post-tool-error Error logging
notify Desktop notifications
lib/utils.sh Shared utilities (ripgrep support, block() helper)

Dependencies

Recommended tools for full functionality:

brew install ripgrep ruff

License

This configuration is shared as a reference. Use and adapt freely.

About

Modular Claude Code configuration with rules, agents, skills, hooks, and commands for academic research workflows

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors