matthewwong525/WongStack / .agents/skills/wong-setup
wong-setup
UnverifiedEvaluate or install WongStack from any folder, Cloudflare hosting included, from one token. Installed repos use /wong-sync.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 4.2 KB |
| references/cloudflare.md | markdown | 20.1 KB |
| references/failure-map.md | markdown | 6.9 KB |
| references/permission-groups.md | markdown | 6.6 KB |
| references/seed/gitignore | other | 350 B |
| references/seed/wiki-README.md | markdown | 569 B |
| references/seed/wiki-development-README.md | markdown | 1.3 KB |
| references/tools.md | markdown | 10.3 KB |
| scripts/install.mjs | script | 10.1 KB |
| scripts/lib/cloudflare.mjs | script | 13.5 KB |
| scripts/memory-schedule.mjs | script | 4.0 KB |
| scripts/private-access.mjs | script | 24.2 KB |
| scripts/provision.mjs | script | 77.8 KB |
references/tools.md
View on GitHub# Get the computer ready
[`/wong-setup`](../SKILL.md) runs this before cloning, with its selected repository and raw root for every source reference. Ready the tools, GitHub sign-in, git identity, and Windows links before writing in the target; [required tools](../../../../wiki/development/required-tools.md) explains each.
**[The Artifacts route](../../../../wiki/stack/artifacts-route.md#setup)**, the default on Mac and Linux, has no GitHub: leave `gh` out of the tools and the ask, skip step 2, and ask the person for step 3's name and email. The GitHub route adds `gh` and step 2 when chosen.
**The person types no command.** The agent runs every command below and asks in [the ask format](../../../plugins/loop/skills/explore/references/asking-the-user.md), in [plain words](../../../plugins/loop/skills/explore/references/asking-the-user.md#write-in-plain-words): *"I need a few free tools: Node.js and GitHub's app to set things up, a browser for me, a tool linking you to it, and one keeping your inbox instant. Install them (Recommended), or stop here?"* One yes covers every tool it names. A decline or failed install stops setup with nothing written: say what is missing, what it is for, and that rerunning setup picks up here. Only a failed [helper](#the-helpers-the-browser-and-the-link-tool) is skipped instead. [The failure map](failure-map.md#getting-the-computer-ready) owns each stop's fix.
## 1. The tools
Check each with `command -v`, in this order: the clone needs `git`, OpenSpec needs Node:
| Tool | Ready when |
|---|---|
| `git` | `git --version` answers |
| `gh`, GitHub route only | `gh --version` answers |
| Node.js | `node --version` is in the range `engines.node` gives in `<selected raw root>/app/package.json`, such as 24.15+ on Node 24; older counts as missing. An unreadable or invalid range stops setup |
| OpenSpec | `openspec --version` answers |
Check [the helpers](#the-helpers-the-browser-and-the-link-tool) too, so the ask names them. Install each missing one of the four by the first route with **no password prompt**, which the agent's shell can't answer. Never install a package manager.
| System (`uname -s`) | Route |
|---|---|
| macOS (`Darwin`) | `brew install git gh node` when `brew` is on `PATH`. Without it, `git` is `xcode-select --install`, Apple's own dialog the person clicks; the rest go to the user folder. |
| Windows (`MINGW*`, `MSYS*`, `CYGWIN*`) | `winget install --id Git.Git`, `GitHub.cli`, or `OpenJS.NodeJS.LTS`, with `--accept-package-agreements --accept-source-agreements`. Windows shows its own consent window. |
| Linux | `sudo -n apt-get install -y git gh` when `sudo -n true` succeeds. Node comes from `apt` only when `apt-cache policy nodejs` offers a version in the Node row's range; otherwise, and with no passwordless `sudo`, the user folder. |
**The user folder** is `~/.local`, with `~/.local/bin` on `PATH`. Map `uname -m` to the archive names: `x86_64` is `x64` for Node and `amd64` for `gh`; `arm64` and `aarch64` are `arm64`.
```bash
mkdir -p ~/.local/bin
# Node: the newest release of the required major (22 shown), from nodejs.org
N=$(curl -fsSL https://nodejs.org/dist/latest-v22.x/SHASUMS256.txt | grep -o 'node-v[0-9.]*-linux-x64\.tar\.xz' | head -1)
curl -fsSL "https://nodejs.org/dist/latest-v22.x/$N" | tar -xJ -C ~/.local --strip-components=1
# gh: the latest release from GitHub
G=$(curl -fsSL https://api.github.com/repos/cli/cli/releases/latest | grep -o 'https://[^"]*/gh_[0-9.]*_linux_amd64\.tar\.gz' | head -1)
curl -fsSL "$G" | tar -xz -C ~/.local --strip-components=1
```
On macOS, Node's archive is `node-v…-darwin-<arch>.tar.gz` (unpack with `tar -xz`), and `gh`'s is `gh_…_macOS_<arch>.zip`: unzip it and copy `bin/gh` into `~/.local/bin`.
**OpenSpec** installs with the command in [the preconditions](../../../plugins/loop/skills/save/references/preconditions.md), which own the pinned version. When a global npm install needs `sudo`, add `--prefix ~/.local`.
After a user-folder install, start every later command in this chat with `export PATH="$HOME/.local/bin:$PATH"; `: each command is a new shell. Then put that line first in the start-up file, above its early return for a non-interactive shell:
```bash
L='export PATH="$HOME/.local/bin:$PATH"'
case "$SHELL" in */zsh) set -- ~/.zshenv ~/.zshrc ;; *) set -- ~/.bashrc ;; esac
for F; do
[ "$(head -n 1 "$F" 2>/dev/null)" = "$L" ] && continue
touch "$F" && { echo "$L"; cat "$F"; } > "$F.new" && cat "$F.new" > "$F" && rm "$F.new"
done
```
Then recheck every tool; one still missing is a failed install. [Why the line goes first](../../../../wiki/development/required-tools.md#where-an-assistant-finds-its-tools).
### The helpers: the browser and the link tool
After the four pass, install each missing helper the same yes covered ([why each](../../../../wiki/development/required-tools.md)):
- **`agent-browser`:** `npm install -g agent-browser` (`--prefix ~/.local` when it needs `sudo`), then `agent-browser install` for its Chrome, with `--with-deps` on Linux only when `sudo -n true` succeeds.
- **`cloudflared`:** [its route](../../../../wiki/development/required-tools.md#installing-cloudflared) for this system. It also signs the owner in for memory and company actions at [the first deploy](cloudflare.md#4g-smoke-test-what-you-built).
Never offer Camoufox here: the first errand asks, then runs `browse.mjs install` ([why](../../../../wiki/development/required-tools.md#installing-camoufox)). Nor Shop's command: the first shopping request [asks](../../../../wiki/development/required-tools.md#installing-shops-command). The inbox helper installs later, in the target.
A helper still missing after install doesn't stop setup: say so in one line (*"The browser didn't install; I'll offer it again when I need it."*) and continue. Without `cloudflared`, memory waits on this computer until it is in.
### Paseo: point to it, never install it
After the tools pass, check `command -v paseo`. Missing → say one plain sentence and continue: *"Paseo is a free app for chatting with me from your phone and giving each piece of work its own space; get it at [paseo.sh](https://paseo.sh) whenever you like."* Never install it or stop setup without it: it is a desktop download with its own window.
## 2. The GitHub sign-in
GitHub route only. Check `gh auth status`. Setup needs the `workflow` scope to add the publishing step and `user:email` to fill git authorship ([why](../../../../wiki/development/required-tools.md#gh-needs-the-workflow-scope)).
- **Signed out** → run `gh auth login --web --hostname github.com --git-protocol https --scopes workflow,user:email` in the background, output to a temporary file.
- **Signed in, a scope missing** from the `Token scopes:` line → run `gh auth refresh --hostname github.com --scopes <every missing scope>` the same way; one refresh covers them all.
Neither needs a terminal. Each prints `First copy your one-time code: XXXX-XXXX` and `https://github.com/login/device`, then awaits approval. Show the person both:
```text
I need you to approve GitHub once.
1. Open https://github.com/login/device
2. Enter the code XXXX-XXXX
3. Approve, then tell me you're done
```
When they say done, recheck `gh auth status`, then run `gh auth setup-git` so the first push needs no second sign-in. No code printed, or still signed out after done → stop, create nothing, and use the failure map.
## 3. The git name and email
Read `git config user.name` and `git config user.email`. Set only an empty one, globally; never change a set one:
```bash
git config --global user.name "$(gh api user --jq '.name // .login')"
git config --global user.email "$(gh api user/emails --jq '[.[] | select(.primary and .verified)][0].email')"
```
With no `gh`, ask the person for both and set those.
Saved changes need a git name and email. Memory follows the owner's company sign-in, not git's email.
## 4. Windows folder links
On native Windows (`MINGW*`, `MSYS*`, `CYGWIN*`), run `git config --global core.symlinks true` before cloning, even if links work; a failed write stops setup. WSL uses the Linux flow.
Then test real folder and file links, again after any setting change; the subshell keeps cleanup from hiding a failure:
```bash
(
link_probe=$(mktemp -d) || exit 1
trap 'rm -rf "$link_probe"' EXIT
mkdir "$link_probe/folder" &&
printf 'ready\n' > "$link_probe/folder/file" &&
MSYS=winsymlinks:nativestrict ln -s folder "$link_probe/folder-link" &&
MSYS=winsymlinks:nativestrict ln -s folder/file "$link_probe/file-link" &&
test -L "$link_probe/folder-link" && test -L "$link_probe/file-link" &&
test "$(cat "$link_probe/folder-link/file")" = ready &&
test "$(cat "$link_probe/file-link")" = ready
)
```
Zero → continue. Otherwise, enable [Developer Mode](https://learn.microsoft.com/windows/advanced-settings/developer-mode#use-powershell-to-enable-your-device) yourself. Tell the person first: *"I'll turn on a Windows setting I need. If Windows asks for permission, approve it so I can continue."* Run it through `powershell.exe` when available; `RunAs` asks for administrator approval, and `Wait` with `PassThru` checks the result:
```bash
powershell.exe -NoProfile -Command '
try {
$process = Start-Process -FilePath "$env:SystemRoot\System32\reg.exe" -Verb RunAs -Wait -PassThru -ErrorAction Stop -ArgumentList "add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock /t REG_DWORD /f /v AllowDevelopmentWithoutDevLicense /d 1"
if ($process.ExitCode -ne 0) { exit 1 }
} catch {
$failure = $_.Exception
while ($failure) {
if ($failure.NativeErrorCode -eq 1223) { exit 2 }
$failure = $failure.InnerException
}
Write-Error $_
exit 3
}
'
```
Zero → rerun the probe; continue only if both links pass. Exit 2: approval was refused; stop without asking again. Exit 1, or an error naming workplace policy → stop: an administrator must allow the setting. Never change organization policy.
No PowerShell, or exit 3 with no policy restriction → the permission window couldn't open. Only then give this fallback:
```text
I couldn't open Windows' permission window.
1. Open Settings and search for Developer Mode
2. Turn it on and approve Windows' prompt
3. Tell me when it's on
```
Retest after they finish. A failed final probe stops setup before cloning or writing; use [the failure map](failure-map.md#getting-the-computer-ready). The registry change alone never proves links work.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |