Skip to content

Commit 4811c87

Browse files
asklarCopilot
andcommitted
Skill auto-downloads lvt from GitHub Releases
The SKILL.md now includes a PowerShell snippet that the agent runs to download and cache lvt.exe + lvt_tap.dll in ~/.lvt/ if not already present. No manual download step needed. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent d9b3077 commit 4811c87

2 files changed

Lines changed: 36 additions & 4 deletions

File tree

.github/skills/lvt/SKILL.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,25 @@ Use `lvt` whenever you need to understand the visual content or structure of a r
2121

2222
## Prerequisites
2323

24-
Download `lvt.exe` and `lvt_tap.dll` from the **[latest GitHub release](https://github.com/asklar/lvt/releases/latest)** and place them in the same directory (or on PATH). No build step required.
24+
Before using lvt, ensure `lvt.exe` and `lvt_tap.dll` are available. If they are not already on PATH or in the current directory, download and extract them automatically:
2525

26-
If lvt was installed via the release zip, `lvt.exe` is in the same directory tree as this skill file. Try running it from there first.
26+
```powershell
27+
# Download the latest release zip and extract to ~/.lvt
28+
$lvtDir = "$env:USERPROFILE\.lvt"
29+
if (-not (Test-Path "$lvtDir\lvt.exe")) {
30+
New-Item -ItemType Directory -Path $lvtDir -Force | Out-Null
31+
$release = Invoke-RestMethod "https://api.github.com/repos/asklar/lvt/releases/latest"
32+
$asset = $release.assets | Where-Object { $_.name -like "lvt-*-x64.zip" } | Select-Object -First 1
33+
$zip = "$env:TEMP\lvt.zip"
34+
Invoke-WebRequest -Uri $asset.browser_download_url -OutFile $zip
35+
Expand-Archive -Path $zip -DestinationPath $lvtDir -Force
36+
Remove-Item $zip
37+
}
38+
# Run lvt from the install directory
39+
& "$lvtDir\lvt.exe" --help
40+
```
41+
42+
Once downloaded, `lvt.exe` persists in `~/.lvt/` and does not need to be downloaded again.
2743

2844
## Usage
2945

skills/lvt/SKILL.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,25 @@ Use `lvt` whenever you need to understand the visual content or structure of a r
2121

2222
## Prerequisites
2323

24-
Download `lvt.exe` and `lvt_tap.dll` from the **[latest GitHub release](https://github.com/asklar/lvt/releases/latest)** and place them in the same directory (or on PATH). No build step required.
24+
Before using lvt, ensure `lvt.exe` and `lvt_tap.dll` are available. If they are not already on PATH or in the current directory, download and extract them automatically:
2525

26-
If lvt was installed via the release zip, `lvt.exe` is in the same directory tree as this skill file. Try running it from there first.
26+
```powershell
27+
# Download the latest release zip and extract to ~/.lvt
28+
$lvtDir = "$env:USERPROFILE\.lvt"
29+
if (-not (Test-Path "$lvtDir\lvt.exe")) {
30+
New-Item -ItemType Directory -Path $lvtDir -Force | Out-Null
31+
$release = Invoke-RestMethod "https://api.github.com/repos/asklar/lvt/releases/latest"
32+
$asset = $release.assets | Where-Object { $_.name -like "lvt-*-x64.zip" } | Select-Object -First 1
33+
$zip = "$env:TEMP\lvt.zip"
34+
Invoke-WebRequest -Uri $asset.browser_download_url -OutFile $zip
35+
Expand-Archive -Path $zip -DestinationPath $lvtDir -Force
36+
Remove-Item $zip
37+
}
38+
# Run lvt from the install directory
39+
& "$lvtDir\lvt.exe" --help
40+
```
41+
42+
Once downloaded, `lvt.exe` persists in `~/.lvt/` and does not need to be downloaded again.
2743

2844
## Usage
2945

0 commit comments

Comments
 (0)