From 18e35f51b52fd1d80ec29b38867c49913d86c0df Mon Sep 17 00:00:00 2001 From: Asaf Manela Date: Sun, 8 Feb 2026 14:11:34 +0200 Subject: [PATCH 1/6] feat: add one-line install script Add install.sh that automates the Quick Start installation process: - Creates required directories (~/.claude/skills, ~/.claude/agents, etc.) - Installs Claude Code and Cursor personal skills and subagents - Optionally installs personal CLAUDE.md - Works both locally and via curl pipe to bash Update README.md with curl one-liner for easy installation. Co-Authored-By: Claude Opus 4.5 --- README.md | 24 +++++++-- install.sh | 152 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 173 insertions(+), 3 deletions(-) create mode 100755 install.sh diff --git a/README.md b/README.md index 24ac804..8833b22 100644 --- a/README.md +++ b/README.md @@ -18,14 +18,32 @@ Boris Cherny is the creator of Claude Code. This repo synthesizes his recommenda ## Quick Start -### 1. Copy Project Files +### One-Line Install + +Install all personal skills and subagents with a single command: + +```bash +curl -fsSL https://raw.githubusercontent.com/AsafManela/ChernyCode/main/install.sh | bash +``` + +This installs: +- Claude Code personal skills to `~/.claude/skills/` +- Claude Code subagents to `~/.claude/agents/` +- Cursor personal skills to `~/.cursor/skills-cursor/` +- Cursor subagents to `~/.cursor/agents/` + +### Manual Installation + +If you prefer to install manually, follow the steps below. + +#### 1. Copy Project Files Copy these files to your project root: - `CLAUDE.md` - Edit for your project's context - `AGENTS.md` - Edit for your project's context - `.cursor/skills/` - Copy the skills directory -### 2. Install Personal Files +#### 2. Install Personal Files Copy these from this repo to your home directory for use across all projects: @@ -46,7 +64,7 @@ cp -r cursor_personal_skills/* ~/.cursor/skills-cursor/ cp -r cursor_subagents/* ~/.cursor/agents/ ``` -### 3. (Optional) Install Personal CLAUDE.md +#### 3. (Optional) Install Personal CLAUDE.md Create a personal memory file for all projects: diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..7411726 --- /dev/null +++ b/install.sh @@ -0,0 +1,152 @@ +#!/bin/bash +# +# ChernyCode Installer +# Installs personal skills and subagents for Claude Code and Cursor +# +# Usage: +# curl -fsSL https://raw.githubusercontent.com/AsafManela/ChernyCode/main/install.sh | bash +# +# Or clone the repo and run: +# ./install.sh +# + +set -e + +# Colors for output +RED='\033[0;31m' +GREEN='\033[0;32m' +YELLOW='\033[1;33m' +BLUE='\033[0;34m' +NC='\033[0m' # No Color + +info() { echo -e "${BLUE}[INFO]${NC} $1"; } +success() { echo -e "${GREEN}[OK]${NC} $1"; } +warn() { echo -e "${YELLOW}[WARN]${NC} $1"; } +error() { echo -e "${RED}[ERROR]${NC} $1"; exit 1; } + +# Determine source directory +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" + +# Check if running from repo or via curl +if [[ -f "$SCRIPT_DIR/CLAUDE.md" ]]; then + SOURCE_DIR="$SCRIPT_DIR" + info "Running from local repository: $SOURCE_DIR" +else + # Running via curl - clone to temp directory + TEMP_DIR=$(mktemp -d) + trap "rm -rf $TEMP_DIR" EXIT + info "Cloning ChernyCode repository..." + git clone --depth 1 https://github.com/AsafManela/ChernyCode.git "$TEMP_DIR" 2>/dev/null || \ + error "Failed to clone repository. Check your internet connection." + SOURCE_DIR="$TEMP_DIR" + success "Repository cloned" +fi + +echo "" +echo "============================================" +echo " ChernyCode Installer" +echo "============================================" +echo "" + +# Step 1: Create directories +info "Creating directories..." + +mkdir -p ~/.claude/skills +mkdir -p ~/.claude/agents +mkdir -p ~/.cursor/skills-cursor +mkdir -p ~/.cursor/agents + +success "Directories created" + +# Step 2: Install Claude Code personal skills +info "Installing Claude Code personal skills..." + +if [[ -d "$SOURCE_DIR/claude_personal_skills" ]]; then + for skill_dir in "$SOURCE_DIR"/claude_personal_skills/*/; do + if [[ -d "$skill_dir" ]]; then + skill_name=$(basename "$skill_dir") + cp -r "${skill_dir%/}" ~/.claude/skills/ + success " Installed skill: $skill_name" + fi + done +else + warn " No Claude personal skills found" +fi + +# Step 3: Install Claude Code subagents +info "Installing Claude Code subagents..." + +if [[ -d "$SOURCE_DIR/claude_subagents" ]]; then + for agent_file in "$SOURCE_DIR"/claude_subagents/*.md; do + if [[ -f "$agent_file" ]]; then + agent_name=$(basename "$agent_file") + cp "$agent_file" ~/.claude/agents/ + success " Installed agent: $agent_name" + fi + done +else + warn " No Claude subagents found" +fi + +# Step 4: Install Cursor personal skills +info "Installing Cursor personal skills..." + +if [[ -d "$SOURCE_DIR/cursor_personal_skills" ]]; then + for skill_dir in "$SOURCE_DIR"/cursor_personal_skills/*/; do + if [[ -d "$skill_dir" ]]; then + skill_name=$(basename "$skill_dir") + cp -r "${skill_dir%/}" ~/.cursor/skills-cursor/ + success " Installed skill: $skill_name" + fi + done +else + warn " No Cursor personal skills found" +fi + +# Step 5: Install Cursor subagents +info "Installing Cursor subagents..." + +if [[ -d "$SOURCE_DIR/cursor_subagents" ]]; then + for agent_file in "$SOURCE_DIR"/cursor_subagents/*.md; do + if [[ -f "$agent_file" ]]; then + agent_name=$(basename "$agent_file") + cp "$agent_file" ~/.cursor/agents/ + success " Installed agent: $agent_name" + fi + done +else + warn " No Cursor subagents found" +fi + +# Step 6: Optional - Install personal CLAUDE.md +echo "" +if [[ ! -f ~/.claude/CLAUDE.md ]]; then + read -p "Install personal CLAUDE.md to ~/.claude/CLAUDE.md? (y/N) " -n 1 -r + echo + if [[ $REPLY =~ ^[Yy]$ ]]; then + cp "$SOURCE_DIR/CLAUDE.md" ~/.claude/CLAUDE.md + success "Personal CLAUDE.md installed" + info "Edit ~/.claude/CLAUDE.md to customize your preferences" + fi +else + warn "~/.claude/CLAUDE.md already exists, skipping" +fi + +echo "" +echo "============================================" +echo -e "${GREEN}Installation complete!${NC}" +echo "============================================" +echo "" +echo "Installed to:" +echo " ~/.claude/skills/ - Claude Code personal skills" +echo " ~/.claude/agents/ - Claude Code subagents" +echo " ~/.cursor/skills-cursor/ - Cursor personal skills" +echo " ~/.cursor/agents/ - Cursor subagents" +echo "" +echo "Next steps:" +echo " 1. Copy CLAUDE.md and AGENTS.md to your project root" +echo " 2. Copy .cursor/skills/ to your project's .cursor/ directory" +echo " 3. Customize the files for your project" +echo "" +echo "For more info, visit: https://github.com/AsafManela/ChernyCode" +echo "" From c6b8386f7184d7cb78c7f85701411564a458938e Mon Sep 17 00:00:00 2001 From: Asaf Manela Date: Sun, 8 Feb 2026 14:19:41 +0200 Subject: [PATCH 2/6] fix: handle non-interactive mode for optional CLAUDE.md When running via curl | bash, stdin is not a TTY so the read prompt doesn't work. Now detects non-interactive mode and shows a curl command users can run to manually install CLAUDE.md. Co-Authored-By: Claude Opus 4.5 --- install.sh | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/install.sh b/install.sh index 7411726..c83af61 100755 --- a/install.sh +++ b/install.sh @@ -121,12 +121,19 @@ fi # Step 6: Optional - Install personal CLAUDE.md echo "" if [[ ! -f ~/.claude/CLAUDE.md ]]; then - read -p "Install personal CLAUDE.md to ~/.claude/CLAUDE.md? (y/N) " -n 1 -r - echo - if [[ $REPLY =~ ^[Yy]$ ]]; then - cp "$SOURCE_DIR/CLAUDE.md" ~/.claude/CLAUDE.md - success "Personal CLAUDE.md installed" - info "Edit ~/.claude/CLAUDE.md to customize your preferences" + if [[ -t 0 ]]; then + # Interactive mode - prompt user + read -p "Install personal CLAUDE.md to ~/.claude/CLAUDE.md? (y/N) " -n 1 -r + echo + if [[ $REPLY =~ ^[Yy]$ ]]; then + cp "$SOURCE_DIR/CLAUDE.md" ~/.claude/CLAUDE.md + success "Personal CLAUDE.md installed" + info "Edit ~/.claude/CLAUDE.md to customize your preferences" + fi + else + # Non-interactive (curl | bash) - skip prompt, show instructions + info "To install personal CLAUDE.md, run:" + echo " curl -fsSL https://raw.githubusercontent.com/AsafManela/ChernyCode/main/CLAUDE.md -o ~/.claude/CLAUDE.md" fi else warn "~/.claude/CLAUDE.md already exists, skipping" From 1ec7295a44116fe4fab89aec20d67050456f0a96 Mon Sep 17 00:00:00 2001 From: Asaf Manela Date: Sun, 8 Feb 2026 14:29:01 +0200 Subject: [PATCH 3/6] feat: install CLAUDE.md by default - CLAUDE.md is now installed automatically (not optional) - If file exists: prompt to overwrite in interactive mode, skip in non-interactive - Simplifies the curl one-liner experience Co-Authored-By: Claude Opus 4.5 --- install.sh | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/install.sh b/install.sh index c83af61..ebfeec3 100755 --- a/install.sh +++ b/install.sh @@ -118,25 +118,30 @@ else warn " No Cursor subagents found" fi -# Step 6: Optional - Install personal CLAUDE.md -echo "" +# Step 6: Install personal CLAUDE.md +info "Installing personal CLAUDE.md..." + if [[ ! -f ~/.claude/CLAUDE.md ]]; then + cp "$SOURCE_DIR/CLAUDE.md" ~/.claude/CLAUDE.md + success "Personal CLAUDE.md installed" + info "Edit ~/.claude/CLAUDE.md to customize your preferences" +else + # File exists - ask user what to do if [[ -t 0 ]]; then # Interactive mode - prompt user - read -p "Install personal CLAUDE.md to ~/.claude/CLAUDE.md? (y/N) " -n 1 -r + warn "~/.claude/CLAUDE.md already exists" + read -p "Overwrite with new version? (y/N) " -n 1 -r echo if [[ $REPLY =~ ^[Yy]$ ]]; then cp "$SOURCE_DIR/CLAUDE.md" ~/.claude/CLAUDE.md - success "Personal CLAUDE.md installed" - info "Edit ~/.claude/CLAUDE.md to customize your preferences" + success "Personal CLAUDE.md updated" + else + info "Kept existing CLAUDE.md" fi else - # Non-interactive (curl | bash) - skip prompt, show instructions - info "To install personal CLAUDE.md, run:" - echo " curl -fsSL https://raw.githubusercontent.com/AsafManela/ChernyCode/main/CLAUDE.md -o ~/.claude/CLAUDE.md" + # Non-interactive - don't overwrite existing file + warn "~/.claude/CLAUDE.md already exists, skipping (run interactively to overwrite)" fi -else - warn "~/.claude/CLAUDE.md already exists, skipping" fi echo "" From 041df0d9305e21f62a444073fccfc4e2eaf33a37 Mon Sep 17 00:00:00 2001 From: Asaf Manela Date: Sun, 8 Feb 2026 14:31:57 +0200 Subject: [PATCH 4/6] chore: update URLs to upstream repository Co-Authored-By: Claude Opus 4.5 --- README.md | 2 +- install.sh | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 8833b22..9788d2a 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ Boris Cherny is the creator of Claude Code. This repo synthesizes his recommenda Install all personal skills and subagents with a single command: ```bash -curl -fsSL https://raw.githubusercontent.com/AsafManela/ChernyCode/main/install.sh | bash +curl -fsSL https://raw.githubusercontent.com/meleantonio/ChernyCode/main/install.sh | bash ``` This installs: diff --git a/install.sh b/install.sh index ebfeec3..bb1cc33 100755 --- a/install.sh +++ b/install.sh @@ -4,7 +4,7 @@ # Installs personal skills and subagents for Claude Code and Cursor # # Usage: -# curl -fsSL https://raw.githubusercontent.com/AsafManela/ChernyCode/main/install.sh | bash +# curl -fsSL https://raw.githubusercontent.com/meleantonio/ChernyCode/main/install.sh | bash # # Or clone the repo and run: # ./install.sh @@ -36,7 +36,7 @@ else TEMP_DIR=$(mktemp -d) trap "rm -rf $TEMP_DIR" EXIT info "Cloning ChernyCode repository..." - git clone --depth 1 https://github.com/AsafManela/ChernyCode.git "$TEMP_DIR" 2>/dev/null || \ + git clone --depth 1 https://github.com/meleantonio/ChernyCode.git "$TEMP_DIR" 2>/dev/null || \ error "Failed to clone repository. Check your internet connection." SOURCE_DIR="$TEMP_DIR" success "Repository cloned" @@ -160,5 +160,5 @@ echo " 1. Copy CLAUDE.md and AGENTS.md to your project root" echo " 2. Copy .cursor/skills/ to your project's .cursor/ directory" echo " 3. Customize the files for your project" echo "" -echo "For more info, visit: https://github.com/AsafManela/ChernyCode" +echo "For more info, visit: https://github.com/meleantonio/ChernyCode" echo "" From d833fd2121dd56ababa64380af82cdaa252543d2 Mon Sep 17 00:00:00 2001 From: Asaf Manela Date: Sun, 8 Feb 2026 14:34:12 +0200 Subject: [PATCH 5/6] docs: clarify that one-liner installs personal CLAUDE.md Co-Authored-By: Claude Opus 4.5 --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 9788d2a..467c329 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,7 @@ This installs: - Claude Code subagents to `~/.claude/agents/` - Cursor personal skills to `~/.cursor/skills-cursor/` - Cursor subagents to `~/.cursor/agents/` +- Personal CLAUDE.md to `~/.claude/CLAUDE.md` ### Manual Installation From e7332c66d5a18e0a467d5d602ae1939122634bbf Mon Sep 17 00:00:00 2001 From: Asaf Manela Date: Sun, 8 Feb 2026 17:11:52 +0200 Subject: [PATCH 6/6] fix: harden install script for curl-pipe and quoted trap - Check BASH_SOURCE[0] is set and verify claude_personal_skills dir exists to avoid false-positive local-repo detection when piped via curl | bash - Use single-quoted trap to properly handle paths with spaces (SC2064) Co-Authored-By: Claude Opus 4.6 --- install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index bb1cc33..46c846e 100755 --- a/install.sh +++ b/install.sh @@ -25,16 +25,16 @@ warn() { echo -e "${YELLOW}[WARN]${NC} $1"; } error() { echo -e "${RED}[ERROR]${NC} $1"; exit 1; } # Determine source directory -SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]:-}")" 2>/dev/null && pwd)" # Check if running from repo or via curl -if [[ -f "$SCRIPT_DIR/CLAUDE.md" ]]; then +if [[ -n "${BASH_SOURCE[0]:-}" && -d "$SCRIPT_DIR/claude_personal_skills" ]]; then SOURCE_DIR="$SCRIPT_DIR" info "Running from local repository: $SOURCE_DIR" else # Running via curl - clone to temp directory TEMP_DIR=$(mktemp -d) - trap "rm -rf $TEMP_DIR" EXIT + trap 'rm -rf "$TEMP_DIR"' EXIT info "Cloning ChernyCode repository..." git clone --depth 1 https://github.com/meleantonio/ChernyCode.git "$TEMP_DIR" 2>/dev/null || \ error "Failed to clone repository. Check your internet connection."