Adds claude code configuration.

This commit is contained in:
2025-09-28 15:26:31 -07:00
parent 9877d73814
commit 19fd398c6e
5 changed files with 129 additions and 1 deletions

View File

@@ -0,0 +1,8 @@
---
description: Read all agent-context documentation files
allowed_tools: ["Read", "Glob"]
---
Read all markdown files in the docs/agent-context directory structure. This will load all documentation files that provide context about Talos Linux and Wild Cloud systems.
Please use the Glob tool to find all .md files in docs/agent-context/*/* and then use the Read tool to read each file found.

View File

@@ -0,0 +1,52 @@
#!/bin/bash
# Initialize content variable
content=""
# Start with wildcloud directory - README.md first, then other files
content+="=== wildcloud/README.md ===$'\n'"
content+="$(cat docs/agent-context/wildcloud/README.md)"
content+="$'\n'"
for file in docs/agent-context/wildcloud/*.md; do
if [[ "$(basename "$file")" != "README.md" ]]; then
content+="=== wildcloud/$(basename "$file") ===$'\n'"
content+="$(cat "$file")"
content+="$'\n'"
fi
done
# Then other directories - README.md first in each, then other files
for dir in docs/agent-context/*/; do
dirname=$(basename "$dir")
if [[ "$dirname" != "wildcloud" ]]; then
content+="=== $dirname/README.md ===$'\n'"
if [[ -f "$dir/README.md" ]]; then
content+="$(cat "$dir/README.md")"
content+="$'\n'"
fi
for file in "$dir"*.md; do
if [[ "$(basename "$file")" != "README.md" && -f "$file" ]]; then
content+="=== $dirname/$(basename "$file") ===$'\n'"
content+="$(cat "$file")"
content+="$'\n'"
fi
done
fi
done
# Escape content for JSON (replace quotes and newlines)
escaped_content=$(printf '%s' "$content" | sed 's/\\/\\\\/g; s/"/\\"/g; s/$/\\n/' | tr -d '\n' | sed 's/\\n$//')
# Output as JSON structure
cat << EOF
{
"hookSpecificOutput": {
"hookEventName": "SessionStart",
"suppressOutput": true,
"systemMessage": "Loading AI context.",
"additionalContext": "$escaped_content"
}
}
EOF

15
.claude/settings.json Normal file
View File

@@ -0,0 +1,15 @@
{
// "hooks": {
// "SessionStart": [
// {
// "matcher": "startup|compact",
// "hooks": [
// {
// "type": "command",
// "command": "$CLAUDE_PROJECT_DIR/.claude/scripts/read-ai-context.sh"
// }
// ]
// }
// ]
// }
}