feat: redesign for current awesome-copilot structure#1
Open
Conversation
The awesome-copilot repository was reorganised -- chatmodes/ and prompts/ no longer exist. Resources are now split into flat categories (agents, instructions, workflows) and subdirectory-based packages (skills, hooks, plugins, cookbook). This commit updates all scripts to reflect that structure and introduces a cleaner global-vs-per-repo publishing model. New scripts: - publish-global.ps1: publishes agents to the VS Code user agents folder (via junction so sync updates are reflected immediately) and skills to ~/.copilot/skills/; supports -DryRun, -SkipAgents, -SkipSkills, -AgentsTarget, -SkillsTarget - init-repo.ps1: interactive per-repo initialiser; lets you select instructions, hooks, workflows and project-level skills from the local cache and installs them into .github/ subfolders; uses Out-GridView with a numbered console-menu fallback; supports -RepoPath, -DryRun, skip flags and pre-selection parameters Updated scripts: - sync-awesome-copilot.ps1: default categories changed to agents,instructions,workflows,hooks,skills; added Get-RepoFiles recursive traversal for subdirectory-based categories; added .sh to extension filter (required for hooks to function) - install-scheduled-task.ps1: default categories updated; -SkipCombine replaced by -SkipPublishGlobal; -IncludeCollections replaced by -IncludePlugins; second scheduled action now runs publish-global.ps1 - normalize-copilot-folders.ps1: added *.agent.md -> agents/ classification Removed: - combine-and-publish-prompts.ps1: superseded by publish-global.ps1 and init-repo.ps1 - publish-to-vscode-profile.ps1: only handled chatmodes/ and prompts/ which no longer exist in awesome-copilot Design rationale: agents and skills are global (agents available across all VS Code workspaces; skills loaded on-demand without noise); instructions/hooks/workflows are per-repo opt-in via init-repo.ps1 to avoid contradicting instruction files being active everywhere. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Inquire causes the script to pause and wait for interactive input on any unhandled error, which hangs scheduled task runs indefinitely. Stop ensures errors are terminating and handled by existing try/catch blocks. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Skills are available globally via publish-global.ps1 (~/.copilot/skills/). There is no value in copying point-in-time versions into .github/skills/ - users should reference the source at github/awesome-copilot directly. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Documents the ErrorActionPreference fix and skills removal from init-repo. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Auto-detects language/framework from repo file signals and pre-marks recommended instructions/hooks/workflows with ★ in the picker. For new/empty repos, prompts for intent one question at a time. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Auto-detects language/framework from repo file signals and pre-marks recommended instructions/hooks/workflows with star in the Rec column, sorted to the top of the picker. For new/empty repos, prompts for intent one question at a time (stack, project type, concerns). Also fixes Out-GridView column name bug (non-alphanumeric names cause WPF property path errors). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
'return if (...)' is not valid PowerShell at runtime despite passing the parser. Replace with explicit if/else return statements. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Added security-and-owasp and powershell instructions to .github/instructions/ as detected by init-repo.ps1 from repo signals. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Covers script workflow order, logging/error/dry-run/change-detection conventions, portable path requirements, external dependencies, cache structure, and contributing guidelines. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
VS Code discovers global custom agents from ~/.copilot/agents/ not %APPDATA%\Code\User\agents\. Also removed stale wrong-path junction. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
VS Code 'Configure Custom Agents > User Data' navigates to this path. Previous guesses (%APPDATA%\Code\User\agents and ~/.copilot/agents) were both incorrect. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Adds per-repo agent selection (.github/agents/) as a fourth category alongside instructions, hooks and workflows. Stack detection and intent prompting both recommend relevant agents. Useful for sharing a curated agent set with teammates who don't run the global sync. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
After publishing skills, automatically sets chat.useAgentSkills=true and adds ~/.copilot/skills/** to chat.agentSkillsLocations in VS Code user settings.json if not already configured. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Prepends a '-- none / skip --' sentinel row to each Out-GridView picker so clicking OK with no intentional selection installs nothing. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Scripts: - normalize-copilot-folders.ps1: fix Split-Path -LeafParent (invalid param) -> -Parent - install-scheduled-task.ps1: remove -Quiet from publish-global args (param doesn't exist) - init-repo.ps1: fix [Array]::IndexOf() in console-menu fallback (no instance method) - publish-global.ps1: update stale 'CCA' comment -> 'VS Code Agent mode / Copilot CLI' Documentation: - README.md: -Interval -> -Every; fix -ProfileName -> -ProfileRoot/-AllProfiles; agents path -> %APPDATA%\Code\User\prompts\; update init-repo section with agents category and smart detection; fix custom AgentsTarget example path - copilot-instructions.md: correct agents path agents\ -> prompts\ - CHANGELOG.md: add v1.1.2 entry Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Script was designed to fix misplaced files across VS Code profile chatmodes/prompts folders from the v1.0 architecture. These categories no longer exist in awesome-copilot. Agents are now published via junction (always correct), skills via direct copy, per-repo resources via init-repo.ps1. No remaining use case. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…NGELOG Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Chains sync-awesome-copilot -> publish-global -> init-repo in a single interactive command. Each step is independently skippable (-SkipSync, -SkipPublish, -SkipInit). -DryRun passes through to all child scripts. Shows last sync timestamp from cache manifest before running. Also updates README quick-start to lead with update.ps1 and adds update.ps1 to the scripts overview section. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Move all implementation scripts to scripts/ subfolder - Replace update.ps1 with configure.ps1 at repo root as single entry point - configure.ps1 chains sync -> publish -> init-repo (prompted) with explicit -InstallTask / -UninstallTask / -Every switches for task mgmt - Update README, copilot-instructions.md to reflect new structure - .gitignore: add .awesome-copilot/ local cache and temp file patterns Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Clone github/awesome-copilot with --depth 1 --filter=blob:none --sparse on first run; subsequent runs use git pull (delta only) - Prefers gh CLI (auto auth); falls back to git; -GitTool param to override - Removes ~700 individual HTTP requests in favour of a single bulk transfer - Removes GitHub API rate-limit concerns entirely - Migrates existing non-git cache automatically (renames to backup dir) - Removes -NoDelete, -DiffOnly, -SkipBackup, -BackupRetention (git handles these) - manifest.json still written from local file scan for backward compat Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…paths - install-scheduled-task.ps1: update task description (remove 'combine') - publish-global.ps1: fix profile path example (agents -> prompts) - README: fix default interval (6h -> 4h), replace GitHub rate-limit section with gh/git auth notes, fix custom repo instructions, fix log path, update file naming conventions, remove legacy chatmode/prompt references - copilot-instructions.md: update sync description (API -> git clone/pull), replace GITHUB_TOKEN/rate-limit section with gh/git note, update cache structure (remove last-success.json, backups/, fix logs/ location) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…sk is set Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…effect Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… dir Without this the task ran from C:\Windows\System32, causing the relative 'logs/' path in sync-awesome-copilot.ps1 to fail with a permissions error (the brief red flash seen on task execution). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Previously logs were written relative to CWD, creating two separate logs/ folders (repo root for interactive runs, scripts/ for scheduled task). Now always writes to scripts/logs/ via \ regardless of CWD. Removed root logs/ directory. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- configure.ps1: use \ (cleaner than \System.Management.Automation.InvocationInfo.MyCommand.Path) - sync: replace manual SHA256 with Get-FileHash (built-in, no file read into memory) - publish-global: WARN when VS Code settings.json not found instead of silent skip Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ample Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
configure.ps1: Initialisation | Step 1-4
sync-awesome-copilot.ps1: Initialisation | Tool detection | Clone or pull |
File scan and change detection | Write manifest and status |
Log retention
publish-global.ps1: Initialisation | Agents | Skills
init-repo.ps1: Initialisation | Stack detection | Intent prompt |
Path validation and stack detection | Helpers |
Catalogue builders | Agents | Instructions |
Hooks | Workflows | Summary
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
bc87144 to
5cef34e
Compare
- init-repo.ps1: add Skills category (installs to .github/skills/) - init-repo.ps1: record all installed resources in .github/.copilot-subscriptions.json - init-repo.ps1: add Get-DirHash helper (combined SHA256 across all files in a directory) - init-repo.ps1: add Update-Subscriptions helper (upserts entries into manifest) - init-repo.ps1: add -Skills / -SkipSkills params - update-repo.ps1: new script to check subscribed resources against upstream cache and apply updates, refreshing hashAtInstall in the manifest - configure.ps1: offer update-repo check when subscriptions manifest exists - configure.ps1: update init prompt text to include skills Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Allows pointing configure.ps1 at a specific repo directory for the init step without having to cd first. The parameter defaults to the current directory so existing usage is unchanged. - Add -RepoPath parameter to configure.ps1 (defaults to cwd) - Thread -RepoPath through to init-repo.ps1 and update-repo.ps1 calls - Use RepoPath for subscriptions file lookup instead of Get-Location - Update README with -RepoPath usage examples and feature bullet Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…heduled task - init-repo: replace hardcoded name matching with content-based relevance scoring - Detect-RepoStack emits tech keywords (csharp, typescript, docker, github-actions, owasp...) - Measure-ItemRelevance scores items by name (weight 2) + content/README (weight 1) - Threshold >= 2 requires a name match, preventing generic content false-positives - Prompt-RepoIntent Q2 now maps to keywords (was a no-op) - Sort order: recommended > installed > alphabetical - init-repo: manifest-driven status flags - Build-FlatCatalogue / Build-DirCatalogue accept category + SubIndex - UpdateAvailable [^] = source hash differs from current install - LocallyModified [~] = current hash differs from hashAtInstall - ManagedByScript = item recorded in .copilot-subscriptions.json - Status column shown in Out-GridView and console fallback - init-repo: safe Uninstall (-Uninstall switch) - Only offers items from .copilot-subscriptions.json (never user-created files) - [~] MODIFIED warning for locally-edited items before removal - Prunes removed entries from manifest via Remove-SubscriptionEntries - init-repo: auto-adopt pre-existing installs into manifest - Items in .github/ but not in manifest are registered on next run - Uses current installed hash as hashAtInstall so [^] fires correctly - configure.ps1: remove scheduled task components - Remove -InstallTask, -UninstallTask, -Every params - Remove Step 4 block and delegates to deleted scripts - Add -Uninstall switch, pass through to init-repo - scripts: delete install-scheduled-task.ps1 and uninstall-scheduled-task.ps1 - .gitignore: exclude awesome-copilot-sourced .github/ resources - .github/agents/, instructions/, hooks/, skills/, workflows/*.md - .github/.copilot-subscriptions.json (local state, not redistributed) - Untrack previously committed awesome-copilot files from git index - README.md: full rewrite focused on per-repo configuration workflow - Remove scheduled task sections and admin privilege requirement - Add install-picker status symbols table - Add update-repo.ps1 as first-class documented script - Document -Uninstall workflow in Quick Start Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Select-ToRemove: add '-- none / skip --' row to Out-GridView so closing the picker without selecting doesn't accidentally remove the first item in the list - configure.ps1: empty input on 'Check for upstream updates?' now defaults to Yes (was No) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Skills (~/.copilot/skills) is now a junction pointing directly at ~/.awesome-copilot/skills, the same approach already used for agents. This eliminates the 460+ file copy on every run — publish-global is now near-instant after first setup. Falls back to symlink then full copy if junction creation fails. Existing real directories are replaced with a junction automatically. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Replace category-specific publish blocks with a single Publish-Junction helper
- Add Instructions, Hooks, Workflows categories alongside existing Agents and Skills
- Add -SkipInstructions, -SkipHooks, -SkipWorkflows params
- Add -InstructionsTarget, -HooksTarget, -WorkflowsTarget params
(default to ~/.copilot/{instructions,hooks,workflows})
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Global agent/skills junctions pollute the picker with hundreds of duplicates. Per-repo cherry-picking via init-repo.ps1 is the correct workflow. - Delete scripts/publish-global.ps1 - Remove -SkipPublish param and Step 2 block from configure.ps1 - Update README: simplified What This Does, What goes where table, Quick Start, Scripts reference, and Troubleshooting Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- configure.ps1: only run update-repo step if manifest has >0 entries - update-repo.ps1: silent exit (no WARN) when manifest empty or missing (WARN is noise when called automatically by configure on a fresh repo) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
owasp alone required a name match to reach score>=2 threshold. Adding 'security' as universal keyword means: - se-security-reviewer: name match (score 2+) -> star - gem-reviewer: content matches owasp+security (score 2) -> star - stackhawk-security-onboarding: name match -> star Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
'security' in a filename like power-bi-security-rls scores 2 -> false star. Agents are where security-reviewer agents live; instructions don't need it. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…tical Partial score (content-only match) was creating a spurious middle tier, floating e.g. power-bi-security-rls above unrelated alphabetical items. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
All Build-FlatCatalogue / Build-DirCatalogue calls now happen upfront before the first OGV opens, so there is no lag between pickers. Skills (464 dirs) was the main bottleneck - now hashed before any UI appears. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add Test-RequiresSetup helper: detects mcp-servers:, _API_KEY, COPILOT_MCP_ patterns - Add RequiresSetup flag to all catalogue items (flat + dir) - IsRecommended now requires score>=2 AND NOT RequiresSetup - Update OGV title: 'Recommended (config-free)' stackhawk-security-onboarding and other MCP-dependent agents will no longer appear as starred recommendations on a vanilla repo. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Items with mcp-servers/API key requirements show [!] in the Status column and DarkYellow in the console fallback — visible but not starred. Updated OGV title, console legend, and README symbol table. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Should-LoadCatalogue helper returns false when uninstalling and the destination dir is absent or empty — avoids hashing 464 skills dirs when there are no skills to uninstall. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Also document [!] setup-required indicator in the Notes section. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
.\configure.ps1 -Install skips the Y/N prompt and goes straight to init-repo pickers — symmetric with -Uninstall. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add Show-OGV wrapper around Out-GridView: - Registers CopilotSync.FgHelper type (EnumWindows/SetForegroundWindow/ShowWindow) - Spins a runspace that polls for the OGV window by partial title match and calls SetForegroundWindow once found (within 4s / 40 polls) - Falls back gracefully if window not found (no error, OGV still works) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
SetForegroundWindow alone fails when the foreground token has expired (which happens during catalogue loading). Simulating an Alt key-up event resets the UIPI foreground lock, allowing BringWindowToTop to work. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1. OGV foreground: replace Win32 SetForegroundWindow approach with WScript.Shell.AppActivate which is not subject to UIPI restrictions. Also removes the Add-Type/P-Invoke block (no longer needed). 2. DataVerse false positives: exclude *.instructions.md, *.agent.md, *.prompt.md, *.chatmode.md from Detect-RepoStack file scan. Previously installed awesome-copilot files were feeding back into the keyword detector, recommending more of the same category. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…focus-steal
- Add SearchKey param to Show-OGV; falls back to stripping non-ASCII from Title
- Pass explicit 'Select {Category}' key at both call sites (no unicode chars)
- Call AppActivate twice (with 150ms gap) to counter VS Code re-stealing focus
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Previously 'python' matched 'dataverse-python-sdk' because word-boundary regex fires anywhere in the name. Now requires the keyword to be the first dash-segment (or a compound keyword prefix like 'github-actions-*'). se-security-reviewer still scores 2 via content (owasp+security), so its star is preserved without needing a mid-name match. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Windows UIPI intentionally blocks focus-stealing from background processes. All three approaches (SetForegroundWindow, keybd_event, AppActivate from runspace) fail for the same reason. Replace with a clear console message. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
security-and-owasp has 'owasp' as a valid non-first segment and was losing its star. The DataVerse false-positive was a content-scan feedback loop (fixed separately by excluding installed awesome-copilot files), not a name-match problem. Use full-segment match anywhere in the name instead. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Complete redesign of the sync toolset to align with the current awesome-copilot repository structure, plus a full interactive configuration pipeline.
What's New
configure.ps1 — single entry point
powershell .\configure.ps1 # sync + publish + prompt for repo init .\configure.ps1 -SkipInit # sync + publish only .\configure.ps1 -InstallTask # sync + publish + install scheduled task .\configure.ps1 -InstallTask -Every '2h' .\configure.ps1 -DryRun # preview all steps without writing filesscripts/sync-awesome-copilot.ps1 — rewritten around git sparse-checkout
Replaced 700+ individual GitHub API/HTTP calls with a single git sparse-checkout clone:
scripts/publish-global.ps1 — agents + skills
scripts/init-repo.ps1 — per-repo interactive setup
Changed / Fixed
Removed
ormalize-copilot-folders.ps1, combine-and-publish-prompts.ps1, publish-to-vscode-profile.ps1 — superseded
Testing
Tested end-to-end on Windows 11 with PowerShell 7.4 and gh CLI: