mirror of
https://github.com/runkids/skillshare.git
synced 2026-11-19 02:17:09 +00:00
- new: redesign SKILL.md template based on Anthropic's skill-building guide — description now includes WHAT+WHEN trigger format, step-based instructions (Gather/Execute/Validate), examples, and troubleshooting - search: prompt for keyword when run without arguments instead of auto-browsing popular skills - playground: default shell to $HOME (/sandbox-home) and mount source as read-only to prevent accidental host file modifications
22 lines
708 B
Bash
Executable File
22 lines
708 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Enter the running Docker playground or execute a command inside it.
|
|
set -euo pipefail
|
|
|
|
source "$(dirname "$0")/_sandbox_common.sh"
|
|
SERVICE="sandbox-playground"
|
|
|
|
require_docker
|
|
cd "$PROJECT_ROOT"
|
|
|
|
if [[ -z "$(docker compose -f "$COMPOSE_FILE" --profile playground ps -q "$SERVICE")" ]]; then
|
|
echo "Playground is not running. Start it first:"
|
|
echo " ./scripts/sandbox_playground_up.sh"
|
|
exit 1
|
|
fi
|
|
|
|
if [[ $# -gt 0 ]]; then
|
|
docker compose -f "$COMPOSE_FILE" --profile playground exec -w /sandbox-home --user "$(id -u):$(id -g)" "$SERVICE" bash -c "$*"
|
|
else
|
|
docker compose -f "$COMPOSE_FILE" --profile playground exec -w /sandbox-home --user "$(id -u):$(id -g)" "$SERVICE" bash
|
|
fi
|