agentleFS
k-joelk-joel/agent-skills/github-deploy-win/SKILL.md

github-deploy-win

Skill1 starsChanged 17 days agoMITView on GitHub

Automates end-to-end deployment and teardown of web repositories onto a remote Windows 11 host using GitHub Actions self-hosted runners, Docker Desktop, and Cloudflare Tunnel. This skill should be used when asked to deploy a repo to a Windows remote given a domain, SSH host, credentials, and Cloudflare tunnel token, or to uninstall a previously deployed repo from that host.

  • Reads credentials
  • Commits and pushes

The file

Show its rules and text

We split this skill into the rules it gives an agent

34 rules. About 0 are common, 7 are distinctive, and 27 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 27

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Follow these gating rules before making any changes:

    line 37
  2. Very specific:

    Off-server handoff: If the user asks how to set up the domain/Cloudflare side, or does not have cf_token, copy …

    line 39
  3. Very specific:

    Missing inputs: If any required parameter (domain, ssh, user, pass, or cf_token for install) is missing, prompt the user for the exact …

    line 40
  4. Very specific:

    Secret hygiene: Never write pass, cf_token, or private keys into ./deploy/, .github/workflows/deploy.yml, or any markdown file.

    line 41
  5. Distinctive:

    Verify local tooling in the current workspace:

    line 52
  6. Very specific:

    Verify local cloudflared when connecting through a Cloudflare Tunnel hostname (ssh is not a raw IP):

    line 56
  7. Very specific:

    Check cloudflared --version.

    line 57
  8. Very specific:

    Ensure ~/.ssh/config contains a Host <ssh> entry with a properly quoted ProxyCommand "<path-to-cloudflared>" access ssh --hostname %h.

    line 58
  9. Very specific:

    If direct_ip was supplied, connect to <user>@<direct_ip> (trying key auth, then pass).

    line 61
  10. Very specific:

    If ssh is unreachable (timeout, 1033/530, or connection refused) and direct_ip was not given, ask the user for direct_ip.

    line 63
  11. Very specific:

    Run these steps directly over the verified SSH session as user (ignoring benign PowerShell CLIXML stderr wrapper noise when exit code is 0):

    line 68
  12. Very specific:

    If missing or outdated, install/upgrade via winget install --id Cloudflare.cloudflared -e --accept-package-agreements …

    line 77
  13. Very specific:

    Do not stop or uninstall an active cloudflared Windows service during this step if your current SSH connection rides over it.

    line 78
  14. Very specific:

    Check whether C:\deploy\runners\<project-name>\.runner exists and whether gh api repos/<owner>/<repo>/actions/runners reports a matching …

    line 81
  15. Distinctive:

    If missing, outdated, or stale/deleted on GitHub:

    line 82
  16. Very specific:

    If .runner exists, obtain a removal token (gh api -X POST repos/<owner>/<repo>/actions/runners/remove-token --jq .token) and run …

    line 83
  17. Very specific:

    Follow references/stack-detection.md completely when inspecting the repository:

    line 100
  18. Very specific:

    Ensure deploy/Dockerfile runs mkdir -p <container-abs-path> && chown -R <uid>:<gid> <container-abs-path> before USER so the non-root …

    line 109
  19. Very specific:

    If the app is stateless, omit volumes: and log that no output folder was detected.

    line 110
  20. Very specific:

    Remove any pre-existing root-level compose.deploy.yml or docker-compose.deploy.yml.

    line 112
  21. Very specific:

    Create ./deploy/ in the workspace root and copy/render:

    line 113
  22. Very specific:

    Run gh secret set CLOUDFLARED_TUNNEL_TOKEN --body "<cf_token>" and gh secret set SSH_PUBLIC_KEY --body "<pub-key-line>".

    line 125
  23. Very specific:

    Verify that the pushed .github/workflows/deploy.yml executes these steps cleanly on the remote runner, emitting [YYYY-MM-DD HH:MM:SS] …

    line 130
  24. Very specific:

    If C:\Program Files\Docker\Docker\resources\bin\docker.exe is missing, install Docker Desktop silently via winget install --id …

    line 134
  25. Very specific:

    Create C:\deploy\docker-config\config.json with {"auths":{},"currentContext":"desktop-linux"} and copy $env:USERPROFILE\.docker\contexts …

    line 137
  26. Very specific:

    Run docker pull <base-image> explicitly under $env:DOCKER_CONFIG for every FROM base image so Compose build metadata does not fail.

    line 139
  27. Very specific:

    Ensure OpenSSH.Server~~~~0.0.1.0 is installed, sshd is Automatic and Running, and the inbound TCP 22 firewall rule exists.

    line 145
  28. Distinctive:

    Do not stop when git push finishes.

    line 153
  29. Distinctive:

    Run this workflow only when the user asks to uninstall, remove, or tear down a repository's deployment from the remote Windows 11 server.

    line 164
  30. Very specific:

    If the registration is already gone from GitHub, read the service name from .service, run Stop-Service and sc.exe delete "<service-name>", …

    line 180
  31. Distinctive:

    Before step 2, capture any value you will need later:

    line 190
  32. Distinctive:

    After completing steps 1 through 4, explicitly ask the user before deleting any of these:

    line 194
  33. Very specific:

    Repository deployment files: Ask whether to keep or remove .github/workflows/deploy.yml, ./deploy/, and .dockerignore from the repository …

    line 197
  34. Very specific:

    GitHub secrets: Ask whether to remove CLOUDFLARED_TUNNEL_TOKEN and SSH_PUBLIC_KEY from the repository secrets (gh secret delete).

    line 198

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

