feat(skills): anti-fabrication gate + real DataForSEO intel for mkt-competitive-brief#103
Open
mt-alarcon wants to merge 1 commit into
Open
Conversation
…ompetitive-brief
Upgrades the existing `mkt-competitive-brief` skill (previously SKILL.md only)
with a verifiability-first workflow and a real data collector, plus the shared
DataForSEO client it depends on.
What changes:
- SKILL.md — adds a mandatory provenance gate: every competitor data point
requires source + URL + collection date, or it goes to a provenance table as
"unverified / research". Adds source-limit disclaimers up front:
* Meta Ad Library API is restricted to political/social-issue + EU-only in
2026 — commercial creatives are UI-only, no public commercial API.
* Google Ads Transparency Center has no public API (no spend / keyword-trigger
/ targeting). UI-only.
* Competitor spend and ad keyword-triggers are not observable in any public
source — any number is a third-party estimate (label the 15-30% error band).
This keeps the LLM from presenting model-memory as fact.
- scripts/competitor_intel.py — real competitive intel via DataForSEO:
1. SERP features + AI Overview presence + intent per keyword
2. Keyword gap (domain-vs-domain) via DataForSEO Labs domain_intersection
Every output carries source + url + collected_at. No credentials → status N/A
with instructions (never fabricates, never breaks the pipeline). Reuses the
mkt-seo-ops DataForSEO client via importlib instead of duplicating the HTTP
client / credentials.
- .claude/skills/mkt-seo-ops/dataforseo_client.py — the shared DataForSEO client
competitor_intel.py imports (HTTP Basic, env-based creds, graceful degradation).
Included so the new collector is functional out of the box.
- tests/ — 38 tests, all network blocked (autouse urllib guard), covering N/A
paths, provenance fields, location validation (no silent BR default), truncation,
and gap parsing.
Credentials are env-only (DATAFORSEO_LOGIN / DATAFORSEO_PASSWORD), both optional.
The skill works without them (provenance-gated manual research); the collector
just reports N/A.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Sorry @mt-alarcon, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Upgrades the existing
mkt-competitive-briefskill (previously SKILL.md only) with a verifiability-first workflow and a real data collector, plus the shared DataForSEO client it depends on.Why
Competitive analysis is one of the easiest places for an LLM to present its training-data memory as fact. This change makes the skill provenance-gated and gives it a path to real, sourced data instead of plausible-sounding guesses.
Changes
SKILL.md— adds a mandatory provenance gate: every competitor data point needs source + URL + collection date, or it lands in a provenance table asunverified / research. Adds source-limit disclaimers up front so the skill never overpromises:scripts/competitor_intel.py— real competitive intel via DataForSEO:domain_intersectionEvery output carries
source+url+collected_at. No credentials → statusN/Awith instructions (never fabricates, never breaks the pipeline). Reuses themkt-seo-opsDataForSEO client viaimportlibinstead of duplicating the HTTP client / credentials..claude/skills/mkt-seo-ops/dataforseo_client.py— the shared DataForSEO client thatcompetitor_intel.pyimports (HTTP Basic, env-based creds, graceful degradation). Included so the new collector is functional out of the box.tests/— 38 tests, all network blocked (autouseurllibguard), covering N/A paths, provenance fields, location validation (no silent BR default), truncation, and gap parsing.Config
Credentials are env-only and both optional:
DATAFORSEO_LOGIN/DATAFORSEO_PASSWORD. The skill works without them (provenance-gated manual research); the collector just reportsN/A.Test
🤖 Generated with Claude Code