modal-function-sync

Implement Modal functions in modal_functions and sync the generated client into win.

25|1|Updated Feb 10, 2026
One-click install
npx skills add https://github.com/wisdom-in-a-nutshell/agents --skill modal-function-sync-wisdom-in-a-nutshell
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: modal-function-sync
Source: https://github.com/wisdom-in-a-nutshell/agents/tree/main/skills-source/owned/modal-function-sync
Command: npx skills add https://github.com/wisdom-in-a-nutshell/agents --skill modal-function-sync-wisdom-in-a-nutshell

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Keeping Modal serverless functions and their Python client in sync across two repositories is error-prone: registry entries get missed, generated clients drift, and secrets become unmanaged. This Skill enforces a single source-of-truth workflow so Modal functions are implemented, registered, deployed, and consumed consistently. ## Core Features & Use Cases - Guided Modal implementation: Add or update functions under src/functions/, register them in src/registry.py, and wire them into src/deploy.py with validation via tools/validate_registry.py. - Generated client sync: Run scripts/local/sync_win_modal_client.sh to regenerate services/modal/client_generated.py in the win repo, with drift checking via check_win_modal_client_drift.sh. - Secret management checklist: Use the manifest-based flow (modal_secrets_manifest.json plus the local canonical secret store) so stable runtime secrets stay managed instead of drifting. - Use Case: A user says "Implement this pipeline in Modal" — the Skill walks through implementing the function, registering it, syncing the generated client into win, updating tests, and verifying CI deploy. ## Quick Start Use the modal-function-sync skill to implement a new Modal function in modal_functions and sync the generated client into win.

Frequently Asked Questions about modal-function-sync

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a new Modal function and expose it to another repo?▼

Implement the function under src/functions/ in modal_functions, register it in src/registry.py, and update src/deploy.py so Modal ships it. Then run scripts/local/sync_win_modal_client.sh to regenerate the client in win and update call sites and tests.

How do I sync the generated Modal client into the win repository?▼

Run scripts/local/sync_win_modal_client.sh from the modal_functions checkout. It validates the registry, generates ../win/services/modal/client_generated.py, and formats it with win's Ruff config. Never edit the generated file by hand.

How do I check if the win Modal client is out of date?▼

Run scripts/local/check_win_modal_client_drift.sh for a check-only stale-client guardrail that does not mutate win. For fast local validation without touching win, generate to tmp/client_generated.py with tools/generate_modal_client.py.

How should Modal secrets be managed when adding modal.Secret.from_name?▼

Stable runtime secrets should be added to scripts/local/secrets/modal_secrets_manifest.json with a backing entry in the local canonical secret store. Only documented exceptions, such as secrets rotated by another system, may stay outside the manifest.

Why didn't my Modal function deploy after pushing to main?▼

Docs-only changes do not trigger the deploy workflow because it ignores docs/** and *.md paths. Also confirm the function is registered in src/registry.py and referenced in src/deploy.py, since missing registry entries exclude it from the client and deploy.