GitHub Deploy for Windows 11 (github-deploy-win)

Deploy any web repository to a remote Windows 11 server over Cloudflare Tunnel using a per-repo GitHub Actions self-hosted runner, Docker Compose with persistent named volumes, and automated remote host configuration. Includes a separate uninstall workflow that removes per-repo artifacts without breaking shared server infrastructure.

Bundled resources

Load these files on demand rather than keeping full tables in memory:

  • references/off-server-setup.md: Standalone registrar, Cloudflare DNS, Tunnel, Access, and GitHub setup guide. Copy to ./off-server-setup.md in the workspace root when the user asks how to set up off-server pieces or lacks cf_token.
  • references/stack-detection.md: Rules for inspecting existing Dockerfiles, selecting base images, detecting ports and healthchecks, and mapping persistent output volumes.
  • references/troubleshooting.md: Log locations and verified fixes for SSH, Windows runner, Docker Desktop, and Cloudflare errors.
  • scripts/ssh_preflight.py: Pre-CI SSH probe and command runner (supports direct IP, cloudflared ProxyCommand, and cloudflared access tcp + Paramiko fallback).
  • scripts/render_oneliner.py: Renders the one-command elevated PowerShell bootstrap fallback for blank Windows 11 hosts.
  • assets/workflow/deploy.yml.tmpl: Workflow template copied to .github/workflows/deploy.yml.
  • assets/deploy/: Compose, Dockerfile, .dockerignore, and PowerShell runtime scripts copied into ./deploy/ in the target repository. assets/deploy/scripts/uninstall.ps1 performs the host-side teardown for the Uninstall workflow.

Inputs and pre-flight rules

Parse these parameters from the user's request (example: "Load github-deploy-win skill and make this repo deploy to my remote server at www.domain.com, ssh: ssh.domain.com, user: Admin, pass: 123, cf token: <token>"):

ParameterRequiredPurpose
domainYesPublic web hostname (www.domain.com or domain.com)
sshYesSSH tunnel hostname (ssh.domain.com) or direct IP
userYesWindows Administrator username on the remote (Admin)
passYesPassword for user (initial SSH fallback and runner service logon)
cf_tokenYes (Install)Cloudflare Tunnel connector token (eyJ...)
direct_ipConditionalLAN or direct IP used if ssh is unreachable on a blank host

Follow these gating rules before making any changes:

  1. Off-server handoff: If the user asks how to set up the domain/Cloudflare side, or does not have cf_token, copy references/off-server-setup.md to ./off-server-setup.md in the current workspace root, tell the user to follow it, and stop until they return with cf_token.
  2. Missing inputs: If any required parameter (domain, ssh, user, pass, or cf_token for install) is missing, prompt the user for the exact missing values before proceeding.
  3. Secret hygiene: Never write pass, cf_token, or private keys into ./deploy/, .github/workflows/deploy.yml, or any markdown file. Upload CLOUDFLARED_TUNNEL_TOKEN and SSH_PUBLIC_KEY strictly via gh secret set.
  4. Public repository warning: Inspect the repo with gh repo view --json nameWithOwner,defaultBranchRef,isPrivate. If isPrivate is false, warn the user before proceeding that running an Administrator-privileged self-hosted runner on a public repo introduces remote code execution risk from external workflows or fork PRs, and recommend making the repo private.

