AgentSkillsCN

project-funding-profile

为单一开源项目生成详尽的资金画像。

SKILL.md
--- frontmatter
name: project-funding-profile
description: Generate a detailed funding profile for a single open source project
argument-hint: <owner/repo>

Project Funding Profile

Generate a detailed funding profile for a single open source project, including maintainer analysis, funding status, health indicators, and how to support.

Prerequisites

This skill requires the GitHub CLI (gh) to be installed and authenticated.

Check Prerequisites

Run this first to verify your setup:

bash
gh --version && gh auth status

If gh is not installed, you'll see "command not found". Install it from: https://cli.github.com

If gh is not authenticated, run:

bash
gh auth login

Without gh CLI

Without gh, this skill cannot function. All data gathering (repository info, contributor stats, sponsor counts) requires authenticated GitHub API access via gh api graphql.

Usage

code
/project-funding-profile <owner/repo>

Example:

code
/project-funding-profile spf13/cobra

Data Collection

1. Repository Overview (Single GraphQL Query)

bash
gh api graphql -f query='
query($owner: String!, $repo: String!) {
  repository(owner: $owner, name: $repo) {
    nameWithOwner
    description
    url
    stargazerCount
    forkCount
    isArchived
    createdAt
    pushedAt

    licenseInfo { spdxId name }

    issues(states: OPEN) { totalCount }
    pullRequests(states: OPEN) { totalCount }

    releases(first: 1, orderBy: {field: CREATED_AT, direction: DESC}) {
      nodes { tagName publishedAt }
    }

    fundingLinks { platform url }

    repositoryTopics(first: 10) {
      nodes { topic { name } }
    }

    defaultBranchRef {
      target {
        ... on Commit {
          history(first: 1) {
            nodes { committedDate }
          }
        }
      }
    }

    owner {
      ... on User {
        login
        name
        bio
        company
        hasSponsorsListing
        sponsors { totalCount }
      }
      ... on Organization {
        login
        name
        description
        hasSponsorsListing
        sponsors { totalCount }
      }
    }
  }
}
' -f owner=OWNER -f repo=REPO

2. Contributor Analysis (Bus Factor)

bash
gh api repos/{owner}/{repo}/stats/contributors --jq '
  sort_by(.total) | reverse |
  . as $all |
  ($all | map(.total) | add) as $total |
  $all[0:5] | map({
    author: .author.login,
    commits: .total,
    percentage: ((.total / $total) * 100 | floor)
  })
'

Note: This endpoint may return empty {} on first request while GitHub computes stats. Retry after a few seconds.

Bus Factor Assessment:

Top Contributor %Risk Level
>80%Critical - single point of failure
60-80%High - very concentrated
40-60%Moderate - small team
<40%Healthy - distributed

3. Recent Activity Analysis

bash
# Last 30 commits with authors
gh api graphql -f query='
query($owner: String!, $repo: String!) {
  repository(owner: $owner, name: $repo) {
    defaultBranchRef {
      target {
        ... on Commit {
          history(first: 30) {
            nodes {
              committedDate
              author { user { login } }
            }
          }
        }
      }
    }
  }
}
' -f owner=OWNER -f repo=REPO

4. Maintainer Funding Status

If owner is a user with sponsors listing:

bash
gh api graphql -f query='
query($login: String!) {
  user(login: $login) {
    login
    name
    bio
    hasSponsorsListing
    sponsors { totalCount }
    sponsorsListing {
      fullDescription
      activeGoal { title targetValue percentComplete }
    }
    sponsorshipsAsMaintainer(first: 0) { totalCount }
  }
}
' -f login=USERNAME

For organizations:

bash
gh api graphql -f query='
query($login: String!) {
  organization(login: $login) {
    login
    name
    hasSponsorsListing
    sponsors { totalCount }
    sponsorsListing {
      fullDescription
      activeGoal { title targetValue percentComplete }
    }
  }
}
' -f login=ORGNAME

5. Open Collective Data

If fundingLinks includes Open Collective:

Always verify via the webpage, not JSON API (decimal parsing issues):

code
https://opencollective.com/{slug}

Look for:

  • Total raised
  • Yearly budget
  • Current balance
  • Number of backers

Sanity check:

BackersPlausible Yearly Income
<10<$5,000
10-50$1,000-$25,000
50-200$10,000-$100,000

6. README Burnout Signals

Cross-platform (use raw URL + WebFetch):

code
https://raw.githubusercontent.com/{owner}/{repo}/main/README.md

Search for phrases indicating maintainer stress:

  • "looking for maintainers"
  • "help wanted"
  • "need help"
  • "seeking contributors"
  • "sponsor" / "donate" / "support"
  • "free time" / "nights and weekends"
  • "no longer maintained"
  • "limited time"

