.claude/skills/uplift/SKILL.md
Compare Personalized vs Static treatment performance with unbiased methodology. Use for A/B analysis and treatment comparison.
npx skillsauth add praveenmaiya/holley-rec upliftInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Compares treatment performance using unbiased methodology (MECE framework).
# Personalized treatments
cat configs/personalized_treatments.csv
# Static treatments
cat configs/static_treatments.csv
Key principle: Only compare users eligible for BOTH treatment types (users with vehicle data).
-- Eligible users: those with vehicle data
WITH eligible_users AS (
SELECT DISTINCT user_id
FROM `auxia-gcp.company_1950.ingestion_unified_attributes_schema_incremental`
WHERE DATE(event_timestamp) >= DATE_SUB(CURRENT_DATE(), INTERVAL 90 DAY)
AND property_key IN ('v1_year', 'v1_make', 'v1_model')
AND COALESCE(string_value, CAST(long_value AS STRING)) IS NOT NULL
),
-- Treatments sent to eligible users
sent AS (
SELECT
s.user_id,
s.treatment_id,
CASE
WHEN s.treatment_id IN (16150700, 20142778, 20143044, 20143063, 20143082,
20143121, 20143140, 20143159, 20143178, 20143197)
THEN 'Personalized'
ELSE 'Static'
END as treatment_type
FROM `auxia-gcp.company_1950.treatment_history_sent` s
JOIN eligible_users e ON s.user_id = e.user_id
WHERE DATE(treatment_sent_timestamp) >= DATE_SUB(CURRENT_DATE(), INTERVAL 60 DAY)
AND surface_id = 929
AND request_source = 'LIVE'
),
-- Interactions
interactions AS (
SELECT
user_id,
treatment_id,
interaction_type
FROM `auxia-gcp.company_1950.treatment_interaction`
WHERE DATE(TIMESTAMP_MICROS(interaction_timestamp_micros)) >= DATE_SUB(CURRENT_DATE(), INTERVAL 60 DAY)
)
SELECT
s.treatment_type,
COUNT(DISTINCT s.user_id) as users_sent,
COUNT(DISTINCT CASE WHEN i.interaction_type = 'VIEWED' THEN s.user_id END) as viewers,
COUNT(DISTINCT CASE WHEN i.interaction_type = 'CLICKED' THEN s.user_id END) as clickers,
SAFE_DIVIDE(
COUNT(DISTINCT CASE WHEN i.interaction_type = 'CLICKED' THEN s.user_id END),
COUNT(DISTINCT CASE WHEN i.interaction_type = 'VIEWED' THEN s.user_id END)
) as ctr
FROM sent s
LEFT JOIN interactions i ON s.user_id = i.user_id AND s.treatment_id = i.treatment_id
GROUP BY s.treatment_type
Find users who received BOTH treatment types:
WITH user_treatment_types AS (
SELECT
user_id,
CASE
WHEN treatment_id IN (16150700, 20142778, 20143044, 20143063, 20143082,
20143121, 20143140, 20143159, 20143178, 20143197)
THEN 'Personalized'
ELSE 'Static'
END as treatment_type,
treatment_id
FROM `auxia-gcp.company_1950.treatment_history_sent`
WHERE DATE(treatment_sent_timestamp) >= DATE_SUB(CURRENT_DATE(), INTERVAL 60 DAY)
AND surface_id = 929
AND request_source = 'LIVE'
),
users_with_both AS (
SELECT user_id
FROM user_treatment_types
GROUP BY user_id
HAVING COUNT(DISTINCT treatment_type) = 2
)
-- Compare CTR for these users on each treatment type
SELECT COUNT(*) as users_with_both_treatments FROM users_with_both
Uplift = (CTR_personalized - CTR_static) / CTR_static × 100%
Report should include:
docs/analysis/treatment_ctr_unbiased_analysis_2025_12_17.md - Methodology referenceconfigs/personalized_treatments.csv - Treatment IDsconfigs/static_treatments.csv - Treatment IDstesting
Generate a team-facing weekly status update from STATUS_LOG.md and git history.
testing
Run QA validation checks on the recommendation pipeline output. Use after pipeline runs to verify data quality.
testing
Show current pipeline and deployment status. Use for quick health check.
devops
Execute the v5.17 vehicle fitment recommendation pipeline. Use when user asks to run the pipeline, refresh recommendations, or generate new recs.