Install workflow

Execute Phases 1 through 5 in order. Log each major check and remote exit code clearly so failures can be traced immediately against references/troubleshooting.md.

Phase 1: Client preflight and remote reachability

  1. Verify local tooling in the current workspace:
    • Confirm git rev-parse --is-inside-work-tree succeeds and gh auth status is authenticated.
    • Record <owner>/<repo>, <default-branch>, and derive <project-name> (lowercase alphanumeric/hyphen slug of the repo name, used for C:\deploy\runners\<project-name>, Compose name:, and container_name:).
    • Confirm an Ed25519 SSH key exists locally (default ~/.ssh/id_ed25519 and ~/.ssh/id_ed25519.pub); if absent, generate one with ssh-keygen -t ed25519 -N "" -f "$HOME/.ssh/id_ed25519".
  2. Verify local cloudflared when connecting through a Cloudflare Tunnel hostname (ssh is not a raw IP):
    • Check cloudflared --version. If missing on Windows, install via winget install --id Cloudflare.cloudflared -e or download cloudflared-windows-amd64.exe into a durable user folder (such as $HOME\cloudflared\cloudflared.exe).
    • Ensure ~/.ssh/config contains a Host <ssh> entry with a properly quoted ProxyCommand "<path-to-cloudflared>" access ssh --hostname %h.
  3. Establish SSH connectivity to the remote host:
    • Try connecting in this order using uv run scripts/ssh_preflight.py:
      1. If direct_ip was supplied, connect to <user>@<direct_ip> (trying key auth, then pass).
      2. Otherwise try <user>@<ssh> (trying key auth, then pass; on Windows Python clients, use cloudflared access tcp + 127.0.0.1:<local_port> rather than Paramiko ProxyCommand to avoid WinError 10038).
    • If ssh is unreachable (timeout, 1033/530, or connection refused) and direct_ip was not given, ask the user for direct_ip.
    • Blank-host fallback: If neither ssh nor direct_ip is reachable because sshd and cloudflared are not installed on the Windows 11 host yet, run uv run scripts/render_oneliner.py with cf_token and ask the user to run the generated PowerShell command once in an elevated PowerShell window on the remote server. That one-liner installs OpenSSH.Server~~~~0.0.1.0, starts sshd, opens TCP 22, installs cloudflared with cf_token, and sets ExecutionPolicy RemoteSigned. Once the user confirms it succeeded, reconnect over SSH.

Phase 2: Pre-CI remote bootstrap (agent over SSH)

Run these steps directly over the verified SSH session as user (ignoring benign PowerShell CLIXML stderr wrapper noise when exit code is 0):

  1. Set PowerShell execution policy as Administrator:
    Set-ExecutionPolicy RemoteSigned -Scope LocalMachine -Force
    Confirm Get-ExecutionPolicy -Scope LocalMachine is RemoteSigned or Unrestricted so GitHub Actions .ps1 steps do not fail with PSSecurityException.
  2. Check and install latest cloudflared on the remote host:
    • Query the installed version (cloudflared --version across PATH and C:\Program Files\cloudflared\cloudflared.exe) and compare with the latest release tag from https://api.github.com/repos/cloudflare/cloudflared/releases/latest.
    • If missing or outdated, install/upgrade via winget install --id Cloudflare.cloudflared -e --accept-package-agreements --accept-source-agreements (falling back to downloading cloudflared-windows-amd64.exe).
    • Do not stop or uninstall an active cloudflared Windows service during this step if your current SSH connection rides over it; CI reconciles service registration in Phase 4.
  3. Check and install latest per-repo actions-runner at C:\deploy\runners\<project-name>:
    • Query https://api.github.com/repos/actions/runner/releases/latest for the latest Windows x64 version <ver>.
    • Check whether C:\deploy\runners\<project-name>\.runner exists and whether gh api repos/<owner>/<repo>/actions/runners reports a matching online runner for <project-name>.
    • If missing, outdated, or stale/deleted on GitHub:
      • If .runner exists, obtain a removal token (gh api -X POST repos/<owner>/<repo>/actions/runners/remove-token --jq .token) and run .\config.cmd remove --token <remove-token> inside C:\deploy\runners\<project-name> (stopping/removing any orphaned service first if the old registration is already gone).
      • Download https://github.com/actions/runner/releases/download/v<ver>/actions-runner-win-x64-<ver>.zip and extract into C:\deploy\runners\<project-name>.
      • Request a registration token (gh api -X POST repos/<owner>/<repo>/actions/runners/registration-token --jq .token) and configure unattended with the service install flag:
        .\config.cmd --url https://github.com/<owner>/<repo> `
          --token <reg-token> `
          --name "$env:COMPUTERNAME-<project-name>" `
          --labels "windows,self-hosted,<project-name>" `
          --work _work `
          --unattended --replace --runasservice
        The Windows package ships only config.cmd and run.cmd; there is no svc.cmd. --runasservice registers the service and starts it as NT AUTHORITY\NETWORK SERVICE.
      • Read the installed service name from Get-Service 'actions.runner.*' | Where-Object { $_.Name -like "*<project-name>*" } (the package also writes it to .service), switch its logon account to .\<user> with <pass> (sc.exe config "<service-name>" obj= ".\<user>" password= "<pass>"), then stop and start the service. A sc.exe config change while the service is running applies to the stored configuration but not to the live process, and any job it runs still sees the machine account COMPUTERNAME$ until it restarts.
    • Confirm gh api repos/<owner>/<repo>/actions/runners shows the new runner with "status": "online".

