Skip to content

feat(tdx-skills): add CDP consent & preference management skill - #94

Open
adher-code wants to merge 2 commits into
treasure-data:mainfrom
adher-code:feat/consent-management-skill
Open

feat(tdx-skills): add CDP consent & preference management skill#94
adher-code wants to merge 2 commits into
treasure-data:mainfrom
adher-code:feat/consent-management-skill

Conversation

@adher-code

Copy link
Copy Markdown

Add comprehensive consent management skill for GDPR/CCPA compliance using Treasure Data's native CDP capabilities.

Features

  • Consent Data Modeling: Parent segment attributes pattern for unified customer profile with consent preferences
  • Consent Collection: TD JavaScript SDK integration with Consent Manager API
  • Privacy-Aware Segmentation: 8 ready-to-use segment patterns filtering by consent status and GDPR 24-month expiry
  • Activation Compliance: Pre-activation validation workflows using Digdag
  • DSAR Workflows: Complete implementation for data export, deletion, and rectification (GDPR Articles 15-17)

Skill Structure

  • SKILL.md (472 lines, under 500 limit)
  • 4 working examples (parent segment, segments, preference center, DSAR)
  • 2 templates (table DDL, compliance workflow)
  • 4 reference guides (consent categories, DSAR, SDK integration, audit queries)
  • Automated validation script (test-skill.sh)
  • 3 testing guides for contributors

TD-Specific Implementation

Uses Treasure Data native capabilities:

  • Parent segment attributes (not separate consent database)
  • TD JS SDK Consent Manager (not OneTrust/external CMP)
  • tdx CLI for segment management
  • td_interval() for time-based filtering
  • Trust for CDP enforcement layer

Testing

All tests passed:

  • ✅ Structure validation (18/18 checks)
  • ✅ Core functionality (5/5 test cases)
  • ✅ File references verified
  • ✅ TD-specific patterns validated
  • ✅ Manual testing in Claude Code

Public Contribution Value

Publicly shareable skill that demonstrates:

  • Privacy-first CDP architecture
  • GDPR/CCPA compliance best practices
  • No proprietary TD internals exposed
  • Educational value for privacy implementation
Add comprehensive consent management skill for GDPR/CCPA compliance using
Treasure Data's native CDP capabilities.

## Features

- **Consent Data Modeling**: Parent segment attributes pattern for unified
  customer profile with consent preferences
- **Consent Collection**: TD JavaScript SDK integration with Consent Manager API
- **Privacy-Aware Segmentation**: 8 ready-to-use segment patterns filtering by
  consent status and GDPR 24-month expiry
- **Activation Compliance**: Pre-activation validation workflows using Digdag
- **DSAR Workflows**: Complete implementation for data export, deletion, and
  rectification (GDPR Articles 15-17)

## Skill Structure

- SKILL.md (472 lines, under 500 limit)
- 4 working examples (parent segment, segments, preference center, DSAR)
- 2 templates (table DDL, compliance workflow)
- 4 reference guides (consent categories, DSAR, SDK integration, audit queries)
- Automated validation script (test-skill.sh)
- 3 testing guides for contributors

## TD-Specific Implementation

Uses Treasure Data native capabilities:
- Parent segment attributes (not separate consent database)
- TD JS SDK Consent Manager (not OneTrust/external CMP)
- tdx CLI for segment management
- td_interval() for time-based filtering
- Trust for CDP enforcement layer

## Testing

All tests passed:
- ✅ Structure validation (18/18 checks)
- ✅ Core functionality (5/5 test cases)
- ✅ File references verified
- ✅ TD-specific patterns validated
- ✅ Manual testing in Claude Code

## Public Contribution Value

Publicly shareable skill that demonstrates:
- Privacy-first CDP architecture
- GDPR/CCPA compliance best practices
- No proprietary TD internals exposed
- Educational value for privacy implementation

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@adher-code
adher-code requested review from a team as code owners February 26, 2026 09:01
@xerial xerial added the tdx:core-skills Touches core skills: tdx-skills, sql-skills, workflow-skills label Mar 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tdx:core-skills Touches core skills: tdx-skills, sql-skills, workflow-skills

2 participants