Agent skill

AI Federated Learning

by mukul975 in mukul975/Privacy-Data-Protection-Skills

Implements federated learning architecture patterns for GDPR compliance.

Apache-2.0Auto-check passedLegal & Compliance

Install AI Federated Learning

skills CLI
$ npx skills add mukul975/Privacy-Data-Protection-Skills --skill ai-federated-learning -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install mukul975/Privacy-Data-Protection-Skills ai-federated-learning --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/mukul975/Privacy-Data-Protection-Skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/privacy/ai-federated-learning .claude/skills/ai-federated-learning && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
ai-federated-learning
GitHub stars
301
Token cost
~3.1k tokens
SKILL.md length
1,337 words
Files
5 (incl. scripts, references, assets)
Skills in repo
280
Repo updated
First seen
Licence
Apache-2.0

At a glance

Implements federated learning architecture patterns for GDPR compliance.

  • Works in 6 steps: Gradient leakage: Model updates can leak… → Model memorization: The aggregated model… → Right to erasure: Removing a… → …
  • Tasks that involve Privacy and GDPR
  • SKILL.md covers Overview, Federated Learning…, Secure Aggregation Protocols and Differential Privacy Integration, plus 4 more sections
  • Runs Python scripts from its folder

What it does

AI Federated Learning is an agent skill from mukul975/Privacy-Data-Protection-Skills. Implements federated learning architecture patterns for GDPR compliance. Covers secure aggregation protocols, differential privacy integration, communication protocols, and privacy-by-design distributed ML training. Keywords: federated learning, distributed training, secure aggregation, differential privacy, privacy-preserving ML.

Its SKILL.md is about 3.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 7 other files, including scripts, reference files and assets (for example `assets/template.md`, `references/standards.md` and `references/workflows.md`).

It sits in Legal & Compliance, covering Privacy and GDPR, Software architecture and Deep learning. The repository describes itself as: 282+ structured privacy & data protection skills for AI agents. GDPR, CCPA, EU AI Act, HIPAA, LGPD, PIPL, DPDP Act. The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Privacy and GDPR
  • Tasks that involve Software architecture
  • Tasks that involve Deep learning

Example prompts

  • “Use the ai-federated-learning skill to implement federated learning architecture patterns for GDPR compliance”
  • “/ai-federated-learning”

Requirements

  • Python 3

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Gradient leakage: Model updates can leak training data even without transmitting raw data — secure aggregation and DP mitigate but do not…
  2. Model memorization: The aggregated model may still memorize individual records — privacy auditing required post-training
  3. Right to erasure: Removing a participant's contribution from the trained model is challenging — machine unlearning or retraining required
  4. Controller/processor determination: Complex multi-party FL architectures require clear role delineation
  5. Lawful basis: Each participant needs independent lawful basis; the aggregator needs basis for processing updates
  6. Transparency: Data subjects must be informed about federated learning participation

What it can do on your machine

Read from SKILL.md and the folder at commit 9b2ef9e. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python), which the agent can run.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

AI Federated Learning loads about 3.1k tokens when it runs, and up to ~5.1k if it reads all its reference files. Until then it costs about 89 tokens; SKILL.md has 1,337 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~89
When it runs · the whole SKILL.md, loaded when a task matches
~3.1k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~5.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from mukul975/Privacy-Data-Protection-Skills at commit 9b2ef9e, republished under its Apache-2.0 licence (© mukul975). 1,337 words, ~3,058 tokens.

Download SKILL.mdSave it as .claude/skills/ai-federated-learning/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
ai-federated-learning
description
Implements federated learning architecture patterns for GDPR compliance. Covers secure aggregation protocols, differential privacy integration, communication protocols, and privacy-by-design distributed ML training. Keywords: federated learning, distributed training, secure aggregation, differential privacy, privacy-preserving ML.
license
Apache-2.0
metadata.author
mukul975
metadata.version
1.0
metadata.domain
privacy
metadata.subdomain
ai-privacy-governance
metadata.tags
federated-learning, secure-aggregation, differential-privacy, distributed-ml, privacy-preserving, gdpr

Federated Learning for GDPR Compliance

Overview

