/mind-reader:initfrom mind-reader
Sets up the mind-reader plugin: creates directories, validates history, installs optional sentiment analysis, and computes an initial baseline from Claude Code session history.
Ships in mind-reader. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Set up the mind-reader plugin for first use.
Check if vaderSentiment is available:
python3 -c "from vaderSentiment.vaderSentiment import SentimentIntensityAnalyzer; print('VADER available')" 2>/dev/null || echo "VADER not installed"
If not installed, ask the user if they want sentiment analysis:
cd ${CLAUDE_PLUGIN_ROOT}
uv sync --group sentiment
Then update the hook shebang to use the plugin's Python:
sed -i "1s|.*|#!${CLAUDE_PLUGIN_ROOT}/.venv/bin/python3|" ${CLAUDE_PLUGIN_ROOT}/scripts/hook.py
sed -i "1s|.*|#!${CLAUDE_PLUGIN_ROOT}/.venv/bin/python3|" ${CLAUDE_PLUGIN_ROOT}/scripts/baseline.py
Create the mind-reader data directory:
mkdir -p ~/.claude/mind-reader/sessions
Create the baseline update script at ~/.claude/mind-reader/update-baseline.sh:
#!/bin/bash
# Update mind-reader baseline from Claude Code history
# Run via cron: 0 3 * * * ~/.claude/mind-reader/update-baseline.sh
PLUGIN_CACHE="$HOME/.claude/plugins/cache/vibe-garden/mind-reader"
# Find latest version (sort -V handles semantic versioning)
if [ -d "$PLUGIN_CACHE" ]; then
LATEST_VERSION=$(ls "$PLUGIN_CACHE" | sort -V | tail -1)
PLUGIN_ROOT="$PLUGIN_CACHE/$LATEST_VERSION"
else
echo "Error: Plugin cache not found at $PLUGIN_CACHE" >&2
exit 1
fi
# Use plugin's venv Python if available, otherwise system python3
if [ -x "$PLUGIN_ROOT/.venv/bin/python3" ]; then
PYTHON="$PLUGIN_ROOT/.venv/bin/python3"
else
PYTHON="python3"
fi
"$PYTHON" "$PLUGIN_ROOT/scripts/baseline.py"
Make it executable:
chmod +x ~/.claude/mind-reader/update-baseline.sh
Check that ~/.claude/history.jsonl exists and is valid:
if [ ! -f ~/.claude/history.jsonl ]; then
echo "Error: ~/.claude/history.jsonl not found."
echo "Claude Code creates this file automatically when used."
exit 1
fi
# Check it's valid JSON lines (sample first 10 lines)
head -10 ~/.claude/history.jsonl | while read line; do
echo "$line" | python3 -c "import sys,json; json.load(sys.stdin)" 2>/dev/null || {
echo "Warning: history.jsonl may contain invalid JSON"
break
}
done
Run the baseline computation script (using the same Python as the hook):
${CLAUDE_PLUGIN_ROOT}/scripts/baseline.py
If fewer than 10 sessions exist, warn the user:
Your history has fewer than 10 sessions. Baseline statistics may be unreliable. Continue using Claude Code normally and re-run
/mind-reader:initlater for better baseline data.
If ~/.claude/mind-reader/settings.json doesn't exist, create it with defaults:
{
"enabled": true,
"temporal": {
"enabled": true,
"duration_threshold": "p95",
"prompt_threshold": "p95",
"check_hours": true
},
"sentiment": {
"enabled": true,
"window_size": 5,
"threshold": -0.2,
"min_prompts": 3,
"cooldown_prompts": 10
},
"quiet_until": null
}
Display the crontab entry for the user to add manually:
Add this line to your crontab (run `crontab -e`):
0 3 * * * ~/.claude/mind-reader/update-baseline.sh >> ~/.claude/mind-reader/cron.log 2>&1
This runs the baseline update daily at 3 AM.
~/.claude/mind-reader/ directory exists with sessions/ subdirectoryupdate-baseline.sh is executablebaseline.json exists (even if with insufficient_data: true)settings.json exists with default valuessentiment.enabled: false in settings.json~/.claude/mind-reader/settings.jsonWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub rjroy/vibe-garden --plugin mind-readerOther plugins' skills for the same job