claude init inited

This commit is contained in:
2026-04-24 16:42:22 +08:00
commit 4c9f4f250d
39 changed files with 3185 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
# session-init.ps1 — Claude Code SessionStart hook
# 1. 清除上次会话的 changelog ack 标记
# 2. 检查 .claude/.init-done sentinel缺失时创建 .pending-init 标记文件
# claude-init-recall 规则会检测此文件,确保首次会话确定性触发 claude-init
$input = [Console]::In.ReadToEnd()
# 清除 changelog ack 标记
Remove-Item ".claude\changelog\.changelog-ack" -ErrorAction SilentlyContinue
# 检查 claude-init sentinel
$initDone = ".claude\.init-done"
$pendingInit = ".claude\.pending-init"
if (Test-Path $initDone) {
# sentinel 存在,清理可能残留的 pending 标记
Remove-Item $pendingInit -ErrorAction SilentlyContinue
} else {
# sentinel 缺失,创建 pending 标记供 claude-init-recall 规则检测
New-Item -ItemType File -Path $pendingInit -Force | Out-Null
}
Write-Output '{}'
exit 0