name: direct description: > Yandex Direct (API v5) advertising audit, management, and optimization. Full account audits, campaign management, keyword operations, reporting, budget analysis, and optimization recommendations for Russian market PPC. Triggers on: "Яндекс Директ", "Yandex Direct", "директ", "РСЯ", "YAN", "direct audit", "direct campaigns", "direct report", "direct optimize". argument-hint: "audit | campaigns | create | keywords | report | optimize | budget | negative" allowed-tools:
- Read
- Grep
- Glob
- Bash
- WebFetch
Yandex Direct — PPC Audit & Management (API v5)
Authors: Nick Serebrov & Kobe 🐍
Full-cycle Yandex Direct management: account audits, campaign CRUD, keyword management, reporting, optimization, and budget analysis.
Quick Reference
| Command | What it does |
|---------|-------------|
| /direct audit | Full account audit (all campaigns), scoring 0-100 |
| /direct campaigns | List campaigns with statuses and key metrics |
| /direct create | Create campaign (Search/YAN) with ad groups, keywords, ads |
| /direct keywords | Keyword management (list, add, update bids, pause) |
| /direct report | Performance stats (CTR, CPC, conversions, spend) |
| /direct optimize | Optimization recommendations (pause losers, adjust bids) |
| /direct budget | Budget spend analysis and forecasting |
| /direct negative | Negative keyword management (campaign & shared sets) |
API Configuration
Credentials: ~/.secrets/yandex-direct.json
{ "client_id": "...", "client_secret": "...", "oauth_token": "..." }
Endpoint: https://api.direct.yandex.com/json/v5/
Auth: Authorization: Bearer {oauth_token}
API wrapper script: scripts/yd-api.sh
Orchestration Logic
/direct audit
- Load credentials from
~/.secrets/yandex-direct.json - Fetch all campaigns via API (
campaignsservice) - Fetch ad groups, keywords, ads, sitelinks for each campaign
- Run 50+ checks from
references/yandex-audit.md - Score using
references/scoring-system.md - Compare metrics against
references/benchmarks.md - Generate report with grade (A-F), findings, and prioritized action plan
/direct campaigns
- Call
campaigns.getwith fields: Id, Name, Status, State, Statistics, DailyBudget, Strategy - Format table with status indicators
- Show key metrics if available (impressions, clicks, spend)
/direct create
- Gather: campaign name, type (SEARCH/YAN), geo, budget, strategy
- Create campaign via
campaigns.add - Create ad groups via
adgroups.add - Add keywords via
keywords.add - Create ads via
ads.add(TextAd for search, TextImageAd for YAN) - Add sitelinks and callouts
/direct keywords
- Fetch keywords via
keywords.getwith campaign/adgroup filter - Operations: add, suspend, resume, update bids, delete
- Show quality metrics where available
/direct report
- Use Reports service (
/json/v5/reports) - Build TSV report request with selected fields
- Available presets: campaign, adgroup, keyword, search_query
- Date ranges: today, yesterday, last7, last30, custom
- Parse and format results
/direct optimize
- Run report for last 30 days
- Identify: zero-conversion keywords (spend > 2x avg CPA), low CTR ads, expensive placements
- Cross-reference with
references/benchmarks.md - Generate recommendations sorted by impact
- Apply 3x Kill Rule: flag anything with CPA > 3x target
/direct budget
- Fetch campaign budgets and daily spend
- Calculate run rate, projected monthly spend
- Flag underspending (< 70% of budget) and overspending campaigns
- Budget sufficiency check vs strategy requirements
/direct negative
- Fetch negative keywords at campaign and ad group level
- Fetch shared negative keyword sets (
negativekeywordsharedsets) - Analyze search query report for new negatives
- Add/remove negatives via API
Quality Gates
- Never recommend broad match keywords without auto-strategy (Yandex best practice)
- 3x Kill Rule: flag keywords/groups with CPA > 3x target for pause
- Budget sufficiency: daily budget should support ≥10 clicks at current CPC
- Moderation: always check ad moderation status before optimizing
- Learning phase: don't change strategy settings during first 7 days
- UTM: all ads must have UTM parameters for Metrika attribution
Reference Files
Load on-demand, NOT at startup:
references/yandex-audit.md— 50+ audit checks (YD01-YD55)references/scoring-system.md— Weighted scoring (0-100, grades A-F)references/benchmarks.md— Russian market benchmarks (CTR, CPC, CVR)references/bidding-strategies.md— Yandex Direct bidding strategy guidereferences/compliance.md— Yandex moderation rules & ad policiesreferences/image-specs.md— Image sizes and specs for YAN (RSY) ads
Scripts
scripts/yd-api.sh— Generic API v5 call wrapperscripts/yd-report.sh— Reports service wrapperscripts/yd-audit.sh— Automated audit data collection
Subagents
agents/audit-yandex.md— Audit subagent for parallel campaign analysis
Next.js App Router Expert
Development
A skill that turns Claude into a Next.js App Router expert.
README Generator
Development
Creates professional and comprehensive README.md files for your projects.
API Documentation Writer
Development
Generates comprehensive API documentation in OpenAPI/Swagger format.