Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Handle sensitive data with Claude — PII redaction, conversation management, Use when working with data-handling patterns. context window optimization, and data retention policies. Trigger with "anthropic data privacy", "claude pii", "anthropic context window", "manage claude conversations", "anthropic data retention".
.claude/skills/jeremylongshore-clade-data-handling/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-03 | ✗→✓ | ▲ Improved | -27% | 0% |
| case-19 | ✗→✓ | ▲ Improved | -28% | 0% |
| case-08 | ✗→✓ | ▲ Improved | -38% | 0% |
| case-13 | ✗→✓ | ▲ Improved | -33% | 0% |
| case-10 | ✗→✓ | ▲ Improved | -25% | 0% |
Handle data responsibly when building with Claude — manage the 200K token context window efficiently, implement conversation trimming strategies, redact PII before sending to the API, and configure data retention settings.
Claude models have a 200K token context window. Managing it efficiently is critical.
typescript// Count tokens before sending const count = await client.messages.countTokens({ model: 'claude-sonnet-4-20250514', messages, system: systemPrompt, }); // Budget: 200K total - max_tokens (output) = available input const MAX_CONTEXT = 200_000; const MAX_OUTPUT = 4096; const inputBudget = MAX_CONTEXT - MAX_OUTPUT; if (count.input_tokens > inputBudget) { // Trim oldest messages, keep system prompt + recent context messages = trimToFit(messages, inputBudget); }
typescriptfunction trimConversation(messages: MessageParam[], maxTokens: number): MessageParam[] { // Always keep the first message (often contains key context) // Keep the most recent messages // Drop middle turns first if (messages.length <= 4) return messages; const first = messages[0]; const recent = messages.slice(-6); // Last 3 turns return [first, ...recent]; }
typescript// Strip PII before sending to Claude (if not needed for the task) function redactPII(text: string): string { return text .replace(/\b[\w._%+-]+@[\w.-]+\.\w{2,}\b/g, '[EMAIL]') .replace(/\b\d{3}[-.]?\d{3}[-.]?\d{4}\b/g, '[PHONE]') .replace(/\b\d{3}-\d{2}-\d{4}\b/g, '[SSN]') .replace(/\b\d{4}[\s-]?\d{4}[\s-]?\d{4}[\s-]?\d{4}\b/g, '[CARD]'); }
| Error | Cause | Solution | |-------|-------|----------| | API Error | Check error type and status code | See clade-common-errors |
See Context Window Management (token counting + budget), Conversation Trimming function, and PII Handling regex patterns above.
See clade-enterprise-rbac for organization and access management.
clade-install-auth| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-18 | pass→pass | 9,623 | 2,766 | -71% | 1 | 1 | 0% | 1,676 | 1,176 | -30% | 0 | 0 | — |
case-01 | fail→fail | 18,827 | 9,524 | -49% | 1 | 1 | 0% | 3,871 | 2,622 | -32% | 0 | 0 | — |
case-02 | fail→fail | 18,594 | 14,706 | -21% | 1 | 1 | 0% | 3,587 | 3,626 | +1% | 0 | 0 | — |
case-03 | fail→pass | 27,898 | 16,927 | -39% | 1 | 1 | 0% | 5,786 | 4,215 | -27% | 0 | 0 | — |
case-04 | pass→pass | 14,494 | 5,589 | -61% | 1 | 1 | 0% | 2,736 | 1,784 | -35% | 0 | 0 | — |
case-19 | fail→pass | 10,241 | 3,561 | -65% | 1 | 1 | 0% | 1,761 | 1,274 | -28% | 0 | 0 | — |
case-05 | pass→pass | 4,801 | 3,970 | -17% | 1 | 1 | 0% | 828 | 1,457 | +76% | 0 | 0 | — |
case-06 | pass→pass | 4,893 | 2,128 | -57% | 1 | 1 | 0% | 741 | 1,049 | +42% | 0 | 0 | — |
case-07 | pass→pass | 7,890 | 2,027 | -74% | 1 | 1 | 0% | 1,190 | 1,104 | -7% | 0 | 0 | — |
case-08 | fail→pass | 12,329 | 2,291 | -81% | 1 | 1 | 0% | 1,879 | 1,173 | -38% | 0 | 0 | — |
case-13 | fail→pass | 11,754 | 8,233 | -30% | 1 | 1 | 0% | 2,329 | 1,552 | -33% | 0 | 0 | — |
case-09 | pass→pass | 14,353 | 4,225 | -71% | 1 | 1 | 0% | 2,050 | 1,592 | -22% | 0 | 0 | — |
case-10 | fail→pass | 10,147 | 2,869 | -72% | 1 | 1 | 0% | 1,752 | 1,309 | -25% | 0 | 0 | — |
case-11 | pass→pass | 11,373 | 2,868 | -75% | 1 | 1 | 0% | 2,250 | 1,337 | -41% | 0 | 0 | — |
case-12 | pass→pass | 9,047 | 2,553 | -72% | 1 | 1 | 0% | 1,718 | 1,232 | -28% | 0 | 0 | — |
case-14 | pass→pass | 7,869 | 5,333 | -32% | 1 | 1 | 0% | 1,247 | 1,577 | +26% | 0 | 0 | — |
case-15 | pass→pass | 5,222 | 1,718 | -67% | 1 | 1 | 0% | 666 | 932 | +40% | 0 | 0 | — |
case-16 | fail→pass | 9,697 | 2,315 | -76% | 1 | 1 | 0% | 1,316 | 1,061 | -19% | 0 | 0 | — |
case-17 | pass→pass | 14,174 | 3,879 | -73% | 1 | 1 | 0% | 1,140 | 1,467 | +29% | 0 | 0 | — |
case-20 | pass→pass | 6,747 | 2,767 | -59% | 1 | 1 | 0% | 1,034 | 1,242 | +20% | 0 | 0 | — |
case-21 | pass→pass | 6,582 | 2,472 | -62% | 1 | 1 | 0% | 1,327 | 1,160 | -13% | 0 | 0 | — |
case-22 | pass→pass | 12,216 | 4,622 | -62% | 1 | 1 | 0% | 2,394 | 1,688 | -29% | 0 | 0 | — |
case-23 | pass→pass | 11,331 | 9,903 | -13% | 1 | 1 | 0% | 2,000 | 2,412 | +21% | 0 | 0 | — |
case-24 | pass→pass | 15,294 | 28,123 | +84% | 1 | 1 | 0% | 3,109 | 3,854 | +24% | 0 | 0 | — |
case-25 | pass→pass | 8,434 | 6,451 | -24% | 1 | 1 | 0% | 1,552 | 1,849 | +19% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 25 cases were attempted. The headline lift of +24 percentage points is the difference between those two pass rates over the 25 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.