dc7e1b7ab9
A `/p/<profile>/webhooks/<route>` request resolved the profile from the URL but ran the route script, prompt render and `skills:` lookup with no profile scope — the runner only enters `_profile_runtime_scope` later, around `handle_message` — so routed webhooks loaded the launch (default) profile's skills and logged "Skill not found" for the routed profile's own. - gateway/platforms/webhook.py: add `_profile_scope(profile)` (nullcontext when no prefix was resolved; `_profile_runtime_scope(get_profile_dir(p))` otherwise, same helper the runner uses) and wrap the script / render / skill-injection block in it. Bare routes are unchanged. - agent/skill_commands.py: `scan_skill_commands` scanned the import-time `SKILLS_DIR` (frozen to the launch home), so even a correctly scoped call listed default's skills; the #88023 home-keyed cache alone could not fix that. Use the call-time `_skills_dir()` there and at the two other SKILLS_DIR-relative sites in the module. - agent/skill_utils.py: `normalize_skill_lookup_name` used the same frozen root, so a routed profile's absolute skill_dir was rejected by `skill_view` ("must be a relative path within the skills directory"). Resolve against `_skills_dir()` — the root `skill_view` itself enforces. Fixes #67277 Co-authored-by: Juani Lezcano <tky.juani@gmail.com> Co-authored-by: webtecnica <75556242+webtecnica@users.noreply.github.com>