name: github-scanning
description: GitHub data collection patterns for workflow agents. Covers search query construction by intent, date range handling, repository scope narrowing, preferences.md integration, cross-repo intelligence, parallel stream collection model, and auto-recovery for empty results. Use when building agents that search GitHub for issues, PRs, discussions, releases, security alerts, or CI status.
GitHub Scanning
Search Query Patterns by Intent
Issues
| Intent |
Query Pattern |
Scope |
| Assigned to you |
is:open assignee:USERNAME |
All repos |
| You were @mentioned |
is:open mentions:USERNAME |
All repos |
| Authored by you |
is:open author:USERNAME |
All repos |
| Specific repo |
repo:owner/repo is:open |
Single repo |
| By keyword |
{keyword} is:open |
All repos |
| Org-wide |
org:ORGNAME is:open |
Org repos |
| Closed (for recap) |
is:closed author:USERNAME |
All repos |
Pull Requests
| Intent |
Query Pattern |
Scope |
| Awaiting your review |
review-requested:USERNAME state:open |
All repos |
| Your open PRs |
author:USERNAME state:open |
All repos |
| Assigned to you |
assignee:USERNAME state:open |
All repos |
| You reviewed, check for updates |
reviewed-by:USERNAME state:open |
All repos |
| Specific PR |
Fetch directly with owner, repo, number |
Single repo |
| Org-wide |
org:ORGNAME state:open |
Org repos |
Discussions
| Intent |
Action |
| You're mentioned |
Search with mentions:USERNAME |
| You're participating |
Search discussions you've commented on |
| High activity |
Filter for 10+ comments in last 24h |
| Linked to your issues |
Scan description/comments for issue references |
Releases
- Use
github_list_releases per repo - check for recent, draft, and pre-releases.
- Cross-reference merged PRs against release notes to identify unreleased work.
- Compare issue milestones against release schedules to flag upcoming deadline items.
Security
- Dependabot alerts: critical and high severity across monitored repos.
- Security advisories affecting dependencies.
- Pending dependency update PRs from
dependabot[bot] or renovate[bot].
CI/CD
- Fetch recent workflow runs - identify failing workflows, long jobs, and flaky tests.
- For failing workflows: note repo, workflow name, branch, failure reason, and link to run.
- Cross-reference user's open PRs against CI results.
Date Range Handling
Convert natural language to GitHub query qualifiers:
| User Says |
GitHub Qualifier |
| "last week" |
created:>YYYY-MM-DD (7 days ago) |
| "this month" |
created:>YYYY-MM-01 |
| "today" |
closed:YYYY-MM-DD |
| "this week" |
closed:>YYYY-MM-DD (7 days ago) |
| "between X and Y" |
created:X..Y |
| Not specified |
Use search.default_window from preferences (default: updated:>YYYY-MM-DD 30 days) - mention this assumption |
| "for current month" (a11y tracker) |
milestone:"{Month} {Year}" |
Scope Narrowing
Add qualifiers to narrow by scope when the user specifies one:
| Scope |
Qualifier |
| Single repo |
repo:owner/name |
| All org repos |
org:orgname |
| All repos by user |
user:username |
| Everything (default) |
No qualifier - searches all accessible repos |
Preferences File Integration
Read .github/agents/preferences.md and apply these filters before and after searching:
repos.discovery - determines the default search scope (all / starred / owned / configured / workspace).
repos.include - always include these repos even in restricted modes.
repos.exclude - skip these repos in all searches.
repos.overrides - per-repo settings:
track.issues: false -> skip issue searches for this repo
track.pull_requests: false -> skip PR searches for this repo
track.discussions: false -> skip discussions for this repo
track.releases: false -> skip release checks for this repo
track.security: false -> skip security alerts for this repo
track.ci: false -> skip CI status for this repo
labels.include / labels.exclude -> filter results by label
paths -> only trigger for changes touching these file paths (for PRs/CI)
assignees -> filter to specific assignees (empty = all)
search.default_window - default time range if the user doesn't specify one.
briefing.sections - which sections to include in the daily briefing.
accessibility_tracking - config for the a11y tracker (repos, labels, channels).
Cross-Repo Intelligence
When results arrive from different repos, look for and surface these patterns:
| Pattern |
Action |
| Cross-repo references |
When issue A contains owner/repo#N, fetch and surface item N |
| Shared label patterns |
Group items in different repos tagged P0 together in triage |
| Related PRs in different repos |
Flag: "This issue depends on PR #N in repo-B which is still open" |
| Merged PR not yet released |
Note: "Your PR #N is merged but not in any release yet" |
| Issue with merged fix PR |
Flag: "This may be resolved - PR #N that closes it was merged on {date}" |
| Branch naming patterns |
Group PRs in different repos using the same branch naming convention |
Parallel Stream Collection Model
For agents that collect from multiple data streams, run independent streams simultaneously. Don't serialize operations with no dependencies.
Example: Daily Briefing - 3 Parallel Batches
Batch 1 - fully independent, run simultaneously:
- Issues (assigned, mentioned, authored)
- Pull requests (review-requested, authored)
- Releases & deployments
- Accessibility updates
Batch 2 - run after Batch 1 (CI needs PR list from Batch 1):
- GitHub Discussions
- CI/CD health (cross-references PR list)
- Security alerts
Batch 3 - can overlap with Batch 2:
- Project board status
- Recently closed/merged work
Example: Analytics - 2 Parallel Batches
Batch 1 - collection (all independent):
- Closed/merged PRs in period
- Opened issues in period
- CI workflow runs in period
- Security alerts in period
Batch 2 - analysis (depends on Batch 1 data):
- Health score computation
- Velocity metrics calculation
- Bottleneck detection
Announcement Template for Parallel Work
Running {N} searches in parallel... ({scope})
Batch 1 complete - {X} items found
Running {N} additional searches...
Batch 2 complete - {Y} items found
Scoring and prioritizing...
Done - {Z} items need action, {W} to monitor
Auto-Recovery for Empty Results
If a search returns 0 results:
- Automatically broaden: remove date filter, expand scope to
all, or remove label filters.
- Tell the user exactly what changed: "No results in last 7 days - broadened to last 30 days and found 3 items."
- Never return 0 results without trying at least one broader query first.
Recovery cascade:
- First try: Remove date qualifier
- Second try: Expand scope (add org: or remove repo: qualifier)
- Third try: Remove label filters
- Report 0 results only if all three attempts return nothing
Pagination
- Paginate large result sets in batches of 10.
- Ask before loading more: "Showing 10 of 47. Load more?"
- Never silently truncate results - always disclose the total count.
Result Deduplication
When the same item appears in multiple searches (e.g., an issue you're both assigned to AND mentioned in):
- Show it once, with all context combined.
- In the Signal column, combine signals: "Assigned, @mentioned".
- In priority calculations, apply the highest-scoring signal, not additive.
Rate Limiting
- If rate-limited (403/429), tell the user the reset time in one sentence.
- Do not retry the same query - wait if reset is <60 seconds; otherwise report and move on.
- For multi-stream collection, skip rate-limited streams and complete them in a follow-up.
1---2name: github-scanning-23description: GitHub data collection patterns for workflow agents. Covers search query construction by intent, date range handling, repository scope narrowing, preferences.md integration, cross-repo intelligence, parallel stream collection model, and auto-recovery for empty results. Use when building agents that search GitHub for issues, PRs, discussions, releases, security alerts, or CI status.4metadata:5 source: https://skillmd.com/skills/community-access/github-scanning-26---7<!-- CANONICAL SOURCE: .github/skills/github-scanning/SKILL.md -- Edit the canonical source; sync to Gemini via scripts/check-gemini-sync.ps1 -->89# GitHub Scanning1011## Search Query Patterns by Intent1213### Issues1415| Intent | Query Pattern | Scope |16|--------|--------------|-------|17| Assigned to you | `is:open assignee:USERNAME` | All repos |18| You were @mentioned | `is:open mentions:USERNAME` | All repos |19| Authored by you | `is:open author:USERNAME` | All repos |20| Specific repo | `repo:owner/repo is:open` | Single repo |21| By keyword | `{keyword} is:open` | All repos |22| Org-wide | `org:ORGNAME is:open` | Org repos |23| Closed (for recap) | `is:closed author:USERNAME` | All repos |2425### Pull Requests2627| Intent | Query Pattern | Scope |28|--------|--------------|-------|29| Awaiting your review | `review-requested:USERNAME state:open` | All repos |30| Your open PRs | `author:USERNAME state:open` | All repos |31| Assigned to you | `assignee:USERNAME state:open` | All repos |32| You reviewed, check for updates | `reviewed-by:USERNAME state:open` | All repos |33| Specific PR | Fetch directly with owner, repo, number | Single repo |34| Org-wide | `org:ORGNAME state:open` | Org repos |3536### Discussions3738| Intent | Action |39|--------|--------|40| You're mentioned | Search with `mentions:USERNAME` |41| You're participating | Search discussions you've commented on |42| High activity | Filter for 10+ comments in last 24h |43| Linked to your issues | Scan description/comments for issue references |4445### Releases4647- Use `github_list_releases` per repo - check for recent, draft, and pre-releases.48- Cross-reference merged PRs against release notes to identify unreleased work.49- Compare issue milestones against release schedules to flag upcoming deadline items.5051### Security5253- Dependabot alerts: critical and high severity across monitored repos.54- Security advisories affecting dependencies.55- Pending dependency update PRs from `dependabot[bot]` or `renovate[bot]`.5657### CI/CD5859- Fetch recent workflow runs - identify failing workflows, long jobs, and flaky tests.60- For failing workflows: note repo, workflow name, branch, failure reason, and link to run.61- Cross-reference user's open PRs against CI results.6263---6465## Date Range Handling6667Convert natural language to GitHub query qualifiers:6869| User Says | GitHub Qualifier |70|-----------|-----------------|71| "last week" | `created:>YYYY-MM-DD` (7 days ago) |72| "this month" | `created:>YYYY-MM-01` |73| "today" | `closed:YYYY-MM-DD` |74| "this week" | `closed:>YYYY-MM-DD` (7 days ago) |75| "between X and Y" | `created:X..Y` |76| Not specified | Use `search.default_window` from preferences (default: `updated:>YYYY-MM-DD` 30 days) - mention this assumption |77| "for current month" (a11y tracker) | `milestone:"{Month} {Year}"` |7879---8081## Scope Narrowing8283Add qualifiers to narrow by scope when the user specifies one:8485| Scope | Qualifier |86|-------|-----------|87| Single repo | `repo:owner/name` |88| All org repos | `org:orgname` |89| All repos by user | `user:username` |90| Everything (default) | No qualifier - searches all accessible repos |9192---9394## Preferences File Integration9596Read `.github/agents/preferences.md` and apply these filters before and after searching:97981. **`repos.discovery`** - determines the default search scope (all / starred / owned / configured / workspace).992. **`repos.include`** - always include these repos even in restricted modes.1003. **`repos.exclude`** - skip these repos in all searches.1014. **`repos.overrides`** - per-repo settings:102 - `track.issues: false` -> skip issue searches for this repo103 - `track.pull_requests: false` -> skip PR searches for this repo104 - `track.discussions: false` -> skip discussions for this repo105 - `track.releases: false` -> skip release checks for this repo106 - `track.security: false` -> skip security alerts for this repo107 - `track.ci: false` -> skip CI status for this repo108 - `labels.include` / `labels.exclude` -> filter results by label109 - `paths` -> only trigger for changes touching these file paths (for PRs/CI)110 - `assignees` -> filter to specific assignees (empty = all)1115. **`search.default_window`** - default time range if the user doesn't specify one.1126. **`briefing.sections`** - which sections to include in the daily briefing.1137. **`accessibility_tracking`** - config for the a11y tracker (repos, labels, channels).114115---116117## Cross-Repo Intelligence118119When results arrive from different repos, look for and surface these patterns:120121| Pattern | Action |122|---------|--------|123| Cross-repo references | When issue A contains `owner/repo#N`, fetch and surface item N |124| Shared label patterns | Group items in different repos tagged `P0` together in triage |125| Related PRs in different repos | Flag: _"This issue depends on PR #N in repo-B which is still open"_ |126| Merged PR not yet released | Note: _"Your PR #N is merged but not in any release yet"_ |127| Issue with merged fix PR | Flag: _"This may be resolved - PR #N that closes it was merged on {date}"_ |128| Branch naming patterns | Group PRs in different repos using the same branch naming convention |129130---131132## Parallel Stream Collection Model133134For agents that collect from multiple data streams, run independent streams simultaneously. Don't serialize operations with no dependencies.135136### Example: Daily Briefing - 3 Parallel Batches137138**Batch 1 - fully independent, run simultaneously:**139- Issues (assigned, mentioned, authored)140- Pull requests (review-requested, authored)141- Releases & deployments142- Accessibility updates143144**Batch 2 - run after Batch 1 (CI needs PR list from Batch 1):**145- GitHub Discussions146- CI/CD health (cross-references PR list)147- Security alerts148149**Batch 3 - can overlap with Batch 2:**150- Project board status151- Recently closed/merged work152153### Example: Analytics - 2 Parallel Batches154155**Batch 1 - collection (all independent):**156- Closed/merged PRs in period157- Opened issues in period158- CI workflow runs in period159- Security alerts in period160161**Batch 2 - analysis (depends on Batch 1 data):**162- Health score computation163- Velocity metrics calculation164- Bottleneck detection165166### Announcement Template for Parallel Work167168```text169 Running {N} searches in parallel... ({scope})170 Batch 1 complete - {X} items found171172 Running {N} additional searches...173 Batch 2 complete - {Y} items found174175 Scoring and prioritizing...176 Done - {Z} items need action, {W} to monitor177```178179---180181## Auto-Recovery for Empty Results182183If a search returns 0 results:1841851. Automatically broaden: remove date filter, expand scope to `all`, or remove label filters.1862. Tell the user exactly what changed: _"No results in last 7 days - broadened to last 30 days and found 3 items."_1873. Never return 0 results without trying at least one broader query first.188189Recovery cascade:1901. First try: Remove date qualifier1912. Second try: Expand scope (add org: or remove repo: qualifier)1923. Third try: Remove label filters1934. Report 0 results only if all three attempts return nothing194195---196197## Pagination198199- Paginate large result sets in batches of 10.200- Ask before loading more: _"Showing 10 of 47. Load more?"_201- Never silently truncate results - always disclose the total count.202203---204205## Result Deduplication206207When the same item appears in multiple searches (e.g., an issue you're both assigned to AND mentioned in):208- Show it once, with all context combined.209- In the Signal column, combine signals: _"Assigned, @mentioned"_.210- In priority calculations, apply the highest-scoring signal, not additive.211212---213214## Rate Limiting215216- If rate-limited (403/429), tell the user the reset time in one sentence.217- Do not retry the same query - wait if reset is <60 seconds; otherwise report and move on.218- For multi-stream collection, skip rate-limited streams and complete them in a follow-up.