gemini-skill-packager
Skill1 starsChanged 5 months agoMITView on GitHub
Transpile, sanitize, validate, and package any agent skill into a zero-rejection lossless ZIP bundle for gemini.google.com. Use when preparing skills for Gemini Apps upload, fixing upload rejections, converting Claude or Codex skills to Gemini, or packaging custom skills.
In this repository19 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- agy-skill-installerSkill
- apex-bug-hunterSkill
- arsSkill
- browser-triageSkill
- claude-md-initSkill
- delink-githubSkill
- gh-readySkill
- indian-legal-verificationSkill
- local-systematic-verification-ocrSkill
- magento-team-leadSkill
- merge-gateSkill
- motioncraftSkill
- pdf-vector-engineSkill
- presscraftSkill
- score2mdSkill
- skill-shipSkill
- wpcraftSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 9
Read the companion reference documents before making architectural changes:
- Very specific: line 56
Use --ultra-safe when packaging for chat attachment limits (consolidates reference markdown files into an indexed master manual to …
- Distinctive: line 88
Run the automated test suite to ensure the packager and its generated packages conform to all standards:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Gemini Skill Packager
Transpile, validate, and package agent skills from any source (local folders, GitHub repositories, Claude Code plugins, Codex skills, or monorepos) into zero-rejection, sandbox-compliant .zip archives designed for immediate upload to gemini.google.com.
Read the companion reference documents before making architectural changes:
references/gemini-upload-rejection-matrix.md: Catalog of all 45+ upload rejection triggers and root causes.references/lossless-transpilation-rules.md: Deterministic transpilation algorithms and frontmatter migration protocols.references/audit-and-losslessness-rubric.md: Verification rubric and falsifiable assertions.
1. Core Workflow Pipeline
The packager runs a four-stage compiler pipeline:
[Source Directory / Archive / Monorepo]
|
v
Stage 1: Ingestion & Normalization (`scripts/ingest_skill_source.py`)
|
v
Stage 2: Lossless Transpilation (`scripts/lossless_gemini_transpiler.py`)
|
v
Stage 3: Deep Audit & Verification (`scripts/validate_and_package_zip.py`)
|
v
[Zero-Rejection <skill-name>.zip Bundle]Stage 1: Ingest & Purge Clutter
Extract source archives or directories, detect the target SKILL.md, isolate the skill boundary, and purge all OS and VCS clutter (.git, .github, .DS_Store, __MACOSX, node_modules, .vscode):
python skills/gemini-skill-packager/scripts/ingest_skill_source.py <source-path-or-archive> -o <staging-directory> [--skill-name <name>]Stage 2: Lossless Transpilation
Apply deterministic transpilation:
- Clean YAML frontmatter: keep only
nameanddescription(plus optional standard keys). - Losslessly migrate all proprietary platform keys (
disable-model-invocation,tools,version,tags) into## Preserved Platform Metadata & Trigger Contractat the head ofSKILL.md. - Safely remap unsupported extensions (
.ts,.sql,.graphql,Makefile, etc.) by appending.txt, and update all relative references across markdown documents. - Bundle JavaScript scripts into
engine_esm_bundle.jsonand generate self-hydrating Python wrappers (.py) writing{"type": "module"}to/tmp/<skill>-runtime/, guaranteeing zero.jsfiles in the final archive. - Preserve Shebang Line-1 Invariant: hashbang directives remain strictly at Line 1 Byte 0.
- Purge marketing bloat (
assets/banner.png,assets/readme-header.svg) and root licenses to protect the 2.0 MB package size budget. - Inject
GEMINI_OFFLINE_ADAPTERinto scripts to ensure graceful offline execution. - Strip zero-width Unicode characters and redact sample API keys.
python skills/gemini-skill-packager/scripts/lossless_gemini_transpiler.py <staging-directory> [--ultra-safe]Use --ultra-safe when packaging for chat attachment limits (consolidates reference markdown files into an indexed master manual to guarantee <= 10 total files).
Stage 3: Audit & Deterministic ZIP Packaging
Audit the staged skill against all Gemini constraints (exact SKILL.md casing, file count ceilings, size budgets, path depth, whitelist compliance) and build a reproducible .zip archive:
- Enforce Web UI synchronous RPC limits:
< 2.0 MBcompressed (hard limit< 3.0 MBto prevent Googlebatchexecute4.00 MiB gRPC overflow). - Enforce Web UI code whitelist: only
.pyand.shexecutable code permitted. - Enforce raster image limits:
<= 8images recommended (consolidates large photo sets into genre contact sheets).
python skills/gemini-skill-packager/scripts/validate_and_package_zip.py <staging-directory> -o <output-path.zip> [--wrap-folder]2. Modes of Operation
- Full Compilation (Default): Ingest, transpile, verify, and package into
<skill-name>.zip. - Pre-Upload Audit Only: Audit an existing prepared folder without creating an archive:
python skills/gemini-skill-packager/scripts/validate_and_package_zip.py <prepared-skill-dir> - Ultra-Safe Consolidated Mode: Guarantees total package file count
<= 10files for chat environments where multi-file archives are capped at 10 attachments.
3. How to Upload to Gemini Apps
- Navigate to
https://gemini.google.comin your web browser. - Open the sidebar navigation menu and click Customize -> Skills.
- Click the Upload button.
- Select the generated
<skill-name>.zipfile (or the transpiled skill folder). - Review the imported skill title, description, and instructions.
- Click Create to save. Gemini can now trigger the skill automatically via semantic matching or directly via
/<skill-name>.
4. Quality & Compliance Verification
Run the automated test suite to ensure the packager and its generated packages conform to all standards:
python skills/gemini-skill-packager/scripts/test_gemini_skill_packager.pyDoes it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

