agentleFS
vzakusylovzakusylo/victron/.claude/skills/loop-token/SKILL.md

loop-token

Skill4 starsChanged 13 days agoMITView on GitHub

Rotate the Windows dev loop's GitHub token (~/victron-loop/token) - prepare the fine-grained token page, have the owner generate and paste it into rotate-token.ps1, restart the loop, revoke the old token. Use when the owner says "rotate key for loop", "new loop token", the loop dashboard shows the token near expiry, or loop cycles fail with "error connecting to api.github.com", "token-invalid" or "token-missing".

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read the settings back from the page.

    line 26
  2. Very specific:

    Owner: stop the loop (Ctrl+C), Generate token, click the copy icon and copy nothing else, then type (do not paste) pwsh -NoProfile -File …

    line 27

≈ “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

Loop token

The Windows loop (tools/dev-loop/run-windows.ps1) calls gh with GH_TOKEN read from ~/victron-loop/token on every cycle (victron_loop/gh.py). A bad, revoked or expired fine-grained token can show up as "error connecting to api.github.com" (seen 26-27 Nov 2026), not only as HTTP 401. Only the Windows loop runs; never start the Omarchy one.

Agents never see, type or store the token. Agents may prepare the GitHub page; the owner presses Generate, copies the token and pastes it at the script's hidden prompt.

Steps

  1. Check: dashboard http://127.0.0.1:8790/ shows "GitHub loop token: expires in N days". To test the installed token, the owner runs pwsh -NoProfile -File tools\dev-loop\rotate-token.ps1 -Check.
  2. Prepare the page, either:
    • owner runs pwsh -NoProfile -File tools\dev-loop\new-token-page.ps1 (opens the pre-filled page, waits, then runs rotate-token.ps1), or
    • Claude fills https://github.com/settings/personal-access-tokens/new in the built-in browser (owner signs in): name victron-loop <date>, owner vzakusylo, 90 days, Only select repositories -> vzakusylo/victron, Contents / Pull requests / Workflows: Read and write, Actions: Read-only (Metadata read-only is required). Read the settings back from the page; stop at the Generate token button.
  3. Owner: stop the loop (Ctrl+C), Generate token, click the copy icon and copy nothing else, then type (do not paste) pwsh -NoProfile -File C:\learn\victron\tools\dev-loop\rotate-token.ps1 and paste once at the hidden prompt.
  4. Read the result:
    • "Loop token installed" + "Loop dry run passed" = done. The warning "can list more than one repository" is expected (every fine-grained token reads public repos).
    • "Expected a fine-grained github_pat_ token" = the clipboard held something else (a token is 93 chars, github_pat_...). Copy again from GitHub, or Regenerate the token if the page is gone.
    • "...token-rotation.lock ... used by another process" = another rotate-token.ps1 is waiting at its prompt; find it (Get-CimInstance Win32_Process | ? CommandLine -match rotate-token) and paste there or stop it.
    • Nothing is installed on failure; the old token stays in place. The previous token is kept as token.prev (rotate-token.ps1 -Rollback restores it).
  5. Restart: pwsh -NoProfile -File C:\learn\victron\tools\dev-loop\run-windows.ps1 -Live in the owner's own terminal. Check the first cycle has no "error connecting" lines.
  6. Revoke the old token at https://github.com/settings/personal-access-tokens.

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.