gh-code-search

Search GitHub for code examples and generate Markdown reports with URLs.

4|Updated Oct 6, 2025
One-click install
npx skills add https://github.com/otrebu/agents --skill gh-code-search
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gh-code-search
Source: https://github.com/otrebu/agents/tree/main/plugins/knowledge-work/skills/gh-code-search
Command: npx skills add https://github.com/otrebu/agents --skill gh-code-search

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @octokit/rest, chalk, ora, and includes scripts (resource) components.

What problem does it solve?

Enables discovery of real-world code samples on GitHub, ranking results by quality, and delivering concise, analysis-ready markdown with sources.

Core Features & Use Cases

  • Intelligent Search Orchestration: Multi-query strategy to uncover diverse patterns.
  • Ranking & Filtering: Combines stars, recency, and code-path signals to surface high-quality code.
  • Output: Clean Markdown with links to GitHub files for easy review.

Quick Start

cd plugins/knowledge-work/skills/gh-code-search pnpm install pnpm search "Express error handling middleware"

Frequently Asked Questions about gh-code-search

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I search GitHub for code examples and implementation patterns?

GitHub code search with smart ranking lets you discover real-world code samples across TypeScript/JavaScript projects. The Skill authenticates with GitHub, runs multi-query searches, ranks results by stars and recency, and outputs clean Markdown reports with direct file links and metadata for analysis.

Can I use GitHub code search to find how others implement specific features?

Yes. Search for feature implementations like middleware, error handling, or library patterns. The Skill applies intelligent ranking by code quality signals—stars, recency, and file paths—to surface high-quality examples from production repositories.

What's the best way to research architectural approaches across open-source projects?

Multi-query search orchestration uncovers diverse architectural patterns. The Skill fetches top files with context, ranks them by quality metrics, and delivers markdown output with GitHub URLs so you can review patterns directly from source.

Do I need authentication to search for code on GitHub?

Yes. The Skill authenticates with GitHub using the Octokit REST client to enable authenticated searches, which provide higher rate limits and access to private repositories if credentials are configured.

What output formats does GitHub code search support?

Code search outputs clean, analysis-ready Markdown with GitHub file links, metadata, and source context. The format is designed for easy review and integration into documentation or research workflows.

Can I assess best practices by comparing implementations across multiple repositories?

Yes. The Skill's multi-query strategy and ranking by stars, recency, and code-path signals surface patterns from the highest-quality repositories, letting you benchmark approaches and identify industry best practices.