mikeparcewski/wicked-garden / skills/core
wicked-garden-core
FlaggedCore utility surface for the wicked-garden plugin: help/overview, first-run setup + codebase onboarding, the wicked-* peer installer, selective state reset, the where-am-i path manifest, and structured issue filing. Use when: "wicked-garden help", "show wicked-garden commands", "what can wicked-garden do", "set up wicked-garden", "setup", "--reconfigure", "onboard this codebase", "install wicked tools", "add peers", "install layers", "reset wicked-garden", "clear state", "--list-projects", "where am I", "path manifest", "report issue", "file a bug", "--list-unfiled", or any former /wicked-garden:{help|setup|install|reset| where-am-i|report-issue} invocation.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 13.4 KB |
| refs/install.md | markdown | 5.3 KB |
| refs/inventory-report.md | markdown | 1.3 KB |
| refs/report-issue.md | markdown | 8.4 KB |
| refs/reset.md | markdown | 4.3 KB |
| refs/runtime.md | markdown | 4.2 KB |
| refs/setup.md | markdown | 23.5 KB |
| refs/templates.md | markdown | 2.3 KB |
refs/runtime.md
View on GitHub# Runtime execution — Python and Node
Reference for the `wicked-garden-core` skill (the former runtime-exec module, folded here in
wave-2 B10). Execute Python and Node scripts using the best available package manager, with automatic
package-manager detection — other skills and agents come here when a script needs execution with correct
runtime resolution. The launcher paragraph in `SKILL.md`'s Runtime section is the short form; this ref is the
detection ladder, the usage patterns and the troubleshooting.
## Recommended: use the `wicked-garden` launcher
For scripts inside this plugin, prefer the launcher. It resolves the plugin
root itself (`WICKED_GARDEN_ROOT` → the host CLI's plugin root → its own npm
package) and the interpreter (`<root>/.venv` → `uv run --project <root>` →
`python3` / `python` / `py -3`) on macOS, Linux and Windows in one call, keeps
the caller's cwd, and never writes under the root. Bare `python3` is not
available on Windows; a flat skills-only install has no `scripts/` at all —
the launcher is what makes both cases work.
```bash
wicked-garden run scripts/{path-to}/your_script.py [args] # .py → python · .mjs/.js → node · .sh → sh
wicked-garden python -c "print('inline python, same interpreter')"
wicked-garden path scripts/qe/lib # absolute path under the plugin root
wicked-garden doctor # what it resolved, and why
```
`scripts/_python.sh` (`python3` → `python` → `py -3`) remains the shim the
plugin's hooks use. The detection logic below is reference material for
scripts that need a different fallback chain (e.g. dependency-aware `uv run`).
## Python Execution Priority
1. **`wicked-garden run`** (preferred for plugin scripts) - Resolves root + interpreter, never writes under the root
2. **uv** - Fast, reliable, handles dependencies automatically
3. **poetry** - Good for projects with poetry.lock
4. **.venv/bin/python** - Pre-existing virtual environment
5. **`python3` / `_python.sh` shim** - Cross-platform fallback; may miss dependencies
## Node Execution Priority
1. **pnpm** (preferred) - Fast, disk-efficient
2. **npm** - Standard, widely available
3. **yarn** - Alternative package manager
4. **npx** - For one-off script execution
## Usage Patterns
### Python Script Execution
```bash
# In a directory with pyproject.toml (the plugin root, for plugin scripts):
cd "$(wicked-garden root)"
# Preferred (auto-installs deps)
uv run python script.py [args]
# Alternative
poetry run python script.py [args]
# If venv exists
.venv/bin/python script.py [args]
# Last resort (may fail on deps)
python3 script.py [args]
```
### Node Script Execution
```bash
# In a directory with package.json (e.g. the qe runner):
cd "$(wicked-garden path scripts/qe/runner)"
# Preferred
pnpm run script-name
pnpm exec script.js
# Alternative
npm run script-name
npx script.js
# Yarn
yarn run script-name
```
## Detection Logic
When executing a script, detect the runtime context:
```bash
# Python detection
if command -v uv &>/dev/null && [ -f pyproject.toml ]; then
uv run python "$@"
elif command -v poetry &>/dev/null && [ -f poetry.lock ]; then
poetry run python "$@"
elif [ -f .venv/bin/python ]; then
.venv/bin/python "$@"
else
python3 "$@"
fi
# Node detection
if command -v pnpm &>/dev/null && [ -f pnpm-lock.yaml ]; then
pnpm exec "$@"
elif command -v npm &>/dev/null && [ -f package-lock.json ]; then
npx "$@"
elif command -v yarn &>/dev/null && [ -f yarn.lock ]; then
yarn exec "$@"
else
node "$@"
fi
```
## Important Notes
- Always `cd` to the script directory first (where pyproject.toml/package.json lives)
- Use `uv run` for Python - it auto-syncs dependencies from pyproject.toml
- Warn user if falling back to system Python/Node (deps may be missing)
- For plugins, scripts are in `scripts/`
## Common Issues
### Missing Dependencies
If using system python3 and imports fail:
```bash
# Install uv (recommended)
curl -LsSf https://astral.sh/uv/install.sh | sh
# Or create venv manually
python3 -m venv .venv
.venv/bin/pip install -e .
```
### Wrong Python Version
```bash
# Check version
uv run python --version
# Specify version in pyproject.toml:
# requires-python = ">=3.10"
```
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirements | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |