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/agi-super-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
AI驱动的智能浏览器自动化工具。使用LLM理解页面并自动执行任务,比传统Playwright更智能、更省token。适用于复杂交互、动态页面、需要智能决策的浏览器操作。Chrome浏览器优先。
tools
网页登录态管理。使用 fast-browser-use (fbu) 管理各平台登录状态,定期检查可用性,新平台授权时自动保存 profile。
development
Monitor and report on API provider quotas, balances, and usage. Query official providers (Moonshot, DeepSeek, xAI, Google AI Studio) and relay/proxy providers (Xingjiabiapi, Aixn, WoW) via their billing APIs. Also checks subscription services (Brave Search, OpenRouter). Generates quota reports. Triggers on "查额度", "API余额", "quota check", "billing report", "api balance", "供应商额度", "中转站余额", "费用报告", "check balance", "how much credit".
development
# A股基金监控 Skill A股基金净值监控,支持实时估值和盘后净值,自动判断交易日/节假日。 ## 用法 ### 快速监控(命令行) ```bash # 默认配置,输出到控制台 bash ~/clawd/skills/a-fund-monitor/scripts/monitor.sh # 推送到群(使用--push参数) bash ~/clawd/skills/a-fund-monitor/scripts/monitor.sh --push # 监控指定基金 bash ~/clawd/skills/a-fund-monitor/scripts/monitor.sh --codes "000979 002943" ``` ### Agent调用 ``` 执行A股基金监控任务。 1. 读取配置文件: ~/clawd/skills/a-fund-monitor/config.json 2. 获取实时净值数据 3. 非交易日自动切换为简短报告 配置文件格式: { "funds": [ {"code": "000979", "name": "景顺长城沪港深精选股票