PAI Version: 5.0.0 | Algorithm v6.3.0
Platform: Linux (Ubuntu 24.04, kernel 6.8.0)
Claude Code version: claude-sonnet-4-6
Problem
When a background agent (spawned via Agent(..., run_in_background: true)) calls Skill("Knowledge", "ingest ..."), the ## Customization section in skills/Knowledge/SKILL.md instructs:
"Before executing, check for user customizations at: ~/.claude/PAI/USER/SKILLCUSTOMIZATIONS/Knowledge/"
This instruction is never followed in practice. Background agents treat their spawn prompt as the primary directive. The SKILL.md content — including the Customization section — is lower priority and gets skipped.
The result: PAI/USER/SKILLCUSTOMIZATIONS/Knowledge/PREFERENCES.md is silently ignored every time an INBOX background agent runs.
Setup
- PAI installed at
~/.claude/ on Linux (no launchd, Pulse started manually)
settings.json has a PreToolUse hook with matcher=Skill → http://localhost:31337/hooks/skill-guard
PAI/PULSE/modules/hooks.ts → handleSkillGuard() currently only does blocklist checking — no customization injection
Questions
- Is the skill-guard hook supposed to inject
SKILLCUSTOMIZATIONS/<Skill>/PREFERENCES.md as additionalContext and it is just not implemented yet in my version?
- Or is the expectation that each spawn prompt manually includes an instruction to read PREFERENCES.md?
- Is there a Linux-specific setup step I am missing (e.g. Pulse needs to run as a daemon so the hook fires reliably)?
What I tried
- Confirmed
PREFERENCES.md exists and has content
- Confirmed the skill-guard HTTP hook fires (Pulse running, returns 200 pass-through)
- Confirmed
handleSkillGuard() in hooks.ts has no customization loading logic
- Workaround added to CLAUDE.md Inbox-Pflicht rule: spawn prompt now explicitly includes instruction to read PREFERENCES.md
Proposed fix (implemented locally, not update-safe)
Extended handleSkillGuard() to async, reads SKILLCUSTOMIZATIONS/<skill>/PREFERENCES.md via case-insensitive dir scan, injects content as additionalContext in the hook response. Works when Pulse is running.
Would this be something to upstream into the public PAI repo?
PAI Version: 5.0.0 | Algorithm v6.3.0
Platform: Linux (Ubuntu 24.04, kernel 6.8.0)
Claude Code version: claude-sonnet-4-6
Problem
When a background agent (spawned via
Agent(..., run_in_background: true)) callsSkill("Knowledge", "ingest ..."), the## Customizationsection inskills/Knowledge/SKILL.mdinstructs:This instruction is never followed in practice. Background agents treat their spawn prompt as the primary directive. The SKILL.md content — including the Customization section — is lower priority and gets skipped.
The result:
PAI/USER/SKILLCUSTOMIZATIONS/Knowledge/PREFERENCES.mdis silently ignored every time an INBOX background agent runs.Setup
~/.claude/on Linux (no launchd, Pulse started manually)settings.jsonhas aPreToolUsehook withmatcher=Skill→http://localhost:31337/hooks/skill-guardPAI/PULSE/modules/hooks.ts→handleSkillGuard()currently only does blocklist checking — no customization injectionQuestions
SKILLCUSTOMIZATIONS/<Skill>/PREFERENCES.mdasadditionalContextand it is just not implemented yet in my version?What I tried
PREFERENCES.mdexists and has contenthandleSkillGuard()inhooks.tshas no customization loading logicProposed fix (implemented locally, not update-safe)
Extended
handleSkillGuard()to async, readsSKILLCUSTOMIZATIONS/<skill>/PREFERENCES.mdvia case-insensitive dir scan, injects content asadditionalContextin the hook response. Works when Pulse is running.Would this be something to upstream into the public PAI repo?