Federated learning (FL) is a distributed machine learning approach that trains models across multiple data holders without centralising personal data. Instead of collecting training data into a central repository, federated learning sends the model to the data, computes local updates on each participant's device or server, and aggregates only model updates (gradients or weights) at a central coordinator. This architecture directly addresses GDPR data minimisation (Art. 5(1)(c)) and data protection by design (Art. 25) principles by eliminating the need to transfer and centralise personal data for AI training. However, federated learning is not a privacy silver bullet — it introduces its own privacy risks that must be managed through complementary techniques.

Federated Learning Architecture Patterns

Pattern 1: Cross-Device Federated Learning

Use case: Training on data from millions of user devices (smartphones, tablets, IoT).

ComponentDescription
ParticipantsEnd-user devices (smartphones, tablets, wearables)
ScaleThousands to millions of participants
DataSmall per-device, large aggregate (e.g., keyboard predictions, health metrics)
CoordinationCentral server selects participants per round, distributes model, aggregates updates
CommunicationCompressed gradient updates over mobile networks
Privacy riskIndividual gradient updates may leak information about device data

GDPR Analysis:

  • Data minimisation: personal data never leaves the device — strong compliance
  • Controller role: platform operator is controller; device owners are not processors
  • Lawful basis: consent or legitimate interest for on-device processing
  • International transfers: no personal data transfer if aggregation is privacy-preserving
  • Right to erasure: device can be excluded from future rounds; model unlearning may be needed
Pattern 2: Cross-Silo Federated Learning

Use case: Training across organisational boundaries (hospitals, banks, subsidiaries).

ComponentDescription
ParticipantsOrganisational data silos (hospitals, branches, partner companies)
Scale2 to 100 participants
DataLarge per-silo, structured (e.g., medical records, financial transactions)
CoordinationTrusted aggregator or peer-to-peer protocol
CommunicationModel updates over secure channels between organisations
Privacy riskGradient updates may reveal institutional data patterns

GDPR Analysis:

  • Joint controller determination: participants and aggregator may be joint controllers (Art. 26) — requires joint controller agreement
  • Data processing agreements: if aggregator is a processor, Art. 28 DPA required
  • Data minimisation: personal data stays within each silo — strong compliance
  • International transfers: if silos are in different jurisdictions, gradient transfer legality depends on privacy guarantees
  • Lawful basis: each silo needs independent lawful basis for local training; aggregation needs separate basis
Pattern 3: Vertical Federated Learning

Use case: Different organisations hold different features for the same individuals.

ComponentDescription
ParticipantsOrganisations with complementary data (bank + retailer sharing customer features)
Scale2 to 10 participants
DataDifferent features for overlapping individuals
CoordinationSecure multi-party computation for feature combination
CommunicationEncrypted intermediate representations
Privacy riskFeature linkage may reveal individual attributes across parties

GDPR Analysis:

  • Joint controller: participants are likely joint controllers — each processes personal data for a common purpose
  • Purpose limitation: combined training purpose must be compatible with each party's original collection purpose
  • Data subject notification: data subjects must be informed about cross-organisation federated training
  • Consent: may be required for combining data across organisations

Secure Aggregation Protocols

Protocol 1: Masking-Based Secure Aggregation

Participants mask their local updates with pairwise random masks that cancel out upon aggregation. The aggregator receives the sum without seeing individual updates.

PropertyValue
Privacy guaranteeIndividual updates not visible to aggregator or other participants
Computational costO(n^2) pairwise key agreement, O(n) masking per round
Communication cost2x baseline (masks + masked updates)
Dropout toleranceHandles participant dropout if sufficient participants remain
Collusion resistanceSecure against aggregator + up to t-1 participant collusion
Protocol 2: Homomorphic Encryption Aggregation

Participants encrypt their updates with a homomorphic encryption scheme. The aggregator computes the sum on encrypted data without decryption.

PropertyValue
Privacy guaranteeComputationally secure — updates encrypted throughout
Computational cost100-1000x overhead for encryption/decryption operations
Communication cost2-10x baseline (ciphertext expansion)
Dropout toleranceExcellent — encrypted updates can be summed independently
Collusion resistanceSecure against aggregator (does not hold decryption key)
Protocol 3: Trusted Execution Environment (TEE)

