chore: bootstrap Claude setup

Add root CLAUDE.md, docs/architecture.md, LESSONS.md, .env.example,
.claude/settings.json hooks (PostToolUse JS syntax check, Stop hook
validating manifest.json + node --check on all JS), and GitHub
Actions workflows (ci.yml, version.yml) for this plain-JS Chrome
extension with no existing build/lint/test tooling.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
dasemuandClaude Sonnet 5 committed 2026-10-18 15:02:43 +02:00
1 parent c07cbfb614
commit d6598d0b31
9 files changed
+217

No files matched your search

+1
View File
@@ -0,0 +1 @@
2
+17
View File
@@ -0,0 +1,17 @@
#!/usr/bin/env bash
# Stop hook: quickest meaningful check available in this project.
# No test runner or linter is configured yet, so this validates:
# 1. manifest.json is valid JSON.
# 2. every tracked .js file passes `node --check` (syntax only).
set -euo pipefail
cd "$(git rev-parse --show-toplevel)"
node -e "JSON.parse(require('fs').readFileSync('manifest.json', 'utf8'))"
status=0
while IFS= read -r -d '' file; do
node --check "$file" || status=1
done < <(git ls-files -z '*.js')
exit "$status"
+25
View File
@@ -0,0 +1,25 @@
{
"hooks": {
"PostToolUse": [
{
"matcher": "Edit|Write",
"hooks": [
{
"type": "command",
"command": "file=$(cat | python3 -c 'import json,sys; print(json.load(sys.stdin).get(\"tool_input\",{}).get(\"file_path\",\"\"))'); case \"$file\" in *.js) node --check \"$file\" ;; esac"
}
]
}
],
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "bash \"$CLAUDE_PROJECT_DIR/.claude/hooks/stop-check.sh\""
}
]
}
]
}
}