Add /sponsor slash command (prompt)

Creates sponsor.prompt.md so users can type /sponsor in VS Code
Copilot Chat to scan their project's dependencies for funding.
Also works with /sponsor owner/repo for any remote repo.
References the sponsor-finder skill for the full workflow.
This commit is contained in:
Ashley Wolf
2026-02-12 16:29:04 -08:00
parent 03e1b3a178
commit 55284428e4
2 changed files with 47 additions and 0 deletions

View File

@@ -134,6 +134,7 @@ Ready-to-use prompt templates for specific development scenarios and tasks, defi
| [Shuffle JSON Data](../prompts/shuffle-json-data.prompt.md)<br />[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/prompt?url=vscode%3Achat-prompt%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fprompts%2Fshuffle-json-data.prompt.md)<br />[![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/prompt?url=vscode-insiders%3Achat-prompt%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fprompts%2Fshuffle-json-data.prompt.md) | Shuffle repetitive JSON objects safely by validating schema consistency before randomising entries. |
| [Spring Boot Best Practices](../prompts/java-springboot.prompt.md)<br />[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/prompt?url=vscode%3Achat-prompt%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fprompts%2Fjava-springboot.prompt.md)<br />[![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/prompt?url=vscode-insiders%3Achat-prompt%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fprompts%2Fjava-springboot.prompt.md) | Get best practices for developing applications with Spring Boot. |
| [Spring Boot with Kotlin Best Practices](../prompts/kotlin-springboot.prompt.md)<br />[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/prompt?url=vscode%3Achat-prompt%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fprompts%2Fkotlin-springboot.prompt.md)<br />[![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/prompt?url=vscode-insiders%3Achat-prompt%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fprompts%2Fkotlin-springboot.prompt.md) | Get best practices for developing applications with Spring Boot and Kotlin. |
| [Sponsor Finder](../prompts/sponsor.prompt.md)<br />[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/prompt?url=vscode%3Achat-prompt%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fprompts%2Fsponsor.prompt.md)<br />[![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/prompt?url=vscode-insiders%3Achat-prompt%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fprompts%2Fsponsor.prompt.md) | Find which of your dependencies accept GitHub Sponsors. Scans direct and transitive dependencies using deps.dev, resolves source repos, checks funding metadata, and verifies every link. Usage: /sponsor owner/repo |
| [SQL Code Review](../prompts/sql-code-review.prompt.md)<br />[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/prompt?url=vscode%3Achat-prompt%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fprompts%2Fsql-code-review.prompt.md)<br />[![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/prompt?url=vscode-insiders%3Achat-prompt%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fprompts%2Fsql-code-review.prompt.md) | Universal SQL code review assistant that performs comprehensive security, maintainability, and code quality analysis across all SQL databases (MySQL, PostgreSQL, SQL Server, Oracle). Focuses on SQL injection prevention, access control, code standards, and anti-pattern detection. Complements SQL optimization prompt for complete development coverage. |
| [SQL Performance Optimization Assistant](../prompts/sql-optimization.prompt.md)<br />[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/prompt?url=vscode%3Achat-prompt%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fprompts%2Fsql-optimization.prompt.md)<br />[![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/prompt?url=vscode-insiders%3Achat-prompt%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fprompts%2Fsql-optimization.prompt.md) | Universal SQL performance optimization assistant for comprehensive query tuning, indexing strategies, and database performance analysis across all SQL databases (MySQL, PostgreSQL, SQL Server, Oracle). Provides execution plan analysis, pagination optimization, batch operations, and performance monitoring guidance. |
| [Suggest Awesome GitHub Copilot Collections](../prompts/suggest-awesome-github-copilot-collections.prompt.md)<br />[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/prompt?url=vscode%3Achat-prompt%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fprompts%2Fsuggest-awesome-github-copilot-collections.prompt.md)<br />[![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/prompt?url=vscode-insiders%3Achat-prompt%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fprompts%2Fsuggest-awesome-github-copilot-collections.prompt.md) | Suggest relevant GitHub Copilot collections from the awesome-copilot repository based on current repository context and chat history, providing automatic download and installation of collection assets, and identifying outdated collection assets that need updates. |

46
prompts/sponsor.prompt.md Normal file
View File

@@ -0,0 +1,46 @@
---
name: 'Sponsor Finder'
description: 'Find which of your dependencies accept GitHub Sponsors. Scans direct and transitive dependencies, resolves source repos, checks funding metadata, and verifies every link. Usage: /sponsor owner/repo'
---
## 💜 Sponsor Finder
Scan a GitHub repository's dependencies and find which ones accept sponsorship via GitHub Sponsors, Open Collective, or other platforms.
### What to do
The user will provide a repository in `owner/repo` format (or you can detect it from the current workspace).
Follow the **sponsor-finder** skill instructions to:
1. **Detect the ecosystem** — fetch `package.json`, `requirements.txt`, `Cargo.toml`, `go.mod`, `Gemfile`, or `pom.xml` from the repo.
2. **Get the full dependency tree** — call `https://api.deps.dev/v3/systems/{ECOSYSTEM}/packages/{PACKAGE}/versions/{VERSION}:dependencies` to get all direct + transitive deps in one call.
3. **Resolve each dep to a GitHub repo** — call deps.dev `GetVersion` for each dep, extract `relatedProjects` with `relationType: "SOURCE_REPO"`.
4. **Get project health** — call deps.dev `GetProject` for unique repos to get OSSF Scorecard data.
5. **Find funding links** — check npm `funding` field, `.github/FUNDING.yml`, and web search fallback.
6. **Verify every link** — fetch each funding URL to confirm it's live. Never show unverified links.
7. **Group by funding destination** — show maintainers sorted by how many deps they cover.
### Output format
Produce a report with:
- **Summary** — total deps, resolved count, sponsorable count, % coverage
- **Verified Funding Links table** — dependency, repo, funding platform, direct vs transitive (✅/⛓️), how verified
- **Funding Destinations table** — grouped by maintainer/org, dep count, health score, sponsor link
- **No Verified Funding Found** — top unfunded direct deps with reasons
- **Actionable summary** — "Sponsoring just N people/orgs covers all M funded deps"
### Key rules
- **Never present unverified links.** Fetch every URL before showing it.
- **Never guess from training data.** Always check live — funding pages change.
- Use 💜 GitHub Sponsors, 🟠 Open Collective, ☕ Ko-fi, 🔗 Other.
- Use ✅ for direct deps, ⛓️ for transitive.
- Use ⭐ Maintained (7+), ⚠️ Partial (4-6), 💤 Low (0-3) for health scores.
### If no repo is provided
If the user just types `/sponsor` without specifying a repo:
1. Check if there's a `package.json`, `Cargo.toml`, `go.mod`, etc. in the current workspace.
2. If found, extract the package name and run the scan on it.
3. If not found, ask the user: "Which repository would you like to scan? Provide an `owner/repo` (e.g., `expressjs/express`)."