跳到正文
cccskills
免费在 GitHub 公开

skillshare-devcontainer

Run CLI commands, tests, and debugging inside the skillshare devcontainer. Use this skill whenever you need to: execute skillshare CLI commands for verification, run Go tests (unit or integration), reproduce bugs, test new features, start the web UI, or perform any operation that requires a Linux environment. All CLI execution MUST happen inside the devcontainer — never run skillshare commands on the host. If you are about to use Bash to run `ss`, `skillshare`, `go test`, or `make test`, stop and use this skill first to ensure correct container execution.

中文简介正在准备中。当前显示原文说明。

查看安装方法

包含的文件(1)

  • SKILL.md7.9 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Execute CLI commands and tests inside the devcontainer. The host machine is macOS but the project binary is Linux — running CLI commands on the host will silently produce wrong results or fail. This skill prevents that mistake.

Before acting, run python3 scripts/ai-context.py testing and follow that topic. The topic is the source of truth for repository execution boundaries and test rules; this skill retains the interactive workflow and command recipes.

When to Use This

  • Running ss / skillshare commands for verification
  • Running go test, make test, make check
  • Reproducing a bug report
  • Testing a feature you just implemented
  • Starting the web UI dashboard
  • Any command that needs the skillshare binary or Go toolchain

When NOT to Use This

  • Editing source code (do that on host via Read/Edit tools)
  • Running git commands (git works on host)
  • Running make fmt, make lint (host-safe Go toolchain commands; no container needed)
  • E2E test runbooks → use cli-e2e-test skill instead (it handles ssenv isolation)

Architecture: Two Layers of Isolation

Host (macOS)
  └─ Devcontainer (Linux, Debian-based)
       ├─ Default HOME: /home/developer (persistent volume)
       ├─ Source: /workspace (bind-mount of repo root)
       └─ ssenv environments: ~/.ss-envs/<name>/ (isolated HOME dirs)

Devcontainer = Linux environment with Go, git, pnpm, air (hot-reload). Source code is at /workspace (bind-mount of the host repo). The ss / skillshare wrapper auto-builds from source on every invocation — no manual make build needed. Edit code on the host, then immediately docker exec to run it; the change is picked up automatically.

ssenv = Isolated HOME directories within the devcontainer. Each env gets its own ~/.config/skillshare/, ~/.claude/, etc. Use ssenv when you need a clean state (testing init, install, sync) without polluting the container's default HOME.

Zero-Rebuild Workflow

Source code is bind-mounted into the container at /workspace. The ss wrapper runs go build transparently on every invocation:

  1. Edit files on host (Read/Edit tools)
  2. docker exec $CONTAINER ss <command> — picks up your changes instantly
  3. No make build, no restart, no rebuild step

This also applies to go test — tests always compile against the latest source. The Web UI backend uses air for hot-reload (same zero-rebuild experience).

Entering the Devcontainer

The quickest way — one command builds, initialises, and enters the shell:

make devc           # build + init + interactive shell (one step)
make devc-up        # start only (no shell)
make devc-down      # stop
make devc-restart   # restart + re-run start-dev.sh
make devc-reset     # full reset (remove volumes), then `make devc` to re-init
make devc-status    # show container status

Works with or without VS Code — make devc handles the full lifecycle autonomously.

Programmatic access (for docker exec workflows)

CONTAINER=$(docker compose -f .devcontainer/docker-compose.yml ps -q skillshare-devcontainer 2>/dev/null)

If $CONTAINER is empty, tell the user:

Devcontainer is not running. Start it with make devc-up.

Then verify the binary:

docker exec $CONTAINER bash -c \
  '/workspace/.devcontainer/ensure-skillshare-linux-binary.sh && ss version'

Running Commands