Aggregation occurs within a hardware-protected enclave (Intel SGX, ARM TrustZone). Participants send updates to the TEE, which performs aggregation in isolated memory.

PropertyValue
Privacy guaranteeHardware-based isolation — aggregator cannot inspect updates
Computational costNear-native (small overhead for enclave transitions)
Communication costBaseline (no encryption expansion for enclave-to-enclave)
Dropout toleranceExcellent
Collusion resistanceDepends on hardware trust model; vulnerable to side-channel attacks

Differential Privacy Integration

Local Differential Privacy (LDP)

Each participant adds noise to their gradient update before sending to the aggregator:

  • Mechanism: Gaussian noise calibrated to sensitivity and privacy budget (epsilon, delta)
  • Guarantee: Individual update is differentially private — aggregator cannot infer specific data points
  • Trade-off: Higher noise reduces model accuracy; need more participants to compensate
  • Recommended epsilon: 1-10 per round, with privacy accounting across rounds
Central Differential Privacy (CDP)

The aggregator adds noise to the aggregated update before applying to the global model:

  • Mechanism: Gaussian noise added to the sum of clipped gradients
  • Guarantee: Global model is differentially private with respect to any single participant's data
  • Trade-off: Less noise needed than LDP for same accuracy (noise averages out); requires trusted aggregator
  • Recommended epsilon: 1-8 total privacy budget
Show full SKILL.md (507 more words)Show less
Privacy Budget Management
ParameterDescriptionGuidance
Epsilon (ε)Privacy loss parameter — lower is more privateε ≤ 1: strong privacy; ε ≤ 8: moderate; ε > 10: weak
Delta (δ)Probability of privacy failureδ < 1/N where N is dataset size
Rounds (T)Number of federated training roundsPrivacy degrades with rounds — use composition theorems
Clip norm (C)Maximum gradient norm per participantBalance between privacy (lower C) and convergence (higher C)
Noise multiplier (σ)Ratio of noise to sensitivityDetermined by ε, δ, C, and composition method

GDPR Compliance Assessment for Federated Learning

Data Protection by Design (Art. 25) Alignment
GDPR PrincipleFL ImplementationCompliance Status
Data minimisation (Art. 5(1)(c))Personal data stays local — only model updates transmittedStrong compliance
Purpose limitation (Art. 5(1)(b))Local processing for specified training purposeRequires per-participant purpose documentation
Storage limitation (Art. 5(1)(e))No central training data repository — data retained locally per participant's policyCompliance depends on participant retention
Integrity and confidentiality (Art. 5(1)(f))Secure aggregation protects update confidentialityStrong with SA + DP
Accuracy (Art. 5(1)(d))Model accuracy may differ from centralised trainingMonitor and document accuracy trade-offs
Remaining GDPR Challenges
  1. Gradient leakage: Model updates can leak training data even without transmitting raw data — secure aggregation and DP mitigate but do not eliminate
  2. Model memorization: The aggregated model may still memorize individual records — privacy auditing required post-training
  3. Right to erasure: Removing a participant's contribution from the trained model is challenging — machine unlearning or retraining required
  4. Controller/processor determination: Complex multi-party FL architectures require clear role delineation
  5. Lawful basis: Each participant needs independent lawful basis; the aggregator needs basis for processing updates
  6. Transparency: Data subjects must be informed about federated learning participation

Implementation Considerations

Communication Efficiency
TechniqueDescriptionPrivacy Impact
Gradient compressionQuantise or sparsify gradients before transmissionMay interact with DP noise — careful calibration needed
Federated averaging (FedAvg)Multiple local SGD steps before communicationReduces communication rounds; may increase per-round privacy cost
Gradient selectionSend only top-k gradient componentsLeaks which components are most significant — privacy concern
Participant Selection
StrategyDescriptionPrivacy Consideration
Random selectionUniformly random participant sampling per roundFair representation; privacy amplification through subsampling
Availability-basedSelect participants with sufficient resourcesMay bias toward certain participant profiles
Contribution-basedSelect participants whose data improves model mostReveals information about data distribution — privacy risk

Enforcement Relevance

