dongzhuoyao

claude-code-config

Use when setting up Claude Code on a new machine, configuring permissions, statusline, or plugins. Contains the standard settings.json and statusline script.

dongzhuoyao 11 1 Updated 3mo ago
GitHub

Install

npx skillscat add dongzhuoyao/tao-research-skills/claude-code-config

Install via the SkillsCat registry.

SKILL.md

Tao's Claude Code Configuration

Standard Claude Code settings for research workflows: bypass all tool permissions, custom statusline, plan-mode default, and plugin setup.

When to Use

  • Setting up Claude Code on a new machine or project
  • Restoring permissions/statusline after a config reset
  • Checking what plugins or permissions are enabled
  • Configuring a new project's .claude/settings.json

Quick Reference

Setting Value
Default mode plan (forces planning before implementation)
Permissions All tools allowed (full bypass)
Statusline Custom bash script with git, cost, tokens, context %
Plugins superpowers, code-simplifier, ralph-loop, claude-md-management, claude-code-setup

Global Settings (~/.claude/settings.json)

{
  "permissions": {
    "allow": [
      "Bash(*)",
      "Read(*)",
      "Write(*)",
      "Edit(*)",
      "Glob(*)",
      "Grep(*)",
      "WebFetch(*)",
      "WebSearch(*)",
      "NotebookEdit(*)",
      "Task(*)"
    ],
    "deny": [],
    "defaultMode": "plan"
  },
  "statusLine": {
    "type": "command",
    "command": "bash /home/tlong01/.claude/statusline-command.sh"
  },
  "enabledPlugins": {
    "superpowers@claude-plugins-official": true,
    "code-simplifier@claude-plugins-official": true,
    "ralph-loop@claude-plugins-official": true,
    "claude-md-management@claude-plugins-official": true,
    "claude-code-setup@claude-plugins-official": true
  }
}

Project-Level Settings (<project>/.claude/settings.json)

Add IDE MCP tools on top of global permissions when using VS Code / Cursor:

{
  "permissions": {
    "allow": [
      "Bash(*)",
      "Read(*)",
      "Write(*)",
      "Edit(*)",
      "Glob(*)",
      "Grep(*)",
      "WebFetch(*)",
      "WebSearch(*)",
      "NotebookEdit(*)",
      "Task(*)",
      "mcp__ide__getDiagnostics(*)",
      "mcp__ide__executeCode(*)"
    ],
    "deny": []
  }
}

Statusline Script (~/.claude/statusline-command.sh)

Custom status bar showing: directory (branch) model $cost tokens ctx% [vim]

#!/usr/bin/env bash
# Claude Code status line script
# Displays: dir | git branch | model | cost | tokens | context % | vim mode

input=$(cat)

cwd=$(echo "$input" | jq -r '.cwd // empty')
model=$(echo "$input" | jq -r '.model.display_name // empty')
used_pct=$(echo "$input" | jq -r '.context_window.used_percentage // empty')
vim_mode=$(echo "$input" | jq -r '.vim.mode // empty')
cost_usd=$(echo "$input" | jq -r '.cost.total_cost_usd // empty')
in_tokens=$(echo "$input" | jq -r '.context_window.total_input_tokens // empty')
out_tokens=$(echo "$input" | jq -r '.context_window.total_output_tokens // empty')

# ANSI escape helper
ESC=$'\033'
RESET="${ESC}[0m"
CYAN="${ESC}[0;36m"
YELLOW="${ESC}[0;33m"
GREEN="${ESC}[0;32m"
RED="${ESC}[0;31m"
BLUE="${ESC}[0;34m"
MAGENTA="${ESC}[0;35m"

# Directory: basename of cwd
if [ -n "$cwd" ]; then
  dir=$(basename "$cwd")
else
  dir=$(basename "$(pwd)")
fi

# Git branch
git_branch=""
if git -C "${cwd:-.}" --no-optional-locks rev-parse --git-dir > /dev/null 2>&1; then
  branch=$(git -C "${cwd:-.}" --no-optional-locks symbolic-ref --short HEAD 2>/dev/null)
  if [ -n "$branch" ]; then
    git_branch=" ${YELLOW}($branch)${RESET}"
  fi
fi

# Context usage (color-coded: green < 50%, yellow 50-80%, red > 80%)
ctx_str=""
if [ -n "$used_pct" ]; then
  used_int=${used_pct%.*}
  if [ "$used_int" -ge 80 ] 2>/dev/null; then
    ctx_color="$RED"
  elif [ "$used_int" -ge 50 ] 2>/dev/null; then
    ctx_color="$YELLOW"
  else
    ctx_color="$GREEN"
  fi
  ctx_str=" ${ctx_color}ctx:${used_pct}%${RESET}"
fi

# Vim mode indicator
vim_str=""
if [ -n "$vim_mode" ]; then
  if [ "$vim_mode" = "NORMAL" ]; then
    vim_str=" ${BLUE}[N]${RESET}"
  else
    vim_str=" ${CYAN}[I]${RESET}"
  fi
fi

# Model (shortened)
model_str=""
if [ -n "$model" ]; then
  model_str=" ${MAGENTA}${model}${RESET}"
fi

