flexport-data-handling
Implement data handling for Flexport supply chain data including PII redaction, shipment data retention, GDPR compliance, and secure document management. Trigger: "flexport data handling", "flexport PII", "flexport GDPR", "flexport data retention".
Best use case
flexport-data-handling is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Implement data handling for Flexport supply chain data including PII redaction, shipment data retention, GDPR compliance, and secure document management. Trigger: "flexport data handling", "flexport PII", "flexport GDPR", "flexport data retention".
Teams using flexport-data-handling should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/flexport-data-handling/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How flexport-data-handling Compares
| Feature / Agent | flexport-data-handling | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Implement data handling for Flexport supply chain data including PII redaction, shipment data retention, GDPR compliance, and secure document management. Trigger: "flexport data handling", "flexport PII", "flexport GDPR", "flexport data retention".
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
Best AI Skills for Claude
Explore the best AI skills for Claude and Claude Code across coding, research, workflow automation, documentation, and agent operations.
ChatGPT vs Claude for Agent Skills
Compare ChatGPT and Claude for AI agent skills across coding, writing, research, and reusable workflow execution.
SKILL.md Source
# Flexport Data Handling
## Overview
Flexport logistics data encompasses shipment records, bills of lading, customs declarations, commercial invoices, tracking events, and trade compliance documents. This data crosses international borders and regulatory jurisdictions, requiring strict handling for PII (shipper/consignee contacts), controlled export data (HS codes, ITAR items), and financial records (invoices, duty payments). All integrations must enforce GDPR/CCPA compliance, customs data retention mandates, and C-TPAT supply chain security standards.
## Data Classification
| Data Type | Sensitivity | Retention | Encryption |
|-----------|-------------|-----------|------------|
| Shipment records | Medium | 1 year post-delivery | AES-256 at rest |
| Customs declarations | High (trade compliance) | 5 years (CBP requirement) | AES-256 + TLS |
| Commercial invoices | High (financial) | 7 years (tax/audit) | AES-256 at rest |
| Contact PII (shipper/consignee) | High | Until deletion request | Field-level encryption |
| Tracking events | Low | 90 days | TLS in transit |
## Data Import
```typescript
interface FlexportShipment {
id: string; ref: string; status: string;
shipper: { name: string; email: string; address: string };
consignee: { name: string; email: string; address: string };
hsCode: string; incoterm: string; cargoReadyDate: string;
}
async function importShipments(cursor?: string): Promise<FlexportShipment[]> {
const allShipments: FlexportShipment[] = [];
let nextCursor = cursor;
do {
const res = await fetch(`https://api.flexport.com/v2/shipments?page[after]=${nextCursor || ''}`, {
headers: { Authorization: `Bearer ${process.env.FLEXPORT_API_TOKEN}` },
});
const data = await res.json();
for (const s of data.data) {
if (!s.id || !s.attributes.ref) throw new Error(`Invalid shipment: missing required fields`);
allShipments.push(s.attributes);
}
nextCursor = data.links?.next ? new URL(data.links.next).searchParams.get('page[after]') : null;
} while (nextCursor);
return allShipments;
}
```
## Data Export
```typescript
async function exportShipmentsCSV(shipments: FlexportShipment[], dest: string) {
const REDACT_FIELDS = ['email', 'phone', 'street_address', 'tax_id'];
const sanitized = shipments.map(s => {
const copy = JSON.parse(JSON.stringify(s));
for (const field of REDACT_FIELDS) {
if (copy.shipper?.[field]) copy.shipper[field] = '[REDACTED]';
if (copy.consignee?.[field]) copy.consignee[field] = '[REDACTED]';
}
return copy;
});
// Validate no restricted HS codes in export payload
const restricted = sanitized.filter(s => s.hsCode?.startsWith('9A'));
if (restricted.length > 0) throw new Error(`Export blocked: ${restricted.length} ITAR-restricted items`);
const csv = [Object.keys(sanitized[0]).join(','), ...sanitized.map(r => Object.values(r).join(','))].join('\n');
await writeFile(dest, csv, 'utf-8');
}
```
## Data Validation
```typescript
function validateShipment(s: FlexportShipment): string[] {
const errors: string[] = [];
if (!s.id) errors.push('Missing shipment ID');
if (!s.ref || s.ref.length > 50) errors.push('Invalid shipment reference');
if (!s.hsCode || !/^\d{4,10}$/.test(s.hsCode)) errors.push(`Invalid HS code: ${s.hsCode}`);
if (!['EXW','FOB','CIF','DDP','DAP'].includes(s.incoterm)) errors.push(`Unknown incoterm: ${s.incoterm}`);
if (!s.shipper?.name || !s.consignee?.name) errors.push('Missing shipper or consignee name');
if (s.cargoReadyDate && isNaN(Date.parse(s.cargoReadyDate))) errors.push('Invalid cargo ready date');
return errors;
}
```
## Compliance
- [ ] PII fields (shipper/consignee contacts) encrypted at field level, redacted in logs
- [ ] Customs declarations retained 5 years per CBP/EU customs code requirements
- [ ] Commercial invoices retained 7 years for tax audit compliance
- [ ] GDPR right-to-erasure: redact PII but preserve shipment skeleton for business continuity
- [ ] CCPA opt-out signals honored for California-origin shipments
- [ ] ITAR/EAR restricted HS codes flagged and blocked from unauthorized export
- [ ] C-TPAT supply chain security: validate trading partner identities before data sharing
- [ ] Audit trail for all data access, export, and deletion operations
## Error Handling
| Issue | Cause | Fix |
|-------|-------|-----|
| API 429 rate limit | Too many shipment fetches | Implement exponential backoff with jitter |
| Invalid HS code rejected | Incorrect tariff classification | Validate against WCO HS nomenclature before submission |
| GDPR deletion timeout | Large contact footprint across shipments | Batch updates in transactions of 100 records |
| Customs data missing | Incomplete booking submission | Require mandatory fields at import validation step |
| Export blocked by ITAR flag | Restricted HS code in payload | Route to trade compliance officer for manual review |
## Resources
- [Flexport API Reference](https://apidocs.flexport.com/)
- [CBP Data Retention Requirements](https://www.cbp.gov/trade)
## Next Steps
See `flexport-security-basics`.Related Skills
generating-test-data
Generate realistic test data including edge cases and boundary conditions. Use when creating realistic fixtures or edge case test data. Trigger with phrases like "generate test data", "create fixtures", or "setup test database".
managing-database-tests
Test database testing including fixtures, transactions, and rollback management. Use when performing specialized testing. Trigger with phrases like "test the database", "run database tests", or "validate data integrity".
encrypting-and-decrypting-data
Validate encryption implementations and cryptographic practices. Use when reviewing data security measures. Trigger with 'check encryption', 'validate crypto', or 'review security keys'.
scanning-for-data-privacy-issues
Scan for data privacy issues and sensitive information exposure. Use when reviewing data handling practices. Trigger with 'scan privacy issues', 'check sensitive data', or 'validate data protection'.
windsurf-data-handling
Control what code and data Windsurf AI can access and process in your workspace. Use when handling sensitive data, implementing data exclusion patterns, or ensuring compliance with privacy regulations in Windsurf environments. Trigger with phrases like "windsurf data privacy", "windsurf PII", "windsurf GDPR", "windsurf compliance", "codeium data", "windsurf telemetry".
webflow-data-handling
Implement Webflow data handling — CMS content delivery patterns, PII redaction in form submissions, GDPR/CCPA compliance for ecommerce data, and data retention policies. Trigger with phrases like "webflow data", "webflow PII", "webflow GDPR", "webflow data retention", "webflow privacy", "webflow CCPA", "webflow forms data".
vercel-data-handling
Implement data handling, PII protection, and GDPR/CCPA compliance for Vercel deployments. Use when handling sensitive data in serverless functions, implementing data redaction, or ensuring privacy compliance on Vercel. Trigger with phrases like "vercel data", "vercel PII", "vercel GDPR", "vercel data retention", "vercel privacy", "vercel compliance".
veeva-data-handling
Veeva Vault data handling for enterprise operations. Use when implementing advanced Veeva Vault patterns. Trigger: "veeva data handling".
vastai-data-handling
Manage training data and model artifacts securely on Vast.ai GPU instances. Use when transferring data to instances, managing checkpoints, or implementing secure data lifecycle on rented hardware. Trigger with phrases like "vastai data", "vastai upload data", "vastai checkpoints", "vastai data security", "vastai artifacts".
twinmind-data-handling
Handle TwinMind meeting data with GDPR compliance: transcript storage, memory vault management, data export, and deletion policies. Use when implementing data handling, or managing TwinMind meeting AI operations. Trigger with phrases like "twinmind data handling", "twinmind data handling".
supabase-data-handling
Implement GDPR/CCPA compliance with Supabase: RLS for data isolation, user deletion via auth.admin.deleteUser(), data export via SQL, PII column management, backup/restore workflows, and retention policies. Use when handling sensitive data, implementing right-to-deletion, configuring data retention, or auditing PII in Supabase database columns. Trigger: "supabase GDPR", "supabase data handling", "supabase PII", "supabase compliance", "supabase data retention", "supabase delete user", "supabase data export".
speak-data-handling
Handle student audio data, assessment records, and learning progress with GDPR/COPPA compliance. Use when implementing data handling, or managing Speak language learning platform operations. Trigger with phrases like "speak data handling", "speak data handling".