# Ctf Similar Search

Searches for similar CTF challenge writeups using Tavily API for search and content...

- Repository: https://github.com/ljagiello/ctf-skills (3598 stars)
- Category: Engineering
- License: MIT
- Last updated: 2026-10-30
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add ljagiello/ctf-skills --skill ctf-similar-search -g -a claude-code -y`
Codex: `npx skills add ljagiello/ctf-skills --skill ctf-similar-search -g -a codex -y`
Cursor: `npx skills add ljagiello/ctf-skills --skill ctf-similar-search -g -a cursor -y`
Gemini CLI: `npx skills add ljagiello/ctf-skills --skill ctf-similar-search -g -a gemini-cli -y`

## Description

Searches for similar CTF challenge writeups using Tavily API for search and content extraction. Use when the user requests finding related challenges, when solve-challenge has failed multiple times and needs reference solutions, or when first identifying a challenge type and seeking examples.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# CTF Similar Challenge Search

Search for similar CTF challenge writeups using Tavily API.

## Prerequisites

```bash
pip install requests tavily
```

Set your Tavily API key (from https://tavily.com) before running:

```bash
export TAVILY_API_KEY='tvly-...'
```

## API Overview

This skill provides two interfaces:

| Interface | Purpose | Command |
|-----------|---------|---------|
| **Tavily Search** | Search for writeups and articles | `./search.sh search <keyword>` |
| **Tavily Extract** | Extract content from URLs | `./search.sh extract <url1> [url2] ...` |

## Search Workflow

### Step 1: Search with Keywords

Choose keywords based on available information:

#### Scenario 1: Known Competition + Challenge Name
```bash
# Format: [Competition Name] [Challenge Name], max 3 words
./search.sh search "DASCTF URL Storage"
./search.sh search "HGAME baby web"
./search.sh search "BUUCTF pwn1"
```

#### Scenario 2: Challenge Name Only (no competition info)
```bash
# Use challenge name directly, max 3 words
./search.sh search "URL Storage"
./search.sh search "baby overflow"
./search.sh search "crypto-rsa"
```

#### Scenario 3: Unique Identifiers (code snippets, strings)
```bash
# Use unique, non-trivial strings from the challenge, NO word limit
./search.sh search "def encrypt_flag(key): return base64"
./search.sh search "CUSTOM_MAGIC_BYTES"
./search.sh search "ERROR: invalid padding in AES block"
```

### ⚠️ Critical: 3-Word Limit for Non-Code Queries

**All keyword searches that are NOT code snippets or unique identifier strings MUST NOT exceed 3 words.** This constraint ensures precise, focused queries that return relevant CTF writeup results instead of broad, diluted searches.

The rest: https://github.com/ljagiello/ctf-skills/blob/HEAD/ctf-similar-search/SKILL.md