Phase 3: Codebase inspection and repository scaffolding

Follow references/stack-detection.md completely when inspecting the repository:

  1. Inspect stack, Dockerfile, ports, and healthcheck:
    • Check for an existing working app Dockerfile (watch out for docs-only Dockerfiles such as MkDocs multi-stage builds or EOL bases like node:18). If a valid app Dockerfile exists, reference it from deploy/compose.deploy.yml; otherwise select the matching template from assets/deploy/ (Dockerfile.node.tmpl using node:24-bookworm-slim + npm, Dockerfile.python.tmpl using python:3.12-slim, or Dockerfile.static.tmpl using nginxinc/nginx-unprivileged:alpine).
    • Detect the container listen port <port> and a reliable GET healthcheck path <health-path> (/health, /healthz, /items, or /).
  2. Detect and map persistent output folders (mandatory):
    • Scan the codebase for database files (SQLite paths such as /etc/todos/todo.db, ./data, db.sqlite3), upload handlers (multer, UploadFile, MEDIA_ROOT), file writes (fs.writeFile, open(..., "w")), and storage env vars (DATA_DIR, UPLOAD_DIR, OUTPUT_DIR, DB_PATH).
    • For every persistent directory found:
      • Map a named Docker volume (<vol-name>:<container-abs-path>) in deploy/compose.deploy.yml (never a Windows C:\... bind mount).
      • Ensure deploy/Dockerfile runs mkdir -p <container-abs-path> && chown -R <uid>:<gid> <container-abs-path> before USER so the non-root process can write to the initialized volume.
    • If the app is stateless, omit volumes: and log that no output folder was detected.
  3. Create ./deploy/ and .github/workflows/deploy.yml:
    • Remove any pre-existing root-level compose.deploy.yml or docker-compose.deploy.yml. Two Compose files describing the same app produce a second project, a second volume, and a container-name collision. deploy/compose.deploy.yml is the single source of truth.
    • Create ./deploy/ in the workspace root and copy/render:
      • deploy/compose.deploy.yml with pinned name: <project-name>, image: <project-name>:local, container_name: <project-name>, restart: unless-stopped, ports: ["127.0.0.1:<port>:<port>"], logging: (json-file, max-size: "10m", max-file: "3"), and detected volumes:.
      • deploy/Dockerfile (when generated).
      • .dockerignore at the build context root (or deploy/Dockerfile.dockerignore) excluding .git, .github, deploy/scripts, *.md, node_modules, .venv, and .env*.
      • deploy/scripts/setup-docker-and-config.ps1, deploy/scripts/setup-tunnel-and-ssh.ps1, and deploy/scripts/smoke-test.ps1 from assets/deploy/scripts/.
    • Render assets/workflow/deploy.yml.tmpl to .github/workflows/deploy.yml:
      • Trigger on push to [ <default-branch> ] (paths-ignore: [ '**.md', 'docs/**' ]) and workflow_dispatch.
      • Pin concurrency: { group: deploy-${{ github.ref }}, cancel-in-progress: true }.
      • Pin runs-on: [self-hosted, windows, "<project-name>"].
      • Pin shell: powershell on every run: step (never shell: bash).
      • Pass <project-name>, <port>, <health-path>, base image(s), and ${{ secrets.CLOUDFLARED_TUNNEL_TOKEN }} / ${{ secrets.SSH_PUBLIC_KEY }} to the scripts in deploy/scripts/.
  4. Upload GitHub Secrets, commit, and push:
    • Run gh secret set CLOUDFLARED_TUNNEL_TOKEN --body "<cf_token>" and gh secret set SSH_PUBLIC_KEY --body "<pub-key-line>".
    • Stage .github/workflows/deploy.yml, deploy/, and .dockerignore (if created at root), commit (chore(deploy): add Windows self-hosted CI/CD deployment), and git push to trigger the workflow immediately.

