Desktop app that records your on-screen work session and uses the GitHub Copilot SDK to reconstruct it as an intent + ordered steps, then builds a reusable Skill or Automation for Microsoft Autopilots like Scout, Microsoft Copilot Cowork, or Copilot Studio.
TypeScript agent-skillsai-agentsautomationcopilotcopilot-clicopilot-coworkcopilot-studioelectronmicrosoft-scoutscreen-recording
Release 0.3.0: desktop shortcut and cached Windows installs (#55)
Giorgio Ughinifc5274fa5a52
diff --git a/INSTALL.md b/INSTALL.mdindex b1049bc..daa1e53 100644--- a/INSTALL.md+++ b/INSTALL.md@@ -52,9 +52,10 @@ The source installers:lacks reviewed legal material.7. Build locally, retain repository/dependency licenses, and record hashes forthe installed Electron and Copilot executables.-8. Create a Start Menu shortcut on Windows; a launcher plus a `Skill Recorder- (Source)` app in `~/Applications` (reachable from Spotlight, Launchpad, and the- Dock) on macOS; and a launcher plus desktop entry on Ubuntu.+8. Create Start Menu **and** desktop shortcuts on Windows; a launcher plus a+ `Skill Recorder (Source)` app in `~/Applications` (reachable from Spotlight,+ Launchpad, and the Dock) on macOS; and a launcher plus desktop entry on Ubuntu.+9. Print a final confirmation listing the shortcuts that were created.No administrator access, global Node.js installation, or global Copilot CLIinstallation is required. GitHub Copilot authentication, entitlement, and@@ -116,6 +117,7 @@ rm -f "$script"| `SKILL_RECORDER_COMMIT` | all | Required full 40-character source commit || `SKILL_RECORDER_INSTALL_ROOT` | all | Override the per-user source/runtime directory || `SKILL_RECORDER_NO_LAUNCH=1` | all | Install and validate without launching |+| `SKILL_RECORDER_NO_DESKTOP_SHORTCUT=1` | Windows | Create only the Start Menu shortcut || `SKILL_RECORDER_DETACHED=1` | macOS, Ubuntu | Launch in the background with file logging || `SKILL_RECORDER_LOG_KEEP` | macOS, Ubuntu | Number of detached launch logs to retain; default `5` |@@ -129,12 +131,26 @@ Every revision is installed under `versions/<commit>`. The current launcher isupdated only after the selected revision passes dependency, license, integrity,and build checks.+## Re-running the same command++Running the Windows command again with the same commit does not download or+rebuild anything. The installer verifies the existing `versions/<commit>`+installation, refreshes the Start Menu and desktop shortcuts, and launches.++If an earlier attempt failed part-way, the portable Node.js archive and the+source archive it had already fetched are kept in `<install root>\cache` and+reused on the next attempt. Cached files are re-verified by SHA-256 before use —+the Node.js archive against the checksums published by nodejs.org on every run —+and are deleted once the revision is installed. Deleting the `cache` directory is+always safe.+## Relaunching after it closesAfter a successful install you can reopen Skill Recorder without re-running theinstaller:-- Windows: the **Skill Recorder (Source)** Start Menu shortcut.+- Windows: the **Skill Recorder (Source)** desktop shortcut, or the matching+ Start Menu entry.- macOS: **Skill Recorder (Source)** in `~/Applications`, searchable fromSpotlight and Launchpad and pinnable to the Dock.- Ubuntu: the **Skill Recorder (Source)** desktop entry, or run the launcher@@ -245,6 +261,7 @@ Test the new revision before deleting an older revision.```powershellRemove-Item "$([Environment]::GetFolderPath('Programs'))\Skill Recorder (Source).lnk" -Force+Remove-Item "$([Environment]::GetFolderPath('DesktopDirectory'))\Skill Recorder (Source).lnk" -ForceRemove-Item "$env:LOCALAPPDATA\SkillRecorder" -Recurse -Force```diff --git a/README.md b/README.mdindex 6e25155..bacc988 100644--- a/README.md+++ b/README.md@@ -58,8 +58,10 @@ command. On Ubuntu it adds a matching application entry.Use the commit-pinned source installer documented in [`INSTALL.md`](INSTALL.md). Thepublished command must identify a full 40-character release commit. It downloads averified portable Node.js 24 runtime, builds that exact source revision locally, preserves-the required license materials, and creates a Start Menu shortcut without installing Node-system-wide.+the required license materials, and creates **Skill Recorder (Source)** shortcuts on your+desktop and in the Start Menu — all without installing Node system-wide. When it finishes+it prints where both shortcuts were saved. Re-running the same command with the same+commit reuses the installed revision instead of downloading and rebuilding it again.Both paths install dependencies from their publishers and build Skill Recorder locally.The platform-specific Copilot CLI is installed with the application dependencies; a global@@ -84,6 +86,7 @@ Set any of these environment variables when you run the command:| `SKILL_RECORDER_COMMIT` | *(required)* | exact 40-character source commit || `SKILL_RECORDER_INSTALL_ROOT` | per-user platform path | source and portable runtime location || `SKILL_RECORDER_NO_LAUNCH` | *(unset)* | set to `1` to install without launching |+| `SKILL_RECORDER_NO_DESKTOP_SHORTCUT` | *(unset)* | Windows: set to `1` to skip the desktop shortcut || `SKILL_RECORDER_DETACHED` | *(unset)* | macOS/Ubuntu background launch with rolling logs || `SKILL_RECORDER_LOG_KEEP` | `5` | macOS/Ubuntu detached log retention |diff --git a/install.ps1 b/install.ps1index c340f8b..2171227 100644--- a/install.ps1+++ b/install.ps1@@ -9,7 +9,12 @@ Builds and installs Skill Recorder from an exact source commit.This script does not download a prebuilt Skill Recorder application. It obtainsan official portable Node.js 24 runtime, downloads the exact requested sourcecommit from GitHub, installs lockfile-pinned dependencies from their publishers,-validates license materials, builds locally, and creates a Start Menu shortcut.+validates license materials, builds locally, and creates Start Menu and desktop+shortcuts.++Re-running the same commit reuses the verified installation instead of+downloading and rebuilding it again. Downloads interrupted by an earlier failed+run are resumed from a checksum-verified cache rather than fetched twice.#>& {@@ -19,6 +24,7 @@ $ProgressPreference = "SilentlyContinue"$Commit = $env:SKILL_RECORDER_COMMIT$InstallRoot = $env:SKILL_RECORDER_INSTALL_ROOT$skipLaunch = $env:SKILL_RECORDER_NO_LAUNCH -eq "1"+$createDesktopShortcut = $env:SKILL_RECORDER_NO_DESKTOP_SHORTCUT -ne "1"function Write-Step {param([Parameter(Mandatory)][string]$Message)@@ -61,6 +67,60 @@ function Invoke-Download {}}+function Get-CachedDownload {+ param(+ [Parameter(Mandatory)][string]$Uri,+ [Parameter(Mandatory)][string]$CachePath,+ [string]$ExpectedSha256+ )++ $digestPath = "$CachePath.sha256"+ $expected = ""+ if (-not [string]::IsNullOrWhiteSpace($ExpectedSha256)) {+ $expected = $ExpectedSha256.ToLowerInvariant()+ }++ if (Test-Path -LiteralPath $CachePath -PathType Leaf) {+ $reference = $expected+ if ([string]::IsNullOrWhiteSpace($reference) -and (Test-Path -LiteralPath $digestPath -PathType Leaf)) {+ $reference = (Get-Content -LiteralPath $digestPath -Raw).Trim().ToLowerInvariant()+ }++ $cachedHash = (Get-FileHash -LiteralPath $CachePath -Algorithm SHA256).Hash.ToLowerInvariant()+ if ($reference -match "^[0-9a-f]{64}$" -and $cachedHash -eq $reference) {+ Write-Step "Reusing the cached download $(Split-Path -Leaf $CachePath) instead of downloading it again."+ return $cachedHash+ }++ Write-Step "Discarding an unverifiable cached download: $(Split-Path -Leaf $CachePath)"+ Remove-Item -LiteralPath $CachePath -Force+ if (Test-Path -LiteralPath $digestPath -PathType Leaf) {+ Remove-Item -LiteralPath $digestPath -Force+ }+ }++ New-Item -ItemType Directory -Path (Split-Path -Parent $CachePath) -Force | Out-Null+ Invoke-Download -Uri $Uri -Destination $CachePath+ $downloadHash = (Get-FileHash -LiteralPath $CachePath -Algorithm SHA256).Hash.ToLowerInvariant()+ if (-not [string]::IsNullOrWhiteSpace($expected) -and $downloadHash -ne $expected) {+ Remove-Item -LiteralPath $CachePath -Force+ throw "Download SHA-256 mismatch for $Uri. Expected $expected, got $downloadHash."+ }++ Set-Content -LiteralPath $digestPath -Value $downloadHash -Encoding ASCII+ return $downloadHash+}++function Remove-CachedDownload {+ param([Parameter(Mandatory)][string]$CachePath)++ foreach ($path in @($CachePath, "$CachePath.sha256")) {+ if (Test-Path -LiteralPath $path -PathType Leaf) {+ Remove-Item -LiteralPath $path -Force+ }+ }+}+function Assert-ZipArchive {param([Parameter(Mandatory)][string]$Path)@@ -228,7 +288,8 @@ function Get-NodeRuntime {param([Parameter(Mandatory)][string]$Architecture,[Parameter(Mandatory)][string]$RuntimeRoot,- [Parameter(Mandatory)][string]$StagingRoot+ [Parameter(Mandatory)][string]$StagingRoot,+ [Parameter(Mandatory)][string]$CacheRoot)Write-Step "Resolving the latest Node.js 24 LTS release for Windows $Architecture."@@ -258,22 +319,25 @@ function Get-NodeRuntime {$npmCmd = Join-Path $runtimeDirectory "npm.cmd"if (-not (Test-Path -LiteralPath $runtimeDirectory -PathType Container)) {- Write-Step "Downloading $archiveName from nodejs.org."- $archivePath = Join-Path $StagingRoot $archiveName+ $archivePath = Join-Path $CacheRoot $archiveName$sumsPath = Join-Path $StagingRoot "SHASUMS256.txt"$baseUri = "https://nodejs.org/dist/$version"- Invoke-Download -Uri "$baseUri/$archiveName" -Destination $archivePathInvoke-Download -Uri "$baseUri/SHASUMS256.txt" -Destination $sumsPath- Assert-ZipArchive -Path $archivePath$hashPattern = "(?m)^([0-9a-fA-F]{64})\s+" + [regex]::Escape($archiveName) + "\s*$"$hashMatch = [regex]::Match((Get-Content -LiteralPath $sumsPath -Raw), $hashPattern)if (-not $hashMatch.Success) {throw "Official Node.js checksums do not list $archiveName."}-$expectedHash = $hashMatch.Groups[1].Value.ToLowerInvariant()- $actualHash = (Get-FileHash -LiteralPath $archivePath -Algorithm SHA256).Hash.ToLowerInvariant()++ Write-Step "Obtaining $archiveName from nodejs.org."+ $actualHash = Get-CachedDownload `+ -Uri "$baseUri/$archiveName" `+ -CachePath $archivePath `+ -ExpectedSha256 $expectedHash+ Assert-ZipArchive -Path $archivePath+if ($actualHash -ne $expectedHash) {throw "Node.js archive SHA-256 mismatch. Expected $expectedHash, got $actualHash."}@@ -289,6 +353,9 @@ function Get-NodeRuntime {New-Item -ItemType Directory -Path $RuntimeRoot -Force | Out-NullMove-Item -LiteralPath $expandedDirectory -Destination $runtimeDirectory+ Remove-CachedDownload -CachePath $archivePath+ } else {+ Write-Step "Reusing the verified Node.js $version runtime already installed at $runtimeDirectory."}Assert-TrustedSignature `@@ -318,18 +385,30 @@ function Get-NodeRuntime {}}+function Get-ShortcutFolder {+ param(+ [Parameter(Mandatory)][string]$SpecialFolder,+ [Parameter(Mandatory)][string]$Description+ )++ $folder = [Environment]::GetFolderPath([Environment+SpecialFolder]$SpecialFolder)+ if ([string]::IsNullOrWhiteSpace($folder)) {+ throw "The current user does not have a $Description directory."+ }+ if (-not (Test-Path -LiteralPath $folder -PathType Container)) {+ New-Item -ItemType Directory -Path $folder -Force | Out-Null+ }+ return $folder+}+function New-SourceShortcut {param(+ [Parameter(Mandatory)][string]$Folder,[Parameter(Mandatory)][string]$SourceDirectory,[Parameter(Mandatory)][string]$ElectronExecutable)- $programs = [Environment]::GetFolderPath([Environment+SpecialFolder]::Programs)- if ([string]::IsNullOrWhiteSpace($programs)) {- throw "The current user does not have a Start Menu Programs directory."- }-- $shortcutPath = Join-Path $programs "Skill Recorder (Source).lnk"+ $shortcutPath = Join-Path $Folder "Skill Recorder (Source).lnk"$shell = New-Object -ComObject WScript.Shell$shortcut = $shell.CreateShortcut($shortcutPath)$shortcut.TargetPath = $ElectronExecutable@@ -338,6 +417,9 @@ function New-SourceShortcut {$shortcut.IconLocation = "$ElectronExecutable,0"$shortcut.Description = "Skill Recorder built locally from pinned source"$shortcut.Save()+ if (-not (Test-Path -LiteralPath $shortcutPath -PathType Leaf)) {+ throw "Windows did not create the shortcut at $shortcutPath."+ }return $shortcutPath}@@ -364,6 +446,7 @@ $InstallRoot = [IO.Path]::GetFullPath($InstallRoot)$runtimeRoot = Join-Path $InstallRoot "runtime"$versionsRoot = Join-Path $InstallRoot "versions"+$cacheRoot = Join-Path $InstallRoot "cache"$sourceDirectory = Join-Path $versionsRoot $Commit$metadataPath = Join-Path $sourceDirectory ".skill-recorder-install.json"$platformPackage = "@github\copilot-win32-$architecture"@@ -371,7 +454,7 @@ $platformPackage = "@github\copilot-win32-$architecture"New-Item -ItemType Directory -Path $versionsRoot -Force | Out-Nullif (Test-Path -LiteralPath $sourceDirectory -PathType Container) {- Write-Step "Using the existing installation for commit $Commit."+ Write-Step "Commit $Commit is already installed; reusing it without downloading or rebuilding anything."if (-not (Test-Path -LiteralPath $metadataPath -PathType Leaf)) {throw "The existing source directory has no installation metadata: $sourceDirectory"}@@ -392,15 +475,15 @@ if (Test-Path -LiteralPath $sourceDirectory -PathType Container) {$runtime = Get-NodeRuntime `-Architecture $architecture `-RuntimeRoot $runtimeRoot `- -StagingRoot $stagingDirectory+ -StagingRoot $stagingDirectory `+ -CacheRoot $cacheRoot- Write-Step "Downloading the exact source commit from GitHub."- $sourceArchive = Join-Path $stagingDirectory "skill-recorder-$Commit.zip"- Invoke-Download `+ Write-Step "Obtaining the exact source commit from GitHub."+ $sourceArchive = Join-Path $cacheRoot "skill-recorder-$Commit.zip"+ $sourceArchiveHash = Get-CachedDownload `-Uri "https://codeload.github.com/adilei/skill-recorder/zip/$Commit" `- -Destination $sourceArchive+ -CachePath $sourceArchiveAssert-ZipArchive -Path $sourceArchive- $sourceArchiveHash = (Get-FileHash -LiteralPath $sourceArchive -Algorithm SHA256).Hash.ToLowerInvariant()$sourceExtractRoot = Join-Path $stagingDirectory "source"Expand-Archive -LiteralPath $sourceArchive -DestinationPath $sourceExtractRoot@@ -532,6 +615,7 @@ if (Test-Path -LiteralPath $sourceDirectory -PathType Container) {throw "Refusing to overwrite an existing source installation: $sourceDirectory"}Move-Item -LiteralPath $buildDirectory -Destination $sourceDirectory+ Remove-CachedDownload -CachePath $sourceArchive} finally {if (Test-Path -LiteralPath $stagingDirectory) {Remove-Item -LiteralPath $stagingDirectory -Recurse -Force@@ -563,15 +647,50 @@ Assert-TrustedSignature `-PublisherPattern "GitHub, Inc\." `-PublisherName "GitHub"-$shortcutPath = New-SourceShortcut `- -SourceDirectory $sourceDirectory `- -ElectronExecutable $electronExecutable+$startMenuShortcut = $null+$desktopShortcut = $null++try {+ $startMenuShortcut = New-SourceShortcut `+ -Folder (Get-ShortcutFolder -SpecialFolder "Programs" -Description "Start Menu Programs") `+ -SourceDirectory $sourceDirectory `+ -ElectronExecutable $electronExecutable+} catch {+ Write-Warning "Could not create the Start Menu shortcut: $($_.Exception.Message)"+}++if ($createDesktopShortcut) {+ try {+ $desktopShortcut = New-SourceShortcut `+ -Folder (Get-ShortcutFolder -SpecialFolder "DesktopDirectory" -Description "Desktop") `+ -SourceDirectory $sourceDirectory `+ -ElectronExecutable $electronExecutable+ } catch {+ Write-Warning "Could not create the desktop shortcut: $($_.Exception.Message)"+ }+}Write-Step "Installed commit $Commit at $sourceDirectory"Write-Step "License materials remain in the source tree, dependency packages, and .compliance directory."-Write-Step "Created Start Menu shortcut: $shortcutPath"Write-Warning "This locally generated build is for local execution only. Do not redistribute it."+Write-Host ""+Write-Host "Skill Recorder is ready. Open it any time from these shortcuts:"+if ($null -ne $startMenuShortcut) {+ Write-Host " Start Menu : $startMenuShortcut"+} else {+ Write-Host " Start Menu : not created (see the warning above)"+}+if (-not $createDesktopShortcut) {+ Write-Host " Desktop : skipped because SKILL_RECORDER_NO_DESKTOP_SHORTCUT=1"+} elseif ($null -ne $desktopShortcut) {+ Write-Host " Desktop : $desktopShortcut"+} else {+ Write-Host " Desktop : not created (see the warning above)"+}+Write-Host "Each entry is named 'Skill Recorder (Source)' and starts this installed revision."+Write-Host ""+if (-not $skipLaunch) {Write-Step "Launching Skill Recorder."Start-Process `diff --git a/package-lock.json b/package-lock.jsonindex f797ffe..ccede0e 100644--- a/package-lock.json+++ b/package-lock.json@@ -1,12 +1,12 @@{"name": "skill-recorder",- "version": "0.2.1",+ "version": "0.3.0","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "skill-recorder",- "version": "0.2.1",+ "version": "0.3.0","license": "MIT","dependencies": {"@github/copilot-sdk": "^1.0.6",diff --git a/package.json b/package.jsonindex 49cc408..09a59f2 100644--- a/package.json+++ b/package.json@@ -1,6 +1,6 @@{"name": "skill-recorder",- "version": "0.2.1",+ "version": "0.3.0","description": "Records a user's on-screen work session and derives a structured description for building AI-agent skills.","author": "Skill Recorder contributors","repository": "github:adilei/skill-recorder",diff --git a/scripts/compliance.test.mjs b/scripts/compliance.test.mjsindex 929e288..3e52d1f 100644--- a/scripts/compliance.test.mjs+++ b/scripts/compliance.test.mjs@@ -368,6 +368,17 @@ test("source and release instructions remain compliance-preserving", async () =>);assert.doesNotMatch(windowsInstaller, /\/(?:master|main)\/install\.ps1/i);+ assert.match(windowsInstaller, /"Skill Recorder \(Source\)\.lnk"/);+ assert.match(windowsInstaller, /SpecialFolder "Programs"/);+ assert.match(windowsInstaller, /SpecialFolder "DesktopDirectory"/);+ assert.match(windowsInstaller, /SKILL_RECORDER_NO_DESKTOP_SHORTCUT -ne "1"/);+ assert.match(+ windowsInstaller,+ /Get-CachedDownload `\r?\n\s+-Uri "\$baseUri\/\$archiveName" `\r?\n\s+-CachePath \$archivePath `\r?\n\s+-ExpectedSha256 \$expectedHash/,+ );+ assert.match(windowsInstaller, /Remove-CachedDownload -CachePath \$archivePath/);+ assert.match(windowsInstaller, /Remove-CachedDownload -CachePath \$sourceArchive/);+assert.match(unixInstaller, /\^\[0-9a-fA-F\]\{40\}\$/);assert.match(unixInstaller,@@ -399,6 +410,8 @@ test("source and release instructions remain compliance-preserving", async () =>assert.match(instructions, /Ubuntu/);assert.match(instructions, /complete generated\s+compliance bundle/i);assert.doesNotMatch(instructions, /raw\.githubusercontent\.com\/[^ \n]+\/(?:master|main)\//i);+ assert.match(instructions, /SKILL_RECORDER_NO_DESKTOP_SHORTCUT=1/);+ assert.match(instructions, /GetFolderPath\('DesktopDirectory'\)/);assert.match(readme, /\[`INSTALL\.md`\]\(INSTALL\.md\)/);assert.match(readme, /\[`RELEASING\.md`\]\(RELEASING\.md\)/);assert.doesNotMatch(readme, /raw\.githubusercontent\.com\/[^ \n]+\/(?:master|main)\//i);