While no enforcement action has specifically addressed federated learning, the technology is directly relevant to:

  • CNIL AI recommendations (2024): Identified federated learning as a recommended privacy-enhancing technology for AI training
  • EDPB Guidelines 04/2025: Mentioned distributed training as a data minimisation measure for AI systems
  • Garante v. OpenAI (2023): Centralised data collection was a key compliance issue — federated alternatives could have mitigated
  • AI Act Art. 10: Data governance for training data — FL enables data governance while maintaining data locality

Integration Points

  • ai-dpia: FL architecture reduces data centralisation risk in DPIA assessment
  • ai-training-lawfulness: FL may simplify lawful basis by keeping data local
  • ai-model-privacy-audit: Federated models require distributed privacy auditing
  • ai-privacy-inference: FL complements confidential computing for inference privacy
  • ai-data-retention: Data locality in FL simplifies retention compliance

© mukul975, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 4 other files (scripts, references, assets) in skills/privacy/ai-federated-learning of mukul975/Privacy-Data-Protection-Skills.

  • SKILL.md
  • assets/template.md
  • references/standards.md
  • references/workflows.md
  • scripts/process.py

Open the folder on GitHubat commit 9b2ef9e

Compare with similar skills

AI Federated Learning next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

AI Federated Learning compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
AI Federated Learning this skillmukul975/Privacy-Data-Protection-Skills301—~3.1kAutomated safety check: PassApache-2.0
C15tc15t/c15t1.9k1 repos~1.6kAutomated safety check: PassApache-2.0
HIPAA Safe Harbor Coverage Auditmaziyarpanahi/openmed5.5k—~1.7kAutomated safety check: PassApache-2.0
Korean Privacy Termskimlawtech/korean-privacy-terms587—~2.9kAutomated safety check: PassApache-2.0
Gdpr ComplianceSushegaad/Claude-Skills-Governance-Risk-and-Compliance9461 repos~3.9kAutomated safety check: PassMIT
Hipaa ComplianceSushegaad/Claude-Skills-Governance-Risk-and-Compliance9461 repos~2.3kAutomated safety check: PassMIT

Similar skills

  • C15t

    c15t/c15t

    Work with c15t consent management docs, APIs, and integrations for Next.js, React, and JavaScript.

    1.9k GitHub starsUsed in 1 repo~1.6k tokens
    Legal & ComplianceAuto-check passed
  • Checks OpenMed de-identified clinical text against the 18 HIPAA Safe Harbor identifier categories and reports gaps and residual re-identification risk.

    5.5k GitHub stars~1.7k tokensUpdated today
    Legal & ComplianceAuto-check passed
  • Korean Privacy Terms

    kimlawtech/korean-privacy-terms

    처리방침·이용약관 자동 생성 스킬 패키지 (v4.0). An agent skill from kimlawtech/korean-privacy-terms.

    587 GitHub stars~2.9k tokensUpdated 1 mo ago
    Legal & ComplianceAuto-check passed
  • Gdpr Compliance

    Sushegaad/Claude-Skills-Governance-Risk-and-Compliance

    Expert GDPR compliance assistant covering all four core workflows: (1) auditing code and systems for GDPR violations, (2) drafting GDPR-compliant documents such as privacy policies, Data Processing…

    946 GitHub starsUsed in 1 repo~3.9k tokens
    Legal & ComplianceAuto-check passed
  • Hipaa Compliance

    Sushegaad/Claude-Skills-Governance-Risk-and-Compliance

    Expert HIPAA compliance assistant for healthcare and software contexts.

    946 GitHub starsUsed in 1 repo~2.3k tokens
    Legal & ComplianceAuto-check passed
  • Pii Contract Analyze

    gregmos/PII-Shield

    Universal legal document processor with PII anonymization. An agent skill from gregmos/PII-Shield.

    150 GitHub stars~8.9k tokensUpdated 3 mo ago
    Legal & ComplianceAuto-check: notes

More from mukul975/Privacy-Data-Protection-Skills

