skills/.trash/skillshare/.skillshare/skills/cli-e2e-test/SKILL.md
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.
npx skillsauth add aaaaqwq/claude-code-skills skillshare-cli-e2e-testInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Run isolated E2E tests in devcontainer. $ARGUMENTS specifies runbook name or "new".
Confirm devcontainer is running and get container ID:
CONTAINER=$(docker compose -f .devcontainer/docker-compose.yml ps -q skillshare-devcontainer)
docker compose -f .devcontainer/docker-compose.yml up -dCONTAINER is set for all subsequent docker exec calls.Confirm Linux binary is available:
docker exec $CONTAINER bash -c \
'/workspace/.devcontainer/ensure-skillshare-linux-binary.sh && ss version'
*_runbook.md files under ai_docs/tests/ to list available runbooksgit diff --name-only HEAD~3
Prompt user (via AskUserQuestion):
Read the selected runbook .md file
Create isolated environment with auto-initialization:
ENV_NAME="e2e-$(date +%Y%m%d-%H%M%S)"
# Use --init to automatically run 'ss init -g' with all targets
docker exec $CONTAINER ssenv create "$ENV_NAME" --init
Execute each step from runbook:
# Use SKILLSHARE_DEV_ALLOW_WORKSPACE_PROJECT=1 to prevent redirection to demo-project
docker exec $CONTAINER env SKILLSHARE_DEV_ALLOW_WORKSPACE_PROJECT=1 \
ssenv enter "$ENV_NAME" -- <command>
After each step, verify conditions in the Expected block
--json + jq for assertions — structured output is more reliable than grep on human-readable text. See the JSON Reference below for which commands support --json.Mark each step PASS / FAIL
git diff HEAD~3 to find changed files in cmd/skillshare/ or internal/ss <command> <flag> in the runbook:
cmd/skillshare/<command>.go for the exact flag string (e.g. "--force")ss <command> --help inside container if neededuninstall --yes → wrong, use --force / -finit --target <name> → wrong, init has no --target flaginit -p has a completely separate flag set from global init — only supports --targets, --discover, --select, --mode, --dry-run. Global-only flags like --no-copy, --no-skill, --no-git, --all-targets, --force do NOT exist in project modeprompt-injection-0, prompt-injection-1), NOT pattern name (e.g. prompt-injection). Rule IDs are in internal/audit/rules.yamlai_docs/tests/<slug>_runbook.md, following existing conventions:
--json + jq for assertions wherever possible — avoids brittle text matchingAsk user before cleanup (via AskUserQuestion):
ssenv delete)If user chose Option A:
docker exec $CONTAINER ssenv delete "$ENV_NAME" --force
Output summary:
── E2E Test Report ──
Runbook: {runbook name}
Env: {ENV_NAME}
Duration: {time}
Step 1: {description} PASS
Step 2: {description} PASS
Step 3: {description} FAIL ← {error detail}
...
Result: {N}/{total} passed
If any FAIL → distinguish between runbook bug vs real bug:
Retrospective — ask user (via AskUserQuestion):
Did you encounter any friction during this test run that the skill or runbook could handle better?
Improvement targets:
Before executing a newly generated runbook, verify:
ss <cmd> --flag was grep-verified against source--init interaction — if runbook has ss init, account for ssenv create --init already initializing (add --force to re-init, or skip init step)uninstall uses --force (not --yes); init re-run needs no flag (just fails gracefully)registry.yaml, NOT config.yaml; config.yaml should never contain skills:registry.yaml is only created after first install/reconcile, not on ss init.skillshare/ not ~/.config/skillshare/init -p only supports --targets, --discover, --select, --mode, --dry-run; global-only flags (--no-copy, --no-skill, --no-git, --all-targets, --force) are not availableaudit-rules.yaml use rule IDs (e.g. prompt-injection-0), not pattern names (e.g. prompt-injection). Verify IDs against internal/audit/rules.yaml--json for assertions — if the command supports --json, use it with jq instead of grepping human-readable output. Text output changes between versions; JSON structure is stabledocker exec, never run CLI on hostssenv for HOME isolation — don't pollute container default HOMEss = skillshare — same binary in runbooks~ = ssenv-isolated HOME — ssenv enter auto-sets HOME--init — simplify setup by using ssenv create <name> --init--init already runs init — the env is pre-initialized; runbook steps calling ss init again will fail unless the step explicitly resets state first| Command | Purpose |
|---------|---------|
| sshelp | Show shortcuts and usage |
| ssls | List isolated environments |
| ssnew <name> | Create + enter isolated shell (interactive) |
| ssuse <name> | Enter existing isolated shell (interactive) |
| ssback | Leave isolated context |
| ssenv enter <name> -- <cmd> | Run single command in isolation (automation) |
ssnew <env> then exit when donessenv enter <env> -- <command> one-linersWhen running Go tests inside devcontainer (not via runbook):
# ssenv changes HOME, so always cd to /workspace first for Go test commands
cd /workspace
go build -o bin/skillshare ./cmd/skillshare
SKILLSHARE_TEST_BINARY="$PWD/bin/skillshare" go test ./tests/integration -count=1
go test ./...
Always run in devcontainer unless there is a documented exception.
Note: ssenv enter changes HOME, which may affect Go module resolution — always cd /workspace before running go test or go build.
--json Quick ReferenceMost commands support --json for structured output, making assertions more reliable than text matching.
| Command | --json | Notes |
|---------|----------|-------|
| ss status | --json | Skills, targets, sync status |
| ss list | --json / -j | All skills with metadata |
| ss target list | --json | Configured targets |
| ss install <src> | --json | Implies --force --all (skip prompts) |
| ss uninstall <name> | --json | Implies --force (skip prompts) |
| ss collect <path> | --json | Implies --force (skip prompts) |
| ss check | --json | Update availability per repo |
| ss update | --json | Update results per skill |
| ss diff | --json | Per-file diff details |
| ss sync | --json | Sync stats per target |
| ss audit | --format json | Also accepts --json (deprecated alias) |
| ss log | --json | Raw JSONL (one object per line) |
Key behaviors:
--json that implies --force / --all skips interactive prompts — safe for automationaudit prefers --format json; --json still works but is the deprecated formlog --json outputs JSONL (newline-delimited), not a JSON arrayjq# Count installed skills
ss list --json | jq 'length'
# Check a specific skill exists
ss list --json | jq -e '.[] | select(.name == "my-skill")'
# Verify target is configured
ss target list --json | jq -e '.[] | select(.name == "claude")'
# Assert no critical audit findings
ss audit --format json | jq -e '.summary.critical == 0'
# Check update availability
ss check --json | jq -e '.tracked_repos | length > 0'
# Verify sync succeeded (zero errors)
ss sync --json | jq -e '.errors == 0'
# Install and verify result
ss install https://github.com/user/repo --json | jq -e '.skills | length > 0'
When a jq -e expression fails (exit code 1 = false, 5 = no output), the step FAILs — no ambiguous text matching needed.
# Single command
docker exec $CONTAINER ssenv enter "$ENV_NAME" -- ss status
# JSON assertion (preferred for verification)
docker exec $CONTAINER ssenv enter "$ENV_NAME" -- bash -c '
ss list --json | jq -e ".[] | select(.name == \"my-skill\")"
'
# Multi-line compound command (use bash -c) — global mode flags
docker exec $CONTAINER ssenv enter "$ENV_NAME" -- bash -c '
ss init --no-copy --all-targets --no-git --no-skill
ss status
'
# Project mode init (different flag set!)
docker exec $CONTAINER env SKILLSHARE_DEV_ALLOW_WORKSPACE_PROJECT=1 \
ssenv enter "$ENV_NAME" -- bash -c '
cd /tmp/test-project && ss init -p --targets claude
'
# Check files (HOME is set to isolated path by ssenv)
docker exec $CONTAINER ssenv enter "$ENV_NAME" -- bash -c '
cat ~/.config/skillshare/config.yaml
'
# With environment variables
docker exec $CONTAINER ssenv enter "$ENV_NAME" -- bash -c '
TARGET=~/.claude/skills
ls -la "$TARGET"
'
# Go tests (must cd /workspace because ssenv changes HOME)
docker exec $CONTAINER ssenv enter "$ENV_NAME" -- bash -c '
cd /workspace
go test ./internal/install -run TestParseSource -count=1
'
testing
通用自媒体文章自动发布工具。支持百家号、搜狐号、知乎、微信公众号、小红书、抖音号六个平台的自动化发布流程。使用Playwright自动化实现平台导航和发布,支持通过storageState管理Cookie实现账号切换。
development
# SKILL.md - Model Configuration Status (mcstatus) ## 触发条件 - `/mcstatus` 命令 - 用户询问模型配备、模型配置、model status、模型列表等 ## 功能 实时生成 Agent + Cron 的模型配置报告,展示当前所有 agent 的主模型/fallback链和所有 cron 任务的模型分配。 ## 执行步骤 ### Step 1: 收集 Agent 模型配置 读取各 agent 的 models.json 获取主模型和 fallback 链: ```bash for agent in main ops code quant data research content market finance pm law product sales batch; do config=$(cat ~/.openclaw/agents/$agent/agent/models.json 2>/dev/null) if [ -n "$config" ]; then echo "=== $agent
tools
MCP 服务器智能管理助手。自动检测 MCP 可用性、智能开关、功能问答,提供人性化的 MCP 管理体验。
tools
从GitHub搜索并自动安装配置MCP(Model Context Protocol)服务器工具到Claude配置文件。当用户需要安装MCP工具时触发此技能。工作流程:搜索GitHub上的MCP项目 -> 提取npx配置 -> 添加到~/.claude.json -> 处理API密钥(如有)。