7. Dependent Projects (Impact Assessment)

Check how many projects depend on this one:

bash
# For npm packages
curl -s "https://api.npmjs.org/downloads/point/last-month/{package}" | jq '.downloads'

# For GitHub (dependents count shown on repo page)
# No direct API - check repo page or use deps.dev

Output Format

markdown
# Funding Profile: {owner/repo}

## Overview

| Metric | Value |
|--------|-------|
| Stars | X |
| Forks | X |
| Open Issues | X |
| Open PRs | X |
| License | MIT |
| Created | YYYY-MM-DD |
| Last Commit | YYYY-MM-DD |
| Last Release | vX.X.X (YYYY-MM-DD) |

## Maintainer Analysis

### Bus Factor

| Contributor | Commits | % of Total |
|-------------|---------|------------|
| @maintainer1 | 1,234 | 75% |
| @maintainer2 | 200 | 12% |
| @maintainer3 | 100 | 6% |

**Risk Level:** Critical - single maintainer has 75% of commits

### Key People

**Primary Maintainer:** @username
- Bio: "..."
- Company: None / Company Name
- Other notable projects: [list]

## Funding Status

### Current Funding Channels

| Platform | Status | Details |
|----------|--------|---------|
| GitHub Sponsors | Active | X sponsors |
| Open Collective | Active | $X/year, Y backers |
| Tidelift | Listed | Enterprise support |
| Patreon | None | - |
| Ko-fi | None | - |

### Funding Gap Assessment

| Metric | Value | Assessment |
|--------|-------|------------|
| Stars | 10,000 | High impact |
| Sponsors | 5 | Very low |
| Expected sponsors for stars | ~50-100 | |
| **Gap** | **Severe** | 10-20x underfunded |

### Open Collective Details (if applicable)

| Metric | Value |
|--------|-------|
| Total Raised | $X |
| Yearly Budget | $X |
| Current Balance | $X |
| Backers | X |

## Health Indicators

| Indicator | Status | Notes |
|-----------|--------|-------|
| Active Development | Yes/Warning/No | Last commit X days ago |
| Issue Response | Yes/Warning/No | X open issues |
| PR Review | Yes/Warning/No | X open PRs |
| Release Cadence | Yes/Warning/No | Last release X months ago |
| Documentation | Yes/Warning/No | Has wiki/docs site |

## Burnout Signals

| Signal | Found | Quote |
|--------|-------|-------|
| Looking for maintainers | Yes/No | "..." |
| Explicit funding request | Yes/No | "..." |
| Time constraints mentioned | Yes/No | "..." |
| Declining activity | Yes/No | Commits down X% YoY |

## Impact Assessment

- **Dependents:** X projects on GitHub
- **Downloads:** X/month (if applicable)
- **Used by:** [Notable projects]
- **Ecosystem:** Critical infrastructure / Widely used / Niche

## How to Support

### Financial Support

| Method | Link |
|--------|------|
| GitHub Sponsors | https://github.com/sponsors/{owner} |
| Open Collective | https://opencollective.com/{slug} |
| Other | [links] |

### Non-Financial Support

- Contribute code: [CONTRIBUTING.md link]
- Triage issues: X issues need triage
- Review PRs: X PRs awaiting review
- Documentation: [docs link]
- Spread the word: Star & share

## Recommendation

**Priority Level:** Critical / High / Medium / Low

**Summary:** [1-2 sentence summary of funding need and why]

**Suggested Action:** [Specific recommendation]

Quick Profile (Minimal)

For a quick assessment without all the details:

bash
gh api graphql -f query='
query($owner: String!, $repo: String!) {
  repository(owner: $owner, name: $repo) {
    nameWithOwner
    stargazerCount
    issues(states: OPEN) { totalCount }
    pullRequests(states: OPEN) { totalCount }
    pushedAt
    fundingLinks { platform url }
    owner {
      ... on User { hasSponsorsListing sponsors { totalCount } }
      ... on Organization { hasSponsorsListing sponsors { totalCount } }
    }
  }
}
' -f owner=OWNER -f repo=REPO

Platform Compatibility

Windows users: Use the GraphQL queries (work everywhere). For README analysis, use:

code
https://raw.githubusercontent.com/{owner}/{repo}/main/README.md

Then analyze with WebFetch instead of grep.

Notes

  • Contributor stats endpoint may need multiple requests (GitHub computes on-demand)
  • Open Collective figures MUST be verified via webpage, not JSON API
  • Some maintainers prefer Tidelift for enterprise funding over individual sponsors
  • Check if maintainer has a personal sponsor page separate from org