github-search-before-code

Proactively search GitHub for reference implementations before writing new code. Use this skill when: (1) User requests implementing completely new functionality, algorithms, or modules that don't exist in the current codebase, (2) User mentions repeated failures with phrases like 'still not working', 'tried many times', 'still has problems', or (3) AI recognizes the need to implement unfamiliar or complex features. The skill helps avoid reinventing the wheel by finding and analyzing existing high-quality implementations, then adapting them to user needs.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "github-search-before-code" with this command: npx skills add ruiwarn/skills/ruiwarn-skills-github-search-before-code

GitHub Search Before Code

Trigger Conditions

Scenario 1 - New functionality: New algorithms, protocols, drivers, or complex features not in codebase Scenario 2 - Repeated failures: User says "still not working", "tried many times", "改了很多次了", "还是有问题"

Workflow

1. Infer Domain

Analyze conversation context to extract 1-2 domain keywords:

  • Without first identifying the industry background, keyword extraction may lead to results that are completely off-topic.
  • Current discussion topic
  • Recent code files/functions
  • User's project description

If unclear, see industry-background.md for domain keyword reference.

2. Construct Keywords

Pattern: "<function> <domain> <tech>"

Examples:

  • C: "harmonic analysis" + "power" → "harmonic analysis power metering" C
  • Python: "web scraping" → "web scraping beautifulsoup" Python
  • Shell: "backup automation" → "incremental backup script" Shell

Domain matters: "Goertzel" → audio ❌, "Goertzel power" → power analysis ✅

3. Search GitHub

python3 scripts/github_search.py repo "<keywords>" [language]

Features:

  • see search-strategies.md for search flow reference.
  • Auto-fallback: tries 4 strategies if no results (language → no-lang → simplified → core-word)
  • Token support: set GITHUB_TOKEN env var for 5000/h quota (vs 60/h)
  • Desc truncated to 200 chars to save tokens

4. Analyze & Use

Screen: Stars > 20, language matches project, updated < 2yr Read: WebFetch README for key info Use: Extract logic, adapt style, add // Reference: [URL] (or # Reference: for Python/Shell)

No results: Try broader keywords or WebSearch

Commands

Output: ⭐stars | lang | year | desc (sorted by stars)

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

embedded-cross-review

No summary provided by upstream source.

Repository SourceNeeds Review
General

c-verify-skill

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

Self Updater

⭐ OPEN SOURCE! GitHub: github.com/GhostDragon124/openclaw-self-updater ⭐ ONLY skill with Cron-aware + Idle detection! Auto-updates OpenClaw core & skills, an...

Registry SourceRecently Updated
1171Profile unavailable
Coding

ClawHub CLI Assistant

Use the ClawHub CLI to publish, inspect, version, update, sync, and troubleshoot OpenClaw skills from the terminal.

Registry SourceRecently Updated
1.9K2Profile unavailable