Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

Back to skills

Generating Python Installer

ASecurity

Use when commercial-grade Python installer expert for Windows: Nuitka extreme compilation, dist slimming, DLL footprint analysis, and Inno Setup packaging to ship the smallest, fastest installers. Use only for advanced packaging/optimization (... Triggers on \"generating-python-installer\", \"generating python installer\", \"installer\".

2 stars
0 votes
0 copies
0 views
Added 9/19/2026
ai-agentspythongoc++

Security Analysis

A100/100

Scanned 9/19/2026

Install to Claude Code

$npx -y skills add majinmagros/magros.ai-skills --skill generating-python-installer --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Generating Python Installer?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Generating Python Installer
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majinmagros-generating-python-installer/badge)](https://www.skillsdirectory.com/skills/majinmagros-generating-python-installer)

More formats (shields.io, HTML) on the badges page.

Download Zip
Files
SKILL.md
---
name: generating-python-installer
description: "Use when commercial-grade Python installer expert for Windows: Nuitka extreme compilation, dist slimming, DLL footprint analysis, and Inno Setup packaging to ship the smallest, fastest installers. Use only for advanced packaging/optimization (... Triggers on \"generating-python-installer\", \"generating python installer\", \"installer\"."
---

# Generating Python Installer (Commercial-Grade)

You are a **Python commercial deployment expert**. Goal: **smallest, fastest-starting, cleanest** Windows installer via **Nuitka folder mode (dist) + Inno Setup** — no single-file builds, no console window. Scripts em `scripts/`, guia em `references/build-guide.md`.

## When to Activate

Activate for **advanced** Python packaging or size/startup optimization on Windows:

- Nuitka extreme / commercial-grade compilation, smallest-size or fastest-startup builds
- "exe 有 400 MB,怎么瘦身" → DLL analysis + headless swaps + dist slimming
- "安装后在纯净系统打不开" → arch-matched VC++ redistributable in Inno Setup

## How It Works

1. **Confirm build parameters** — app name, version, publisher, exe name, source/output dirs, icon. Never auto-fill; ask the user.
2. **Verify the source build** — console disabled, LTO enabled, VC++ runtime present.
3. **Compile with Nuitka** using the module-exclusion and plugin strategy below.
4. **Slim the `dist` folder** — strip debug symbols, caches, tests, and docs, with safeguards for runtime-required metadata.
5. **Analyze DLLs** to find and trim the largest dependencies.
6. **Package with Inno Setup** — LZMA2 ultra compression, full metadata, residue-free uninstall, and an arch-matched VC++ redistributable.

## Examples

- "用 Nuitka 把这个 PySide2 项目打成最小体积的商业安装包" → full workflow: recommend 32-bit, exclude WebEngine/3D/Charts, slim `dist`, package with Inno Setup.
- "我的 exe 有 400 MB,怎么瘦身到一半" → analyze DLLs, switch to `opencv-python-headless`, drop `opengl32sw`, apply `dist` slimming.
- "安装后在纯净系统打不开" → ensure the matching-arch VC++ redistributable is bundled in the Inno Setup script.

## Workflow Resumido (WARNING: 严格执行)

**步骤 1 — 参数确认(禁止默认值)**:软件名称、版本号、发布者、exe 名、源路径(dist 绝对路径)、输出路径、图标、官网——逐一确认(可"跳过")。

**步骤 2 — 编译检查**:`--windows-console-mode=disable`(去黑窗)+ `--lto=yes` + VC++ 运行库已含。回复"确认"才继续。

**步骤 3 — 生成代码**:`scripts/setup.iss`(完整元数据 + 卸载图标修复 + LZMA2 ultra64 + 中文 + VC++ 块注释内)。

**Nuitka**:32 位 Python(−20~30%,内存<2GB 时)·排除清单(省 30-50 MB)· Tkinter 目标 80-120 MB · PySide 120-250 MB(去 WebEngine/3D/Charts)。`scripts/build_optimized.bat` 一键编译 + 调 `scripts/slim_dist.ps1`(7 步清理,省 15-30%)。**优化组合全部:−45~65% 体积,+15~25% 启动,零风险。不用 UPX。**

**DLL**:`python scripts/analyze_dlls.py dist/APP.dist`(>3MB 重点 + 冗余/调试版/VC++ 检查 + 逐库建议)。**VC++**:`--static-libpython=yes` 或 setup.iss 捆绑对应架构(32 位→x86)。

```batch
REM 最小可用编译(Tkinter):
nuitka --standalone --windows-console-mode=disable --lto=yes ^
    --enable-plugin=tk-inter --enable-plugin=anti-bloat ^
    --python-flag=no_docstrings --output-dir=dist main.py
```

FAQ condensado:无反应→CMD 看错/VC++/重编;体积→32 位+排除+anti-bloat+瘦身+DLL;误报→白名单/签名/不用 UPX;SmartScreen→EV 证书。详情 `references/build-guide.md`。

## Checklist Rápido

- [ ] Parâmetros confirmados com o usuário (sem defaults)
- [ ] `--windows-console-mode=disable` + `--lto=yes` + VC++ OK
- [ ] `build_optimized.bat` → `slim_dist.ps1` → `analyze_dlls.py`
- [ ] `setup.iss` com GUID único + VC++ da arquitetura certa

Attribution

majinmagrosmajinmagros
View sourceMore from majinmagros →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Caveman

Ultra-compressed communication mode. Cuts token usage ~75% by speaking like caveman while keeping full technical accuracy. Supports intensity levels: lite, full (default), ultra, wenyan-lite, wenyan-full, wenyan-ultra. Use when user says "caveman mode", "talk like caveman", "use caveman", "less tokens", "be brief", or invokes /caveman. Also auto-triggers when token efficiency is requested.

1023331 votes

Hyperplan

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...

686011 votes

Mcp Code Execution

Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.

3331 votes

catchup

Recovers prior coding-agent session context by running `catchup <agent> --since-compact`, which extracts a clean summary of a previous Codex, Claude Code, Antigravity, OpenCode, or Pi Agent session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", or asks to recover/summarize a previous session before continuing. Do NOT use for the current conversation, git history, or any non-agent log.

611 votes

math-skill

A comprehensive mathematical reasoning skill for AI assistants — handles arithmetic to research-level problems with rigorous step-by-step reasoning, systematic verification, and transparent uncertainty handling

381 votes
View all in ai-agents →