Skip to main content
skill CX Codex

ctf-similar-search — Claude Code skill for finding CTF writeups

ctf-similar-search searches for writeups of similar CTF challenges via Tavily API. Handy when a challenge resists solving and you need a reference.

MIT 1,000 installs ★ 3,761 updated 2026-10-23

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add ljagiello/ctf-skills --skill ctf-similar-search -a claude-code
Open on GitHub

What ctf-similar-search does

The skill runs a search.sh script with two commands: search finds writeups by keywords, extract pulls full text from URLs. A Python setup with requests and tavily is required, plus a Tavily key exported as TAVILY_API_KEY. Without the key the script will not run.

Non-code queries carry a three-word cap. You search “DASCTF URL Storage” or “HGAME baby web”, not “PlaidCTF 2025 zero day exploit solution”. Code snippets and unique strings skip the limit. A lone word like SSRF brings generic articles instead of writeups.

After search you can extract promising URLs and read how others solved a similar task, then decide whether that approach fits.

What it helps with

  • Locate a writeup for a similar challenge when stuck
  • Pull full text from search result URLs
  • Build keyword queries that hit writeups rather than generic articles
  • Identify a challenge type from existing solutions

Example prompts for the agent

  • Find similar writeups for the DASCTF URL Storage challenge
  • Search for the error string ERROR: invalid padding in AES block
  • Extract text from this URL and explain how the author solved it

How to install ctf-similar-search

1Skills CLI (Vercel)

npx skills add ljagiello/ctf-skills --skill ctf-similar-search -a claude-code

2Manually: put the files in place

~/.claude/skills/ctf-similar-search/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/ctf-similar-search/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about ctf-similar-search

How do I install ctf-similar-search in Claude Code?

Run npx skills add ljagiello/ctf-skills --skill ctf-similar-search -a claude-code. The skill lands in ~/.claude/skills/ctf-similar-search/SKILL.md.

What does ctf-similar-search do?

It searches Tavily for writeups of similar CTF challenges and extracts content from the URLs it finds. The point is to get a reference solution when your own attempts stall.

What does the skill need to run?

Python 3 with requests and tavily, and a Tavily API key exported as TAVILY_API_KEY. The search will not start without the key.

Source text

SKILL.md · MIT
---
name: ctf-similar-search
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.
license: MIT
compatibility: Requires filesystem-based agent (Claude Code or similar) with bash and Python 3 with requests and tavily packages.
allowed-tools: Bash Read Write Glob Grep Skill
metadata:
  user-invocable: "true"
  argument-hint: "<challenge-name-or-clues>"
  author: Lukasz Jagiello
---

# 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.

| Search Type | Word Limit | Examples |
|-------------|-----------|----------|
| Competition + Challenge name | ≤ 3 words | `"DASCTF URL Storage"`, `"HGAME baby web"` |
| Challenge name only | ≤ 3 words | `"URL Storage"`, `"baby overflow"` |
| Code snippets / strings | **No limit** | `"def encrypt_flag(key): return base64"` |
| Error messages / identifiers | **No limit** | `"CUSTOM_MAGIC_BYTES"`, `"ERROR: invalid padding in AES block"` |

**For competition + challenge name searches**, drop filler words (year numbers, "CTF", "competition", "writeup", "solution") and keep only the 3 most distinctive words:

- ❌ `"HGAME 2024 baby web challenge"` (5 words)
- ✅ `"HGAME baby web"` (3 words)
- ❌ `"DASCTF 2023 URL Storage writeup"` (5 words)
- ✅ `"DASCTF URL Storage"` (3 words)
- ❌ `"PlaidCTF 2025 zero day exploit solution"` (6 words)
- ✅ `"PlaidCTF zero day"` (3 words)

**For code/string searches**, use the entire unique snippet — these are exempt from the word limit:

- ✅ `"def xor_encrypt(data, key):"` (code — exempt)
- ✅ `"ERROR: invalid padding in AES block"` (error string — exempt)
- ✅ `"CUSTOM_MAGIC_BYTES"` (identifier — exempt)

### Keyword Rules

| ✅ Good Keywords | ❌ Bad Keywords |
|------------------|-----------------|
| Competition + Challenge name (≤3 words) | Single vulnerability type (SSRF, XSS) |
| Challenge name (≤3 words) | Generic terms (web, pwn, crypto) |
| Unique code snippets (no word limit) | Full sentences |
| Specific error messages (no word limit) | Articles (a, the, in) |
| Library/framework names | Generic strings (flag{}, etc.) |
| Custom function names | Tool names alone |

