Skip to content

Commit 49a7392

Browse files
sunwrobertclaude
andcommitted
feat: add init-project script for bootstrapping Claude settings
Bash script to fetch .claude/settings.json and skills from GitHub. Can be run via curl pipe or locally. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 8711f51 commit 49a7392

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

scripts/init-project.sh

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
#!/usr/bin/env bash
2+
# Initialize a new project with Claude Code settings and skills from knowledge-base.
3+
#
4+
# Usage:
5+
# curl -fsSL https://raw.githubusercontent.com/sunwrobert/knowledge-base/main/scripts/init-project.sh | bash
6+
# ./scripts/init-project.sh [target-directory]
7+
8+
set -euo pipefail
9+
10+
REPO="sunwrobert/knowledge-base"
11+
BRANCH="main"
12+
BASE_URL="https://raw.githubusercontent.com/${REPO}/${BRANCH}"
13+
14+
SKILLS=(
15+
bun
16+
conventional-commits
17+
effect-ts
18+
interview-spec
19+
project-starter
20+
ultracite
21+
)
22+
23+
TARGET_DIR="${1:-.}"
24+
25+
echo "Initializing Claude Code settings in: ${TARGET_DIR}"
26+
27+
mkdir -p "${TARGET_DIR}/.claude/skills"
28+
29+
echo "Fetching settings.json..."
30+
curl -fsSL "${BASE_URL}/.claude/settings.json" -o "${TARGET_DIR}/.claude/settings.json"
31+
32+
for skill in "${SKILLS[@]}"; do
33+
echo "Fetching skill: ${skill}..."
34+
mkdir -p "${TARGET_DIR}/.claude/skills/${skill}"
35+
curl -fsSL "${BASE_URL}/skills/${skill}/SKILL.md" -o "${TARGET_DIR}/.claude/skills/${skill}/SKILL.md"
36+
done
37+
38+
echo ""
39+
echo "Done! Initialized:"
40+
echo " .claude/settings.json"
41+
for skill in "${SKILLS[@]}"; do
42+
echo " .claude/skills/${skill}/SKILL.md"
43+
done

0 commit comments

Comments
 (0)