Agent skill

Designing Federated Learning Architecture

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

Architecture guide for GDPR-compliant federated learning systems.

Apache-2.0Auto-check passedLegal & Compliance

Install Designing Federated Learning Architecture

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

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

GitHub CLI
$ gh skill install mukul975/Privacy-Data-Protection-Skills designing-federated-learning-architecture --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/designing-federated-learning-architecture .claude/skills/designing-federated-learning-architecture && 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
designing-federated-learning-architecture
GitHub stars
301
Token cost
~2.5k tokens
SKILL.md length
835 words
Files
5 (incl. scripts, references, assets)
Skills in repo
280
Repo updated
First seen
Licence
Apache-2.0

At a glance

Architecture guide for GDPR-compliant federated learning systems.

  • Works in 3 steps: Pairwise masking (Bonawitz et al., 2017)… → Threshold secret sharing — Each… → Homomorphic encryption — Participants…
  • Tasks that involve Privacy and GDPR
  • SKILL.md covers Overview, FL Architectures, Aggregation Strategies and Privacy Guarantees, plus 3 more sections
  • Runs Python scripts from its folder

What it does

Designing Federated Learning Architecture is an agent skill from mukul975/Privacy-Data-Protection-Skills. Architecture guide for GDPR-compliant federated learning systems. Covers horizontal and vertical FL, aggregation strategies (FedAvg, FedProx), communication efficiency, secure aggregation, and differential privacy integration. Includes privacy guarantees analysis and deployment patterns for cross-organizational ML without data sharing.

Its SKILL.md is about 2.5k 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. 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

Example prompts

  • “/designing-federated-learning-architecture”

Requirements

  • Python 3

Workflow steps

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

  1. Pairwise masking (Bonawitz et al., 2017) — Each pair of participants generates a shared random mask. Masks cancel out in the sum, but…
  2. Threshold secret sharing — Each participant secret-shares their update; the server reconstructs only the aggregate.
  3. Homomorphic encryption — Participants encrypt updates; server aggregates ciphertexts.

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

Designing Federated Learning Architecture loads about 2.5k tokens when it runs, and up to ~4.9k if it reads all its reference files. Until then it costs about 95 tokens; SKILL.md has 835 words of instructions outside code blocks.

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

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). 835 words, ~2,451 tokens.

Download SKILL.mdSave it as .claude/skills/designing-federated-learning-architecture/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
designing-federated-learning-architecture
description
Architecture guide for GDPR-compliant federated learning systems. Covers horizontal and vertical FL, aggregation strategies (FedAvg, FedProx), communication efficiency, secure aggregation, and differential privacy integration. Includes privacy guarantees analysis and deployment patterns for cross-organizational ML without data sharing.
license
Apache-2.0
metadata.author
mukul975
metadata.version
1.0
metadata.domain
privacy
metadata.subdomain
privacy-by-design
metadata.tags
federated-learning, fedavg, secure-aggregation, distributed-ml, privacy-preserving-ml

Designing Federated Learning Architecture

Overview

Federated Learning (FL) enables multiple parties to collaboratively train a machine learning model without sharing their raw data. Each participant trains a local model on their own data and shares only model updates (gradients or parameters) with a central aggregator. The aggregated model benefits from all participants' data without any single party accessing another's dataset.

FL directly supports GDPR Article 5(1)(c) data minimization (only model updates are shared, not personal data), Article 25(1) data protection by design (privacy is built into the architecture), and can reduce the need for cross-border data transfers under Chapter V (data stays in its jurisdiction of origin).

FL Architectures

Horizontal Federated Learning

Participants share the same feature space but have different data samples. Each participant has a complete record for their subjects but covers different subjects.

┌──────────────────────────────────────────────────────────────┐
│                    Central Aggregator                          │
│               (aggregates model updates only)                 │
│                                                                │
│  Global Model = Aggregate(Local_1, Local_2, ..., Local_K)    │
└─────────────┬──────────────┬──────────────┬──────────────────┘
              │              │              │
    ┌─────────▼────┐ ┌──────▼──────┐ ┌────▼──────────┐
    │ Hospital A   │ │ Hospital B  │ │ Hospital C    │
    │ 5,000 pts    │ │ 8,000 pts   │ │ 3,000 pts     │
    │ Same features│ │ Same features│ │ Same features │
    │ Train locally│ │ Train locally│ │ Train locally │
    └──────────────┘ └─────────────┘ └───────────────┘