Simple command (uses container's default HOME)

docker exec $CONTAINER ss <command> [flags]

Good for: ss version, ss status, ss list, ss check, ss audit.

Command with isolated HOME (clean state)

ENV_NAME="test-$(date +%s)"
docker exec $CONTAINER ssenv create "$ENV_NAME" --init
docker exec $CONTAINER ssenv enter "$ENV_NAME" -- ss status
# Cleanup when done:
docker exec $CONTAINER ssenv delete "$ENV_NAME" --force

Good for: testing init, install, sync, uninstall — anything that modifies config/state.

Multi-command sequence

docker exec $CONTAINER ssenv enter "$ENV_NAME" -- bash -c '
  ss install runkids/demo-skills --track --force
  ss list
  ss sync
'

Always use bash -c '...' for multi-command sequences inside ssenv enter.

Go tests

# All tests (unit + integration)
docker exec $CONTAINER bash -c 'cd /workspace && make test'

# Unit tests only
docker exec $CONTAINER bash -c 'cd /workspace && make test-unit'

# Integration tests only
docker exec $CONTAINER bash -c 'cd /workspace && make test-int'

# Specific test
docker exec $CONTAINER bash -c 'cd /workspace && go test ./tests/integration -run TestInit_Fresh -count=1'

# Specific package
docker exec $CONTAINER bash -c 'cd /workspace && go test ./internal/install/... -count=1'

Always cd /workspace before Go commands — ssenv changes HOME which can break module resolution.

Go tests with auth disabled

Token-resolution tests (TestResolveToken, TestAuthEnv in internal/install) need auth credentials removed:

docker exec $CONTAINER bash -lc '
  eval "$(credential-helper --eval off)"
  cd /workspace
  go test ./internal/install -run "TestResolveToken|TestAuthEnv" -count=1
  eval "$(credential-helper --eval on)"
'

Web UI Dashboard

# Start (global mode)
docker exec $CONTAINER ui

# Start (project mode — uses ~/demo-project)
docker exec $CONTAINER ui -p

# Stop
docker exec $CONTAINER ui stop

Dashboard accessible at http://localhost:45173 (Vite dev server with HMR). API backend at http://localhost:49420. Logs: /tmp/api-dev.log, /tmp/vite-dev.log.

ssenv Quick Reference

ShortcutFull formPurpose
ssnew <name>ssenv create <name> + enterCreate and enter isolated shell
ssuse <name>ssenv enter <name>Enter existing isolated shell
ssrm <name>ssenv delete <name> --forceDelete environment
sslsssenv listList all environments
ssbackssenv resetLeave isolated context
sshelphelpShow all devcontainer commands

For automation (non-interactive), prefer ssenv enter <name> -- <command> over ssnew/ssuse (which launch subshells).

Ports

PortServiceNotes
45173Vite dev serverReact dashboard with HMR
49420Go API backendskillshare ui server
48888Docusaurusdocs command in devcontainer

Common Mistakes to Avoid

  1. Running ss on host — macOS binary won't match Linux container; always docker exec
  2. Forgetting cd /workspace — Go tests fail if HOME was changed by ssenv
  3. Using make test on host — builds macOS binary, then tests run against wrong arch
  4. Skipping --init on ssenv create — env won't have config; most commands will fail
  5. Not cleaning up ssenv — ssenv delete <name> --force after done; or ask user
  6. Running from /workspace root without -g — the ss wrapper auto-redirects to ~/demo-project in project mode; use -g for global or set SKILLSHARE_DEV_ALLOW_WORKSPACE_PROJECT=1
  7. Running make build before testing — unnecessary; the ss wrapper auto-builds from source every time

Rules

Apply the testing topic. If a command recipe here conflicts with that topic or current repo configuration, verify the current configuration and update both in the same change.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Manage skills, agents, extras, hooks, plugins, and MCP connection settings with the Skillshare CLI. Use when the user asks to configure or run Skillshare, install or sync resources across AI tools, manage shared memory notes, review a session for lessons or dream over saved memories, import MCP settings, manage targets, audit skills, recover backups, or troubleshoot Skillshare configuration and sync. Covers global and project modes, noninteractive automation, and guidance for the terminal UI.

中文简介正在准备中。当前显示原文说明。

runkids/skillshare28052026年10月18日 更新

Generate CHANGELOG.md entry from recent commits in conventional format. Also syncs the website changelog page. Use this skill whenever the user asks to: generate a changelog, document what changed between tags, or create a new CHANGELOG entry. If you see requests like "write the changelog for v0.17", "what changed since last release", this is the skill to use. Do NOT manually edit CHANGELOG.md without this skill — it ensures proper formatting, user-perspective writing, and website changelog sync. For full release workflows (Release PR review, tests, draft assets, publication, announcements), use /release instead.

中文简介正在准备中。当前显示原文说明。

runkids/skillshare28052026年10月18日 更新

Run isolated E2E tests in devcontainer from ai_docs/tests runbooks. Use this skill whenever the user asks to: run an E2E test, execute a test runbook, validate a feature end-to-end, create a new runbook, or test CLI behavior in isolation. If you need to run a multi-step CLI validation sequence (init → install → sync → verify), this is the skill — it handles ssenv isolation, flag verification, and structured reporting. Prefer this over ad-hoc docker exec sequences for any test that follows a runbook or needs reproducible isolation.

中文简介正在准备中。当前显示原文说明。

runkids/skillshare28052026年10月18日 更新

Review a skillshare change before it becomes a pull request, or review an open pull request. Use this skill whenever the user asks to: review a diff, branch, commit range or PR, check a change before opening a PR, run a pre-Codex review, or find what a change missed. It checks correctness, the repository's documented rules, the originating issue or spec, every consumer of a changed concept, and cleanup (reuse, simplification, efficiency, depth of fix), then verifies each finding against the code before reporting it. Read-only unless the user asks for fixes.

中文简介正在准备中。当前显示原文说明。

runkids/skillshare28052026年10月18日 更新

Implement a feature from a spec file or description using TDD workflow. Use this skill whenever the user asks to: add a new CLI command, implement a feature from a spec, build new functionality, add a flag, create a new internal package, or write Go code for skillshare. This skill enforces test-first development, proper handler split conventions, oplog instrumentation, and dual-mode (global/project) patterns. If the request involves writing Go code and tests, use this skill — even if the user doesn't explicitly say "implement".

中文简介正在准备中。当前显示原文说明。

runkids/skillshare28052026年10月18日 更新

Prepare and review skillshare releases using the Release Please PR, verify the proposed version and changelog, inspect draft assets, and publish through the manual Publish Release workflow when explicitly authorized. Use when the user says "release", "prepare release", "cut a release", or asks to publish a new version. For changelog-only tasks, use /changelog instead.

中文简介正在准备中。当前显示原文说明。

runkids/skillshare28052026年10月18日 更新

查看 runkids 的全部技能

报告此技能的问题