.claude/skills/klytos-privacy-tools/SKILL.md
Guide for GDPR compliance and privacy tools in Klytos CMS. Use when handling data subject requests, implementing data export, data erasure, privacy policy management, GDPR compliance, or managing user privacy rights.
npx skillsauth add joseconti/klytos klytos-privacy-toolsInstall 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.
Privacy Tools provide GDPR compliance for data subject requests:
PrivacyManager (installer/core/privacy-manager.php)Namespace: Klytos\Core
Registered in: App::boot() → $app->getPrivacyManager()
| Method | Purpose |
|---|---|
| findUser( string $query ): ?array | Search by username or email |
| collectUserData( string $userId ): array | Gather all personal data (core + plugins) |
| exportAsJson( string $userId ): string | JSON export |
| exportAsHtml( string $userId ): string | Self-contained HTML report |
| collectErasableData( string $userId ): array | Sections with erasable/retained flags |
| eraseUserData( string $userId, array $sections, string $currentUserId ): array | Erase selected sections |
| Collection | Export | Erasure Strategy |
|---|---|---|
| users | Profile (no pass_hash) | Anonymize (random username/email, "Deleted User") |
| audit-log | Activity entries | Anonymize (username → [anonymized], IP → 0.0.0.0) |
| form-submissions | Matched by email | Delete |
| tasks | Matched by assigned_to/created_by | Anonymize (null references) |
| analytics | Excluded | N/A (daily-salted hashes, not personal data) |
erasable => false are skippedinstaller/admin/privacy.phpTwo-tab interface (same pattern as MCP page):
Sidebar position: 67 (between Consent Manager at 66 and Users at 70)
Capability: users.manage
Icon: fa-solid fa-user-shield
// Append data sections to export
klytos_add_filter( 'privacy.export_data', function ( array $data, string $userId, array $user ): array {
$data['sections'][] = [
'source' => 'my-plugin',
'label' => 'My Data',
'count' => 5,
'data' => [...],
];
return $data;
} );
// Declare erasable/retained sections
klytos_add_filter( 'privacy.erasable_data', function ( array $sections, string $userId, array $user ): array {
$sections[] = [
'id' => 'my-plugin:orders',
'source' => 'my-plugin',
'label' => 'Orders',
'erasable' => false,
'retention_reason' => 'Tax compliance (7 years)',
'item_count' => 12,
];
return $sections;
} );
// Perform plugin-specific erasure
klytos_add_filter( 'privacy.erase_plugin_data', function ( array $results, string $userId, array $selectedSections ): array {
if ( in_array( 'my-plugin:wishlists', $selectedSections, true ) ) {
// delete wishlists...
$results[] = ['section' => 'my-plugin:wishlists', 'status' => 'deleted', 'count' => 3];
}
return $results;
} );
| Hook | Arguments | When |
|---|---|---|
| privacy.export_generated | $userId, $format | After export generated |
| privacy.export_sent | $userId | After email sent |
| privacy.before_erasure | $userId, $selectedSections | Before erasure |
| privacy.erasure_complete | $userId, $results | After erasure done |
| privacy.export_html_sections | $html, $data (filter) | Customize HTML export |
All keys under privacy.* in en.json / es.json. Key examples:
privacy.title, privacy.tab_export, privacy.tab_erasureprivacy.export_title, privacy.erasure_titleprivacy.section_profile, privacy.section_audit_log, etc.privacy.owner_cannot_erase, privacy.self_cannot_eraseprivacy.legally_retained, privacy.deleted_user| Purpose | Path |
|---|---|
| Core class | installer/core/privacy-manager.php |
| Admin page | installer/admin/privacy.php |
| Sidebar entry | installer/admin/templates/sidebar.php (position 67) |
| App registration | installer/core/app.php (property + boot + getter) |
| English i18n | installer/core/lang/en.json (privacy.*) |
| Spanish i18n | installer/core/lang/es.json (privacy.*) |
development
Guide for working with dates, times, and timezones in Klytos CMS. Use when formatting dates, converting timezones, scheduling actions with timestamps, displaying local time, working with UTC storage, building timezone selectors, or using any klytos_date/klytos_gmdate/klytos_timezone functions.
tools
Guide for developing and extending the Klytos web terminal. Use when modifying terminal commands, adding terminal commands from plugins, fixing terminal bugs, extending the pseudo-terminal, working with TerminalExecutor class, registering custom permissions, adding custom category labels, or managing terminal UI and security.
development
--- name: klytos-site-builder description: Guide for building a complete website from scratch with Klytos CMS. Use when creating a new site, configuring a site after installation, setting up design/content/SEO/navigation, or when the user pastes the post-install prompt. Covers 9 phases: discovery, design reference, global config, theme, content structure, templates, content creation, additional features, and launch. --- # Klytos Site Builder ## Overview The Site Builder is a conversational AI
development
Use when creating or editing page content in Klytos CMS. Ensures every page has proper SEO structure, HTML semantics, meta tags, structured data, accessibility for maximum search engine visibility. Apply when writing page titles, descriptions, content, headings, images, internal links, JSON-LD schema, or following the SEO checklist before publishing pages.