Use case: Multiple hospitals training a diagnostic model; each hospital has complete patient records but different patients.

Vertical Federated Learning

Participants share the same data subjects but have different features. Features are distributed across participants.

┌──────────────────────────────────────────────────────────────┐
│                    Coordination Server                         │
│         (aligns features without exposing raw data)           │
└─────────────┬──────────────┬──────────────┬──────────────────┘
              │              │              │
    ┌─────────▼────┐ ┌──────▼──────┐ ┌────▼──────────┐
    │ Bank         │ │ Insurer     │ │ Retailer      │
    │ Financial    │ │ Claims      │ │ Purchase      │
    │ features     │ │ features    │ │ features      │
    │ Same users   │ │ Same users  │ │ Same users    │
    └──────────────┘ └─────────────┘ └───────────────┘

Use case: Credit scoring where a bank has financial data, an insurer has claims history, and a retailer has purchase behavior — all for overlapping customers.

Aggregation Strategies

FedAvg (Federated Averaging)

The foundational FL algorithm (McMahan et al., 2017). Each participant trains for multiple local epochs, then the aggregator averages the model weights proportional to each participant's dataset size.

For each communication round t:
  1. Server sends global model w_t to selected participants
  2. Each participant k trains locally for E epochs on their data:
     w_k = LocalSGD(w_t, data_k, E epochs, learning_rate η)
  3. Server aggregates:
     w_{t+1} = Σ (n_k / n) * w_k
     where n_k = participant k's sample count, n = total samples
ParameterRecommended RangeImpact
Local epochs (E)1-5More epochs = less communication, but higher divergence risk
Participation rate10-100% per roundHigher = better convergence, more communication
Learning rate (η)0.01-0.1Standard SGD tuning applies
Communication rounds50-500Depends on data heterogeneity and model complexity
FedProx (Federated Proximal)

Extension of FedAvg for heterogeneous settings. Adds a proximal term to the local objective to limit how far local models drift from the global model. Suitable when participants have non-IID (non-independently and identically distributed) data.

Local objective for participant k:
  minimize F_k(w) + (μ/2) * ||w - w_t||^2

  where μ controls the strength of the proximal regularization
ScenarioFedAvg PerformanceFedProx PerformanceRecommendation
IID data across participantsGoodGoodFedAvg (simpler)
Mild non-IID (label skew)ModerateGoodFedProx (μ=0.01)
Severe non-IID (feature shift)PoorModerateFedProx (μ=0.1) + larger participation
Participants with varying computeUnstableStableFedProx (handles partial work)

Privacy Guarantees

Threat Model
ThreatDescriptionMitigation
Gradient inversionAdversary reconstructs training data from shared gradientsSecure aggregation + differential privacy
Membership inferenceAdversary determines if a specific record was in training dataDifferential privacy
Model inversionAdversary recovers sensitive features from the trained modelDifferential privacy + access control on model
Free-rider attackParticipant contributes noise instead of genuine updatesContribution verification (FoolsGold, RFFL)
Poisoning attackMalicious participant corrupts the global modelByzantine-robust aggregation (Krum, trimmed mean)
Secure Aggregation

Secure aggregation ensures the server sees only the sum of all participants' updates, not individual updates. Implemented using:

  1. Pairwise masking (Bonawitz et al., 2017) — Each pair of participants generates a shared random mask. Masks cancel out in the sum, but individual updates remain hidden.
  2. Threshold secret sharing — Each participant secret-shares their update; the server reconstructs only the aggregate.
  3. Homomorphic encryption — Participants encrypt updates; server aggregates ciphertexts.
Show full SKILL.md (335 more words)Show less
Differential Privacy in FL

Adding calibrated noise to model updates before sharing provides a formal privacy guarantee:

DP-FedAvg:
  1. Each participant clips gradients: ||g_k|| ≤ C (sensitivity bounding)
  2. Each participant adds Gaussian noise: g_k' = g_k + N(0, σ²·C²·I)
  3. Server aggregates noised updates: g_agg = (1/K) Σ g_k'
  4. Privacy accounting: track cumulative (ε, δ) via Rényi DP composition

Privacy budget for Prism Data Systems AG FL deployment:

ParameterValueJustification
Clipping norm (C)1.0Standard for gradient clipping in DP-SGD
Noise multiplier (σ)1.1Provides (ε=3, δ=1e-5) per training run with 500 rounds
Target epsilon (ε)3.0Moderate privacy for non-special-category data
Target delta (δ)1e-5Standard for n ≈ 316,000 total records
Composition methodRényi DPTighter composition bounds than basic composition

Communication Efficiency

TechniqueCompression RatioAccuracy ImpactDescription
Gradient quantization8-32xMinimalReduce gradient precision from 32-bit to 8-bit or lower
Top-k sparsification10-100xModerateTransmit only the k largest gradient components
Federated dropout2-10xMinimalEach participant trains a random submodel
Gradient compression (SignSGD)32xModerateTransmit only the sign of each gradient component
Model distillationVariableModerateParticipants share soft predictions instead of gradients

Implementation Workflow

  1. Define the ML task — Specify the model architecture, training objective, and evaluation metrics.

  2. Assess data distribution — Evaluate the degree of non-IID across participants. This determines the aggregation strategy (FedAvg for IID, FedProx for non-IID).

  3. Select privacy mechanisms — Choose secure aggregation for gradient confidentiality and differential privacy for formal guarantees. Set epsilon budget.

  4. Configure communication — Select gradient compression technique based on bandwidth constraints. Set the communication round budget.

  5. Implement local training — Deploy the local training pipeline at each participant. Implement gradient clipping and noise injection for DP.

  6. Deploy aggregation server — Deploy the central aggregator with secure aggregation protocol. Implement Byzantine-robust aggregation if untrusted participants exist.

  7. Monitor and evaluate — Track model convergence, per-participant contribution quality, privacy budget consumption, and communication overhead.

Key Regulatory References

  • GDPR Article 5(1)(c) — Data minimization (only model updates shared)
  • GDPR Article 25(1) — Data protection by design
  • GDPR Article 26 — Joint controller arrangements (FL consortium governance)
  • GDPR Chapter V — Cross-border transfers (FL reduces transfer need)
  • GDPR Article 35 — DPIA for FL involving special category data
  • EDPB Guidelines 4/2019 on Article 25 Data Protection by Design and by Default

© 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/designing-federated-learning-architecture 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

Designing Federated Learning Architecture 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.

Designing Federated Learning Architecture compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Designing Federated Learning Architecture this skillmukul975/Privacy-Data-Protection-Skills301—~2.5kAutomated 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 Designing Federated Learning Architecture

What does Designing Federated Learning Architecture do?

Architecture guide for GDPR-compliant federated learning systems. Designing Federated Learning Architecture is an agent skill from mukul975/Privacy-Data-Protection-Skills. Architecture guide for GDPR-compliant federated learning systems.

When should I use Designing Federated Learning Architecture?

Designing Federated Learning Architecture fits situations like: tasks that involve Privacy and GDPR.

How do I install Designing Federated Learning Architecture in Claude Code?

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

How do I install Designing Federated Learning Architecture in Codex?

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

Can I use Designing Federated Learning Architecture 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 designing-federated-learning-architecture -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/designing-federated-learning-architecture, .gemini/skills/designing-federated-learning-architecture, .github/skills/designing-federated-learning-architecture and .opencode/skills/designing-federated-learning-architecture in your project.

What does Designing Federated Learning Architecture need to run?

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

Does Designing Federated Learning Architecture 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 Designing Federated Learning Architecture 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 Designing Federated Learning Architecture use?

Designing Federated Learning Architecture 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 Designing Federated Learning Architecture use?

About 2.5k tokens (SKILL.md is roughly 9.8k 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 2.4k tokens, read only when the agent opens those files.

What are the alternatives to Designing Federated Learning Architecture?

Skills that share tags, products or a category with Designing Federated Learning Architecture: 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 Designing Federated Learning Architecture?

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.