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-scanning3description: Search GitHub for issues, PRs, discussions, releases, and alerts. Includes query construction, date range handling, repo scoping, and cross-repo intelligence.4metadata:5 source: https://skillmd.com/skills/community-access/github-scanning6---78# GitHub Scanning910## Search Query Patterns by Intent1112### Issues1314| Intent | Query Pattern | Scope |15|--------|--------------|-------|16| Assigned to you | `is:open assignee:USERNAME` | All repos |17| You were @mentioned | `is:open mentions:USERNAME` | All repos |18| Authored by you | `is:open author:USERNAME` | All repos |19| Specific repo | `repo:owner/repo is:open` | Single repo |20| By keyword | `{keyword} is:open` | All repos |21| Org-wide | `org:ORGNAME is:open` | Org repos |22| Closed (for recap) | `is:closed author:USERNAME` | All repos |2324### Pull Requests2526| Intent | Query Pattern | Scope |27|--------|--------------|-------|28| Awaiting your review | `review-requested:USERNAME state:open` | All repos |29| Your open PRs | `author:USERNAME state:open` | All repos |30| Assigned to you | `assignee:USERNAME state:open` | All repos |31| You reviewed, check for updates | `reviewed-by:USERNAME state:open` | All repos |32| Specific PR | Fetch directly with owner, repo, number | Single repo |33| Org-wide | `org:ORGNAME state:open` | Org repos |3435### Discussions3637| Intent | Action |38|--------|--------|39| You're mentioned | Search with `mentions:USERNAME` |40| You're participating | Search discussions you've commented on |41| High activity | Filter for 10+ comments in last 24h |42| Linked to your issues | Scan description/comments for issue references |4344### Releases4546- Use `github_list_releases` per repo - check for recent, draft, and pre-releases.47- Cross-reference merged PRs against release notes to identify unreleased work.48- Compare issue milestones against release schedules to flag upcoming deadline items.4950### Security5152- Dependabot alerts: critical and high severity across monitored repos.53- Security advisories affecting dependencies.54- Pending dependency update PRs from `dependabot[bot]` or `renovate[bot]`.5556### CI/CD5758- Fetch recent workflow runs - identify failing workflows, long jobs, and flaky tests.59- For failing workflows: note repo, workflow name, branch, failure reason, and link to run.60- Cross-reference user's open PRs against CI results.6162---6364## Date Range Handling6566Convert natural language to GitHub query qualifiers:6768| User Says | GitHub Qualifier |69|-----------|-----------------|70| "last week" | `created:>YYYY-MM-DD` (7 days ago) |71| "this month" | `created:>YYYY-MM-01` |72| "today" | `closed:YYYY-MM-DD` |73| "this week" | `closed:>YYYY-MM-DD` (7 days ago) |74| "between X and Y" | `created:X..Y` |75| Not specified | Use `search.default_window` from preferences (default: `updated:>YYYY-MM-DD` 30 days) - mention this assumption |76| "for current month" (a11y tracker) | `milestone:"{Month} {Year}"` |7778---7980## Scope Narrowing8182Add qualifiers to narrow by scope when the user specifies one:8384| Scope | Qualifier |85|-------|-----------|86| Single repo | `repo:owner/name` |87| All org repos | `org:orgname` |88| All repos by user | `user:username` |89| Everything (default) | No qualifier - searches all accessible repos |9091---9293## Preferences File Integration9495Read `.github/agents/preferences.md` and apply these filters before and after searching:96971. **`repos.discovery`** - determines the default search scope (all / starred / owned / configured / workspace).982. **`repos.include`** - always include these repos even in restricted modes.993. **`repos.exclude`** - skip these repos in all searches.1004. **`repos.overrides`** - per-repo settings:101 - `track.issues: false` -> skip issue searches for this repo102 - `track.pull_requests: false` -> skip PR searches for this repo103 - `track.discussions: false` -> skip discussions for this repo104 - `track.releases: false` -> skip release checks for this repo105 - `track.security: false` -> skip security alerts for this repo106 - `track.ci: false` -> skip CI status for this repo107 - `labels.include` / `labels.exclude` -> filter results by label108 - `paths` -> only trigger for changes touching these file paths (for PRs/CI)109 - `assignees` -> filter to specific assignees (empty = all)1105. **`search.default_window`** - default time range if the user doesn't specify one.1116. **`briefing.sections`** - which sections to include in the daily briefing.1127. **`accessibility_tracking`** - config for the a11y tracker (repos, labels, channels).113114---115116## Cross-Repo Intelligence117118When results arrive from different repos, look for and surface these patterns:119120| Pattern | Action |121|---------|--------|122| Cross-repo references | When issue A contains `owner/repo#N`, fetch and surface item N |123| Shared label patterns | Group items in different repos tagged `P0` together in triage |124| Related PRs in different repos | Flag: _"This issue depends on PR #N in repo-B which is still open"_ |125| Merged PR not yet released | Note: _"Your PR #N is merged but not in any release yet"_ |126| Issue with merged fix PR | Flag: _"This may be resolved - PR #N that closes it was merged on {date}"_ |127| Branch naming patterns | Group PRs in different repos using the same branch naming convention |128129---130131## Parallel Stream Collection Model132133For agents that collect from multiple data streams, run independent streams simultaneously. Don't serialize operations with no dependencies.134135### Example: Daily Briefing - 3 Parallel Batches136137**Batch 1 - fully independent, run simultaneously:**138139- 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):**145146- GitHub Discussions147- CI/CD health (cross-references PR list)148- Security alerts149150**Batch 3 - can overlap with Batch 2:**151152- Project board status153- Recently closed/merged work154155### Example: Analytics - 2 Parallel Batches156157**Batch 1 - collection (all independent):**158159- Closed/merged PRs in period160- Opened issues in period161- CI workflow runs in period162- Security alerts in period163164**Batch 2 - analysis (depends on Batch 1 data):**165166- Health score computation167- Velocity metrics calculation168- Bottleneck detection169170### Announcement Template for Parallel Work171172```text173 Running {N} searches in parallel... ({scope})174 Batch 1 complete - {X} items found175176 Running {N} additional searches...177 Batch 2 complete - {Y} items found178179 Scoring and prioritizing...180 Done - {Z} items need action, {W} to monitor181```182183---184185## Auto-Recovery for Empty Results186187If a search returns 0 results:1881891. Automatically broaden: remove date filter, expand scope to `all`, or remove label filters.1902. Tell the user exactly what changed: _"No results in last 7 days - broadened to last 30 days and found 3 items."_1913. Never return 0 results without trying at least one broader query first.192193Recovery cascade:1941951. First try: Remove date qualifier1962. Second try: Expand scope (add org: or remove repo: qualifier)1973. Third try: Remove label filters1984. Report 0 results only if all three attempts return nothing199200---201202## Pagination203204- Paginate large result sets in batches of 10.205- Ask before loading more: _"Showing 10 of 47. Load more?"_206- Never silently truncate results - always disclose the total count.207208---209210## Result Deduplication211212When the same item appears in multiple searches (e.g., an issue you're both assigned to AND mentioned in):213214- Show it once, with all context combined.215- In the Signal column, combine signals: _"Assigned, @mentioned"_.216- In priority calculations, apply the highest-scoring signal, not additive.217218---219220## Rate Limiting221222- If rate-limited (403/429), tell the user the reset time in one sentence.223- Do not retry the same query - wait if reset is <60 seconds; otherwise report and move on.224- For multi-stream collection, skip rate-limited streams and complete them in a follow-up.