using-skill-enginelisted
Install: claude install-skill nick-railsback/skill-engine
# Using the skill engine
This is the entry-point skill. It detects whether the current directory holds a
contextualizer that has already been set up, and routes to the matching
workflow.
## Routing
When invoked, do the following in order. A contextualizer is installed at
one of three install levels (`~/.claude/skills/`, `~/.claude/local/skills/`,
or `<repo>/.claude/skills/`); its `research/.research-state.json` is
the canonical setup-state marker.
Locate the contextualizer root by searching all three install levels:
```bash
ctx_roots=$(
for root in "$HOME/.claude/skills" "$HOME/.claude/local/skills" "$PWD/.claude/skills"; do
[ -d "$root" ] || continue
find "$root" -mindepth 1 -maxdepth 1 -type d -name '*-context' 2>/dev/null
done
)
# `|| true`: grep -c prints 0 but exits 1 on zero matches — without the
# guard a pipefail/errexit shell dies here instead of reaching case 1.
ctx_count=$(printf '%s\n' "$ctx_roots" | grep -c . || true)
```
### Pending-proposal pre-step (runs before case dispatch)
Before dispatching to a workflow, check for pending proposals — any
`*-context.proposed/` directory that DISCOVER or REFRESH left behind
under the same three install roots:
```bash
proposed_dirs=$(
for root in "$HOME/.claude/skills" "$HOME/.claude/local/skills" "$PWD/.claude/skills"; do
[ -d "$root" ] || continue
find "$root" -mindepth 1 -maxdepth 1 -type d -name '*-context.proposed' 2>/dev/null
done
)
```
If any proposed dirs exist and the requested workf