All 280 skills in this repo
  • Age Gating Services

    mukul975/Privacy-Data-Protection-Skills

    Implements age-gating mechanisms for online services to restrict access based on user age.

    301 GitHub stars~3.7k tokensUpdated 6 mo ago
    Auto-check passed
  • AI Data Retention

    mukul975/Privacy-Data-Protection-Skills

    Manages AI model retention and machine unlearning requirements.

    301 GitHub stars~1.9k tokensUpdated 6 mo ago
    Auto-check passed
  • AI Dpia

    mukul975/Privacy-Data-Protection-Skills

    Conducts Data Protection Impact Assessments for AI and ML systems per EDPB Guidelines 04/2025 on AI processing.

    301 GitHub stars~3.4k tokensUpdated 6 mo ago
    Auto-check passed
  • Dpia Mitigation Plan

    mukul975/Privacy-Data-Protection-Skills

    Structures risk mitigation planning and residual risk tracking for Data Protection Impact Assessments under GDPR Article 35(7)(d).

    301 GitHub stars~846 tokensUpdated 6 mo ago
    Auto-check passed
  • Gdpr Accountability

    mukul975/Privacy-Data-Protection-Skills

    Guides implementation of the GDPR accountability principle under Articles 5(2) and 24, including documentation requirements for policies, DPIAs, RoPA, training records, and breach logs.

    301 GitHub stars~1.9k tokensUpdated 6 mo ago
    Auto-check passed
  • Pia Threshold Screening

    mukul975/Privacy-Data-Protection-Skills

    Conducts pre-DPIA threshold screening to determine whether a full Data Protection Impact Assessment is required under GDPR Article 35.

    301 GitHub stars~880 tokensUpdated 6 mo ago
    Auto-check passed

Questions about AI Federated Learning

What does AI Federated Learning do?

Implements federated learning architecture patterns for GDPR compliance. AI Federated Learning is an agent skill from mukul975/Privacy-Data-Protection-Skills. Implements federated learning architecture patterns for GDPR compliance.

When should I use AI Federated Learning?

AI Federated Learning fits situations like: tasks that involve Privacy and GDPR; tasks that involve Software architecture; tasks that involve Deep learning.

How do I install AI Federated Learning in Claude Code?

Run `npx skills add mukul975/Privacy-Data-Protection-Skills --skill ai-federated-learning -a claude-code`. Or copy the skill folder (skills/privacy/ai-federated-learning in mukul975/Privacy-Data-Protection-Skills) into .claude/skills/ai-federated-learning in your project. Claude Code loads it when a task matches its description.

How do I install AI Federated Learning in Codex?

Run `npx skills add mukul975/Privacy-Data-Protection-Skills --skill ai-federated-learning -a codex`. Or copy the skill folder (skills/privacy/ai-federated-learning in mukul975/Privacy-Data-Protection-Skills) into .agents/skills/ai-federated-learning in your project. Codex loads it when a task matches its description.

Can I use AI Federated Learning in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add mukul975/Privacy-Data-Protection-Skills --skill ai-federated-learning -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/ai-federated-learning, .gemini/skills/ai-federated-learning, .github/skills/ai-federated-learning and .opencode/skills/ai-federated-learning in your project.

What does AI Federated Learning need to run?

Going by SKILL.md and its folder, AI Federated Learning needs Python for the scripts in its folder. Our summary lists: Python 3.

Does AI Federated Learning access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is AI Federated Learning safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does AI Federated Learning use?

AI Federated Learning is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does AI Federated Learning use?

About 3.1k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2k tokens, read only when the agent opens those files.

What are the alternatives to AI Federated Learning?

Skills that share tags, products or a category with AI Federated Learning: C15t (c15t/c15t, 1.9k stars), HIPAA Safe Harbor Coverage Audit (maziyarpanahi/openmed, 5.5k stars), Korean Privacy Terms (kimlawtech/korean-privacy-terms, 587 stars) and Gdpr Compliance (Sushegaad/Claude-Skills-Governance-Risk-and-Compliance, 946 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains AI Federated Learning?

mukul975 (a GitHub user) maintains it in mukul975/Privacy-Data-Protection-Skills, which has 301 GitHub stars. The repository holds 280 skills in this directory. The repository was last updated on March 16, 2026.

Source: mukul975/Privacy-Data-Protection-Skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.