Phase 4: In-CI remote setup and container deploy

Verify that the pushed .github/workflows/deploy.yml executes these steps cleanly on the remote runner, emitting [YYYY-MM-DD HH:MM:SS] [STEP] logs and checking $LASTEXITCODE on every command:

  1. Docker Desktop install, boot task, and credential-free config (deploy/scripts/setup-docker-and-config.ps1):
    • Resolve the account with whoami, not $env:USERNAME. Inside a Windows service session $env:USERNAME can resolve to the machine account (COMPUTERNAME$), which has no user profile and cannot own a scheduled task.
    • If C:\Program Files\Docker\Docker\resources\bin\docker.exe is missing, install Docker Desktop silently via winget install --id Docker.DockerDesktop -e --accept-package-agreements --accept-source-agreements and add the resolved account to docker-users.
    • Register (idempotently) the DockerDesktop-Headless AtStartup scheduled task (LogonType S4U, RunLevel Highest) executing docker.exe desktop start --detach so Docker starts on Windows boot without an interactive login. Treat a registration failure as a warning rather than a job failure: Docker still starts on demand, and the job must not die over a boot-time nicety.
    • Probe docker version; if unreachable, run docker desktop start --detach and wait up to 90s. If a brand-new WSL 2 / Docker Desktop install requires a Windows reboot before the daemon can start, emit an explicit diagnostic error (::error::Docker Desktop requires a server reboot to finish WSL 2 setup) and exit 1.
    • Create C:\deploy\docker-config\config.json with {"auths":{},"currentContext":"desktop-linux"} and copy $env:USERPROFILE\.docker\contexts into C:\deploy\docker-config\contexts (if not already present), then set $env:DOCKER_CONFIG = 'C:\deploy\docker-config'.
  2. Pull base image, build, and run Compose:
    • Run docker pull <base-image> explicitly under $env:DOCKER_CONFIG for every FROM base image so Compose build metadata does not fail.
    • Run docker compose -f deploy/compose.deploy.yml up -d --build.
    • Run docker image prune -f --filter "until=168h".
    • Log docker compose -f deploy/compose.deploy.yml ps and docker inspect -f "{{.State.Health.Status}} {{json .Mounts}}" <project-name>.
  3. Cloudflare Tunnel and OpenSSH setup (deploy/scripts/setup-tunnel-and-ssh.ps1):
    • Install cloudflared if missing; if Get-Service cloudflared is absent, run cloudflared.exe service install $env:CLOUDFLARED_TUNNEL_TOKEN, set Automatic startup, and configure sc.exe failure cloudflared reset= 86400 actions= restart/5000/restart/5000/restart/5000.
    • Ensure OpenSSH.Server~~~~0.0.1.0 is installed, sshd is Automatic and Running, and the inbound TCP 22 firewall rule exists.
    • Append $env:SSH_PUBLIC_KEY (trimmed, single unquoted line, deduplicated) to C:\ProgramData\ssh\administrators_authorized_keys, apply strict icacls (Administrators:F, SYSTEM:F, /inheritance:r, /setowner "Administrators"), and restart sshd.
  4. Local smoke test (deploy/scripts/smoke-test.ps1):
    • Poll http://127.0.0.1:<port><health-path> for up to 30 seconds expecting HTTP 200.
    • On failure, dump docker compose -f deploy/compose.deploy.yml logs --tail 100, docker ps -a, docker inspect <project-name>, and Get-Service cloudflared, sshd, then exit 1.

Phase 5: Live domain verification and completion gate

