Skip to content
Back to skills

Code Examples

ASecurity

Find real-world code examples across millions of GitHub repositories. Use when the user wants to see how others implement something, find usage patterns, or discover code examples in the wild.

  • 666 stars
  • 0 votes
  • 0 copies
  • 109 views
  • Added February 8, 2026
developmenttypescriptpythongobashreactgitapidocumentation

Works with

  • api

Security analysis

A100/100

Scanned February 12, 2026

npx -y skills add majiayu000/claude-skill-registry --skill code-examples --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Code Examples?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Code Examples
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-code-examples/badge)](https://www.skillsdirectory.com/skills/majiayu000-code-examples)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: code-examples
description: Find real-world code examples across millions of GitHub repositories. Use when the user wants to see how others implement something, find usage patterns, or discover code examples in the wild.
---

# Code Examples

Find real-world code examples across millions of public GitHub repositories using grep.app.

**When to activate:**

- User wants to see real-world code examples
- User asks "how do others implement X?"
- User wants to find usage patterns for a library/API
- User needs production code examples (not docs)

**API endpoint:**

```bash
curl -s "https://grep.app/api/search?q={query}&page=1" | jq '.hits.hits[:5]'
```

**Parameters:**

| Parameter        | Description                                                           |
| ---------------- | --------------------------------------------------------------------- |
| `q`              | Search query (required)                                               |
| `page`           | Page number for pagination                                            |
| `regexp`         | `true` for regex search                                               |
| `case`           | `true` for case-sensitive                                             |
| `f.lang`         | Language filter (**capitalized**, e.g., `TypeScript`, `Go`, `Python`) |
| `f.repo.pattern` | Filter by repository pattern                                          |
| `f.path.pattern` | Filter by file path pattern                                           |

**Examples:**

Search for useEffect usage in TypeScript:

```bash
curl -s "https://grep.app/api/search?q=useEffect&f.lang=TypeScript&page=1" | jq '.hits.hits[:3]'
```

Search for Go error handling patterns:

```bash
curl -s "https://grep.app/api/search?q=if%20err%20!=%20nil&f.lang=Go&page=1" | jq '.hits.hits[:3]'
```

Search within a specific repo:

```bash
curl -s "https://grep.app/api/search?q=createContext&f.repo.pattern=facebook/react&page=1" | jq '.hits.hits[:3]'
```

**Response format:**

- `hits.hits[]` - Array of search results
- Each hit contains: `repo.raw` (repo name), `path.raw` (file path), `content.snippet` (code snippet)

**Note:** Returns max 1000 results. For documentation, use the documentation-lookup skill instead.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.