using-bgs-papyrus

Compile Papyrus .psc files to .pex bytecode and decompile with Guard syntax correction.

11|3|Updated Apr 15, 2026
One-click install
npx skills add https://github.com/BB-84C/bgs-modding-superpowers --skill using-bgs-papyrus
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-bgs-papyrus
Source: https://github.com/BB-84C/bgs-modding-superpowers/tree/main/plugins/bgs-modding-superpowers/skills/using-bgs-papyrus
Command: npx skills add https://github.com/BB-84C/bgs-modding-superpowers --skill using-bgs-papyrus

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Manually compiling and decompiling Papyrus scripts for Bethesda games requires tracking down the correct Creation Kit compiler and Champollion decompiler, configuring paths manually, and fixing compatibility issues like Starfield's Guard syntax that break standard decompilation outputs.

Core Features & Use Cases

  • Automated Toolchain Detection: Automatically finds installed official Creation Kit compilers and Champollion decompilers for Skyrim, Fallout 4, and Starfield, eliminating manual path setup.
  • Papyrus Compilation: Compiles .psc source files to .pex bytecode using official or fallback backends, with support for import directories and compile optimizations.
  • Validated Decompilation: Decompiles .pex bytecode to .psc source with automatic Starfield Guard syntax correction to match official compiler requirements, reducing manual fix-up work.
  • Use Case: If you are modding Starfield and need to patch a broken vanilla quest script, use this skill to decompile the script, adjust the source code, and recompile it to a working .pex file that the game will load correctly.

Quick Start

Use the using-bgs-papyrus skill to compile your custom Fallout 4 quest script to a working .pex file for use in your MO2 mod.

Frequently Asked Questions about using-bgs-papyrus

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

FAQPage Schema
How do I compile Papyrus scripts for Starfield without manually configuring the Creation Kit compiler?

To compile Papyrus scripts for Starfield, this skill automatically detects installed official Creation Kit compilers and uses fallback backends, eliminating manual path setup. It compiles .psc source files to .pex bytecode with support for import directories and compile optimizations.

Why does decompiling Starfield Papyrus bytecode break standard decompiler output?

Decompiling Starfield Papyrus bytecode breaks standard output because of Starfield's Guard syntax. This skill provides validated Guard syntax correction for decompiled .psc source files, automatically fixing the output to match official compiler requirements and reducing manual fix-up work.

Can I decompile Fallout 4 .pex files back to .psc source code?

Yes, you can decompile Fallout 4 .pex bytecode back to .psc source code. The skill automatically detects installed Champollion decompilers for Skyrim, Fallout 4, and Starfield to convert bytecode into readable source without manual toolchain configuration.

What is the best way to patch a broken vanilla quest script in Starfield modding?

The best way to patch a broken vanilla Starfield quest script is to decompile the .pex file to .psc source, adjust the code, and recompile it. This skill automates the toolchain detection and validates Guard syntax for a working output file.

Does this Papyrus compilation workflow support integration with AI agent processes?

Yes, the Papyrus compilation and decompilation workflow supports AI agent integration. The skill provides JSON-formatted envelopes for its compilation and decompilation outputs, enabling seamless automated processing within AI agent workflows.

Do I need to manually set up Champollion to decompile Papyrus scripts for Skyrim?

No, you do not need to manually set up Champollion to decompile Skyrim Papyrus scripts. The skill features automated toolchain detection that automatically finds installed Champollion decompilers and Creation Kit compilers to streamline the process.