Do not stop when git push finishes. Complete all three checks before declaring success:

  1. Monitor the workflow run (gh run watch <run-id> --repo <owner>/<repo> --exit-status). If it fails, inspect gh run view <run-id> --log-failed and references/troubleshooting.md, fix the cause, and re-run.
  2. Probe the public site externally (Invoke-WebRequest "https://<domain>" -UseBasicParsing or curl -I) and confirm HTTP 200 (and expected 301 redirect if www.<domain> redirects to root). If Cloudflare returns 502/504 or 1033/530, diagnose using references/troubleshooting.md.
  3. Confirm passwordless SSH works from the client PC (ssh -o BatchMode=yes <user>@<ssh> "whoami").
  4. Summarize the live URL, container health status, mounted volume(s), runner service name (C:\deploy\runners\<project-name>), and remaining security follow-ups (disabling PasswordAuthentication in sshd_config after testing key auth, rotating any temporary password, and confirming repo privacy).

Uninstall workflow

Run this workflow only when the user asks to uninstall, remove, or tear down a repository's deployment from the remote Windows 11 server.

Fixed teardown actions

  1. Identify <owner>/<repo>, <project-name>, and the runner directory C:\deploy\runners\<project-name> (plus deploy/compose.deploy.yml if present in the repo).
  2. Connect to the remote over SSH as user and remove the app container and its local project image without deleting volumes. Run the bundled teardown script, which unregisters the runner from GitHub, deletes its service and directory, and keeps volumes:
    $env:DOCKER_CONFIG = 'C:\deploy\docker-config'
    $token = gh api -X POST repos/<owner>/<repo>/actions/runners/remove-token --jq .token
    powershell -NoProfile -File deploy\scripts\uninstall.ps1 -ProjectName <project-name> `
      -ComposeFile <path-to-compose.deploy.yml> -RunnerDir C:\deploy\runners\<project-name> -RemoveToken $token
    When the script is not available, run docker compose -f <path-to-compose.deploy.yml> -p <project-name> down --rmi local from a shell that can read the file. A bare docker compose -p <project-name> down outside the project directory fails because Compose resolves the file from the current directory. If no Compose file exists on the server, run docker rm -f <project-name> and docker rmi <project-name>:local. Never pass -v automatically.
  3. When the bundled script cannot run (no config.cmd left, or the folder is already gone):
    • Request a removal token: gh api -X POST repos/<owner>/<repo>/actions/runners/remove-token --jq .token.
    • On the remote inside C:\deploy\runners\<project-name>, run .\config.cmd remove --token <remove-token> to unregister from GitHub. It removes .runner, .credentials, and the Windows service. Do not pass --unattended; remove rejects it.
    • If the registration is already gone from GitHub, read the service name from .service, run Stop-Service and sc.exe delete "<service-name>", delete C:\deploy\runners\<project-name>, then delete the orphaned entry with gh api -X DELETE repos/<owner>/<repo>/actions/runners/<runner-id>. Deleting the folder alone leaves the runner listed as offline in repository settings.
  4. Preserve shared host infrastructure (do not modify or delete):
    • Docker Desktop and DockerDesktop-Headless scheduled task
    • C:\deploy\docker-config
    • cloudflared binary and cloudflared Windows service
    • sshd service and C:\ProgramData\ssh\administrators_authorized_keys
    • Any other repository runners under C:\deploy\runners\

Confirmation prompts before destructive cleanup

Before step 2, capture any value you will need later:

  • Tunnel token: an installed cloudflared service holds its connector token in the service definition (HKLM:\SYSTEM\CurrentControlSet\Services\cloudflared ImagePath). If a later install may run on the same host and the token is not stored elsewhere, recover it first and keep it out of logs and files. Removing the service discards the token.

After completing steps 1 through 4, explicitly ask the user before deleting any of these:

  1. Persistent Docker volumes: Inspect docker volume ls --filter "name=<project-name>_" -q. List any matching volumes (such as <project-name>_todos or <project-name>_data) and ask whether to keep them (safe default) or delete them (docker volume rm <volume>).
  2. Repository deployment files: Ask whether to keep or remove .github/workflows/deploy.yml, ./deploy/, and .dockerignore from the repository (and commit/push the removal if requested).
  3. GitHub secrets: Ask whether to remove CLOUDFLARED_TUNNEL_TOKEN and SSH_PUBLIC_KEY from the repository secrets (gh secret delete).

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.