# Session cost
cost_str=""
if [ -n "$cost_usd" ]; then
  cost_str=" ${YELLOW}\$${cost_usd}${RESET}"
fi

# Token usage (compact: e.g. 12.3k/4.1k)
token_str=""
if [ -n "$in_tokens" ] && [ -n "$out_tokens" ]; then
  format_tokens() {
    local t=$1
    if [ "$t" -ge 1000000 ] 2>/dev/null; then
      printf "%.1fM" "$(echo "scale=1; $t / 1000000" | bc)"
    elif [ "$t" -ge 1000 ] 2>/dev/null; then
      printf "%.1fk" "$(echo "scale=1; $t / 1000" | bc)"
    else
      printf "%d" "$t"
    fi
  }
  in_fmt=$(format_tokens "$in_tokens")
  out_fmt=$(format_tokens "$out_tokens")
  token_str=" ${CYAN}${in_fmt}in/${out_fmt}out${RESET}"
fi

printf "%s%s%s%s%s%s%s" \
  "${CYAN}${dir}${RESET}" \
  "$git_branch" \
  "$model_str" \
  "$cost_str" \
  "$token_str" \
  "$ctx_str" \
  "$vim_str"

Requires: jq and bc installed on the system.

Installation on a New Machine

# 1. Create Claude config directory
mkdir -p ~/.claude

# 2. Write global settings
cat > ~/.claude/settings.json << 'EOF'
{
  "permissions": {
    "allow": [
      "Bash(*)", "Read(*)", "Write(*)", "Edit(*)",
      "Glob(*)", "Grep(*)", "WebFetch(*)", "WebSearch(*)",
      "NotebookEdit(*)", "Task(*)"
    ],
    "deny": [],
    "defaultMode": "plan"
  },
  "statusLine": {
    "type": "command",
    "command": "bash ~/.claude/statusline-command.sh"
  },
  "enabledPlugins": {
    "superpowers@claude-plugins-official": true,
    "code-simplifier@claude-plugins-official": true,
    "ralph-loop@claude-plugins-official": true,
    "claude-md-management@claude-plugins-official": true,
    "claude-code-setup@claude-plugins-official": true
  }
}
EOF

# 3. Copy statusline script (from tao-research-skills or existing machine)
# The script contents are in this SKILL.md above

# 4. For each project, add .claude/settings.json with IDE tools if needed

Permissions Explained

Permission Purpose
Bash(*) Run any shell command (git, conda, sbatch, etc.)
Read(*) Read any file
Write(*) Create new files
Edit(*) Modify existing files
Glob(*) Find files by pattern
Grep(*) Search file contents
WebFetch(*) Fetch URLs
WebSearch(*) Web search
NotebookEdit(*) Edit Jupyter notebooks
Task(*) Launch subagents
mcp__ide__* IDE integration (VS Code / Cursor only)

The (*) wildcard means all arguments are allowed. The deny: [] list is empty, meaning nothing is blocked.

Plugins

All plugins are from claude-plugins-official. Enable in settings.json under enabledPlugins.

superpowers (Recommended)

The most valuable plugin — provides structured workflows that prevent undisciplined coding. Key sub-skills:

Sub-skill When it fires What it does
brainstorming Before any creative work (features, components) Explores intent, requirements, and design before implementation
systematic-debugging Any bug, test failure, unexpected behavior Structured root-cause analysis before proposing fixes
test-driven-development Before writing implementation code Write tests first, then implement
writing-plans Multi-step tasks with specs Creates structured implementation plans
executing-plans After a plan is written Executes plans with review checkpoints
dispatching-parallel-agents 2+ independent tasks Runs subagents in parallel
subagent-driven-development Independent tasks in current session Parallelizes within one session
requesting-code-review After completing a feature Validates work meets requirements
receiving-code-review When getting feedback Prevents blind agreement — requires technical verification
verification-before-completion Before claiming work is done Runs verification commands; evidence before assertions
using-git-worktrees Feature work needing isolation Creates isolated git worktrees
finishing-a-development-branch Implementation complete, tests pass Guides merge, PR, or cleanup decisions

code-simplifier

Simplifies and refines code for clarity, consistency, and maintainability. Focuses on recently modified code unless instructed otherwise. Use after a feature is implemented to clean up.

ralph-loop

Autonomous development loop — lets Claude work through multi-step tasks with minimal intervention. Sub-commands: ralph-loop (start), cancel-ralph (stop), help (explain).

claude-md-management

Audits and improves CLAUDE.md files. Use when project instructions are stale, incomplete, or after major architectural changes. Sub-skills: revise-claude-md (update with session learnings), claude-md-improver (full audit against quality templates).

claude-code-setup

Analyzes a codebase and recommends Claude Code automations: hooks, subagents, skills, plugins, MCP servers. Use when setting up Claude Code for a new project or optimizing an existing workflow.

Notes

  • defaultMode: "plan" forces Claude to plan before implementing. Override per-session with /chat for quick questions.
  • The statusline script reads JSON from stdin (provided by Claude Code) and outputs ANSI-colored text.
  • Context usage is color-coded: green (< 50%), yellow (50-80%), red (> 80%) — helps you know when to start a new conversation.