agentleFS
AgentShekelAgentShekel/agentic-workflow/skills/yandex-search-guide/SKILL.md

yandex-search-guide

Skill4 starsChanged 29 days agoMITView on GitHub

[TOOL] Yandex Cloud Search API v2 client (position tracking, competitor analysis, SERP monitoring). Preloaded by marketing-seo-specialist agent.

  • Reads credentials

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 5 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Create service account in Yandex Cloud console

    line 20
  2. Distinctive:

    Create API key for the service account

    line 22
  3. Distinctive:

    Check API connection with a test query.

    line 34
  4. Distinctive:

    Search Yandex and show results.

    line 40
  5. Distinctive:

    Check position of a specific domain for search queries.

    line 61
  6. Very specific:

    Use common.sh functions directly:

    line 192
  7. Very specific:

    Run bash scripts/quota.sh to verify

    line 207

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

yandex-search

Informational skill — search positions and Yandex SERP analysis via Yandex Cloud Search API v2.

Config

Requires YANDEX_SEARCH_API_KEY and YANDEX_CLOUD_FOLDER_ID in config/.env. Synced from unified config via yandex-analytics/scripts/sync-config.sh.

Setup:

  1. Create service account in Yandex Cloud console
  2. Assign roles: search-api.executor, search-api.webSearch.user
  3. Create API key for the service account
  4. Get folder ID from Cloud console (top-left dropdown)

Workflow

  1. Check connection: bash scripts/quota.sh
  2. Run search/check using appropriate script
  3. Interpret results — async API returns XML; scripts parse and present key data

Scripts

quota.sh

Check API connection with a test query.

bash scripts/quota.sh

search.sh

Search Yandex and show results.

bash scripts/search.sh --query "купить дымоход" --region 213 --limit 10

# With time sorting
bash scripts/search.sh --query "купить дымоход" --region 213 --sort time

# Strict SafeSearch
bash scripts/search.sh --query "купить дымоход" --filter strict
ParamRequiredDefaultDescription
--queryyes-Search query
--regionno225 (Russia)Region ID
--limitno10Results per page (max 100)
--pageno0Page number (0-indexed)
--sortnorelevancyrelevancy or time
--filternomoderatenone, moderate, or strict

positions.sh

Check position of a specific domain for search queries. The most important script.

# Check single query
bash scripts/positions.sh --domain example.com --query "купить дымоход" --region 213

# Check multiple queries from file (one per line)
bash scripts/positions.sh --domain example.com --queries queries.txt --region 213 --csv results.csv

# Check up to N pages deep
bash scripts/positions.sh --domain example.com --query "купить дымоход" --region 213 --depth 10
ParamRequiredDefaultDescription
--domainyes-Domain to find (e.g., example.com)
--queryone of-Single search query
--queriesone of-File with queries (one per line)
--regionno225Region ID
--depthno5Pages to check (5 = top 50)
--csvno-Export results to CSV file

Logic: searches page 0, checks if domain appears in results. If not found, checks page 1, and so on up to --depth. Output: query, position (or "not found in top N"), URL that ranked.

competitors.sh

Find competitors for a query — who ranks in top 10.

bash scripts/competitors.sh --query "купить дымоход" --region 213
ParamRequiredDefaultDescription
--queryyes-Search query
--regionno225Region ID
--limitno10Number of results

Output: position, domain, URL, title for top results.

API Reference

Yandex Cloud Search API v2 (Async)

Step 1 — Submit search:

  • Endpoint: POST https://searchapi.api.cloud.yandex.net/v2/web/searchAsync
  • Auth: Authorization: Api-Key <API_KEY>
  • Body: JSON with query, folderId, region, sortSpec, groupSpec, responseFormat
  • Returns: operation ID

Step 2 — Poll for result:

  • Endpoint: GET https://operation.api.cloud.yandex.net/operations/{operationId}
  • Auth: same Api-Key header
  • Returns: done: true with rawData (base64-encoded XML) when ready

Request body structure

{
  "query": {
    "searchType": "SEARCH_TYPE_RU",
    "queryText": "search text",
    "familyMode": "FAMILY_MODE_MODERATE",
    "page": "0",
    "fixTypoMode": "FIX_TYPO_MODE_ON"
  },
  "sortSpec": {
    "sortMode": "SORT_MODE_BY_RELEVANCE",
    "sortOrder": "SORT_ORDER_DESC"
  },
  "groupSpec": {
    "groupMode": "GROUP_MODE_DEEP",
    "groupsOnPage": "10",
    "docsInGroup": "1"
  },
  "maxPassages": "2",
  "region": "225",
  "l10N": "LOCALIZATION_RU",
  "folderId": "<folder-id>",
  "responseFormat": "FORMAT_XML"
}

Response XML structure

response/found              — total results count
response/results/grouping/group — each result group
  group/doc/url             — page URL
  group/doc/title           — page title (may contain <hlword> tags)
  group/doc/headline        — snippet text
  group/doc/domain          — domain
  group/doc/passages/passage — text excerpts

Position calculation

Position = page * groups_per_page + position_in_page (1-indexed)

Common region IDs

IDRegion
225Russia
213Moscow
2Saint Petersburg
54Yekaterinburg
43Kazan
66Novosibirsk
56Nizhny Novgorod

Common use cases

"What position does our site have?"

bash scripts/positions.sh --domain mysite.ru --query "купить дымоход" --region 213

"Check positions for multiple queries"

# Create queries.txt with one query per line, then:
bash scripts/positions.sh --domain mysite.ru --queries queries.txt --region 213 --csv results.csv

"Who are our competitors in search?"

bash scripts/competitors.sh --query "купить дымоход" --region 213

"What shows up in search for this query?"

bash scripts/search.sh --query "купить дымоход" --region 213

Custom query (advanced)

Use common.sh functions directly:

source scripts/common.sh
load_config

# Async XML search
xml=$(cloud_search "купить дымоход" "213" "10" "0" "relevance" "moderate")
echo "$xml"

Sharing

To share this skill with colleagues:

  1. Copy the entire yandex-search/ folder to their ~/.claude/skills/
  2. They create their own config/.env with their API key and folder ID
  3. Run bash scripts/quota.sh to verify

Limits

  • Yandex Cloud Search API v2: pay-per-use (check pricing at cloud.yandex.ru)
  • Rate limit: 1 request/second recommended in batch mode
  • Each request is async: ~1-3 seconds for result
  • Max results per page: 100 (groupsOnPage)
  • Pages: 0-indexed

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.