---
name: apple-dev-search
description: Use when you need community blog posts, tutorials, or write-ups about Swift, SwiftUI, Xcode, iOS, macOS, or other Apple-platform development topics and want to search Apple Dev Search instead of a general web search engine.
---

# Apple Dev Search

## Overview

Use Apple Dev Search for Apple-platform community content across independent blogs.
Prefer it when the user wants articles, blog posts, tutorials, or "good materials" rather than vendor docs or generic web results.

Do not hardcode the service size. If the current article or blog counts matter, query them live with `python3 scripts/appledevsearch.py --counts`.

## Workflow

1. Start with one focused query that mirrors the user's wording.
2. Hard cap: run at most 3 Apple Dev Search commands total for ordinary requests (1 initial query plus 2 focused retries). Stop once 3 useful candidates are found; do not keep refining just to improve ranking.
3. If the result set is broad or noisy, retry with `--title-only` and tighter terms.
4. If the topic has synonyms, use Apple Dev Search syntax: quotes for phrases, `|` for OR, `-` to exclude, `*` for prefixes, `~1` for fuzzy matching, parentheses for grouping.
5. For current trends or fresh reading lists, inspect `--recent` in addition to topical search.
6. Verify final URLs with Crawl4AI only when snippets are insufficient or when choosing between similar candidates; do not use generic web search, Tavily, or Firecrawl for this verification unless Crawl4AI fails.
7. Return 3-8 strong links with title, blog, date, URL, and one-line relevance notes.

## Commands

```bash
python3 scripts/appledevsearch.py --query 'build speed' --limit 5
python3 scripts/appledevsearch.py --query '"incremental builds" | "compile time"' --title-only --limit 5
python3 scripts/appledevsearch.py --query 'swift testing -uikit' --limit 5
python3 scripts/appledevsearch.py --recent --limit 8
python3 scripts/appledevsearch.py --counts
```

## Query Heuristics

- Use full-text search for error text, API names, framework names, or long phrases.
- Use `--title-only` for broad topics such as architecture, performance, onboarding, or "best articles about X".
- Prefer 1-3 short retries over one overloaded query.
- Treat 3 Apple Dev Search commands as a hard stop unless the user asked for exhaustive research, a current-trends sweep, or a broad reading list.
- Do not run broad generic web search, Tavily, or Firecrawl unless Apple Dev Search returns zero or weak results.
- For selected article URLs, verify with Crawl4AI (`crawl_markdown` or `crwl crawl <url> -o markdown`) rather than generic web search.
- Keep the user's terminology in at least one query before expanding with synonyms.
- If nothing useful appears, fall back to `$web-search` or official docs skills as appropriate.

## Search URL

When the user would benefit from a reusable search page, construct a direct search URL:

```text
https://appledevsearch.com/#q=<urlencoded query>&titleOnly=true|false
```

Example:

```text
https://appledevsearch.com/#q=build+speed&titleOnly=false
```

## Output Discipline

When answering the user:

- Mention the exact query or queries used.
- Separate title-only vs full-text results if both were used.
- Prefer direct article links over linking back to the search page.
- Say when zero or weak results were found instead of pretending the search was exhaustive.
