From beeeef036bc42f6d9278be7c5223e3b876ad79c7 Mon Sep 17 00:00:00 2001 From: Michael Czechowski Date: Wed, 7 Jan 2026 14:13:59 +0100 Subject: [PATCH] feat(claude-code): add project settings and commands - Add .claude/settings.json with permissions and hooks - Add /format-lessons slash command - Add .claude/settings.local.json to .gitignore --- .claude/commands/format-lessons.md | 8 ++++++++ .claude/settings.json | 29 +++++++++++++++++++++++++++++ .gitignore | 5 ++++- 3 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 .claude/commands/format-lessons.md create mode 100644 .claude/settings.json diff --git a/.claude/commands/format-lessons.md b/.claude/commands/format-lessons.md new file mode 100644 index 0000000..7e38fa4 --- /dev/null +++ b/.claude/commands/format-lessons.md @@ -0,0 +1,8 @@ +Format all lesson JSON files including localized versions. + +Run prettier on all lesson files: +```bash +npx prettier --write "lessons/**/*.json" +``` + +This formats both root lessons (`lessons/*.json`) and localized lessons (`lessons/ar/`, `lessons/de/`, `lessons/es/`, `lessons/pl/`, `lessons/uk/`). diff --git a/.claude/settings.json b/.claude/settings.json new file mode 100644 index 0000000..6b7569f --- /dev/null +++ b/.claude/settings.json @@ -0,0 +1,29 @@ +{ + "permissions": { + "allow": [ + "Bash(git add:*)", + "Bash(git commit:*)", + "Bash(git push:*)", + "Bash(npm run build:*)", + "Bash(grep:*)", + "Bash(npm run format.lessons:*)", + "Bash(xargs:*)", + "Bash(cat:*)", + "Bash(prettier --write:*)" + ], + "deny": ["Read(./.env)", "Read(./.env.*)", "Read(./secrets/**)"] + }, + "hooks": { + "PostToolUse": [ + { + "matcher": "Write(lessons/**/*.json)", + "hooks": [ + { + "type": "command", + "command": "npm run format.lessons 2>/dev/null || true" + } + ] + } + ] + } +} diff --git a/.gitignore b/.gitignore index 65a6eec..a6848d2 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,7 @@ .code node_modules dist -coverage \ No newline at end of file +coverage + +# Claude Code local settings (user-specific) +.claude/settings.local.json \ No newline at end of file