snippets
Installation
SKILL.md
snippets
Raycast snippets skill dispatcher. Manages a store of topic-isolated snippet markdown files (one file per language/framework/topic) plus a generated Raycast .json beside each .md.
Skill directory resolution
Workflows invoke the vendored converter at scripts/md2snippets.py. Resolve the skill package root once and export it so every workflow uses the same path — this works both from the repo skills/snippets/ checkout and from an installed copy. Do NOT rely on $0 (it is the invoking shell, not this file):
# Resolve the skill package root (the directory containing this SKILL.md).
if [ -n "${BASH_SOURCE:-}" ]; then
SKILL_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
else
SKILL_DIR="${SKILL_DIR:-$HOME/.claude/skills/snippets}"
fi
export SKILL_DIR
When dispatching, resolve SKILL_DIR to the directory that contains this SKILL.md (the skill package root) and export it so the workflow bash blocks can invoke python3 "$SKILL_DIR/scripts/md2snippets.py".