**Why avoid these?**
- "SSRF" → returns generic vulnerability explanations, not CTF writeups
- "flag{" → returns millions of unrelated results
- "URL Storage DASCTF" → returns specific CTF challenges

**Why the 3-word limit?**
- Forces precision: only the most distinctive keywords survive
- Filters noise: filler words like "challenge", "writeup", "solution" dilute results
- Improves API efficiency: shorter, focused queries consume fewer credits

**Key principle:** Use keywords that uniquely identify THIS challenge, not the general technique or common patterns. Keep non-code queries to 3 words or fewer.

### Step 2: Review Search Results

The search returns:
- **Answer**: AI-generated summary if available
- **Results**: List of URLs with titles and content previews
- **Credits**: API usage information

### Step 3: Extract Content (Optional)

If a search result looks promising, extract its full content:

```bash
# Single URL
./search.sh extract "https://example.com/writeup"

# Multiple URLs
./search.sh extract "https://url1.com" "https://url2.com"
```

### Step 4: Analyze and Pivot

Based on extracted content:
- Identify common techniques used in similar challenges
- Determine if the approach is applicable
- Pivot to category-specific skill if needed

## When to Pivot

- If the challenge is already well-categorized, use the specific `ctf-*` skill
- If you need OSINT techniques, use `ctf-osint`
- If you need to generate a writeup after solving, use `ctf-writeup`

## Quick Start

```bash
# Scenario 1: Competition + Challenge name (≤3 words)
./search.sh search "DASCTF URL Storage"

# Scenario 2: Challenge name only (≤3 words)
./search.sh search "URL Storage"

# Scenario 3: Unique identifier from challenge (no word limit)
./search.sh search "def xor_encrypt(data, key):"
./search.sh search "ERROR: invalid padding"

# Extract content from promising results
./search.sh extract "https://ctftime.org/writeup/12345"
```

## Tips

1. **Be specific**: Use competition name + challenge name when available
2. **Use unique strings**: Code snippets, error messages, unique identifiers
3. **Avoid generic terms**: Don't search "SSRF CTF writeup" - too broad
4. **Review first**: Check search results before extracting
5. **Extract selectively**: Only extract URLs that look relevant
6. **Respect the 3-word limit**: For non-code queries, strip filler words and keep only the 3 most distinctive keywords

$ARGUMENTS

© Lukasz Jagiello · MIT · ljagiello/ctf-skills

Similar skills

All skills for Security →

From the same set12

The whole set →
ctf-osint ctf-osint — a skill for Claude Code, Codex, Cursor, Copilot and Gemini CLI that equips the agent with OSINT methods for CTF competitions. CX Codex +1 10,000installs ctf-crypto ctf-crypto — a skill for solving crypto CTF challenges, covering RSA, AES, hashes, signatures, PRNG, ZKP, and mathematical attacks. CX Codex +1 10,000installs ctf-forensics ctf-forensics is a Claude Code skill with digital forensics and signal analysis techniques for CTF challenges, from disk images and memory dumps to steganography. CX Codex +1 9,900installs ctf-misc ctf-misc provides reference techniques and payloads for miscellaneous CTF challenges like sandbox escapes, exotic encodings, and signal analysis. CX Codex +1 9,700installs solve-challenge solve-challenge — a skill for Claude Code and five other agent platforms that takes a CTF challenge with an unknown category, runs first-pass triage, and hands off to the right ctf-* skill. CX Codex +1 9,700installs ctf-malware ctf-malware — a skill for analysing malware samples and network traffic in CTF challenges. It covers obfuscated scripts, PE and .NET files, PCAP captures, and C2 protocols. CX Codex +1 9,500installs ctf-writeup ctf-writeup generates a standardized markdown report for a solved CTF challenge, ready for organizer review and team handoff. Structures solution steps, tools, and the exploit code into a single submission-ready file. CX Codex +1 8,700installs ctf-ai-ml ctf-ai-ml provides AI and machine learning attack techniques for CTF competitions, from adversarial examples to LoRA weight inspection and prompt injection. CX Codex +1 8,500installs

Project sponsors

Companies that keep this analytics open