skyrim-archive

Read, extract, and create BSA/BA2 archives. Use when the user wants to package mod assets, extract files from existing mods, or inspect archive contents.

⭐5stars🔀1forks📁View on GitHub🕐Updated Jan 11, 2026

When & Why to Use This Skill

The Skyrim Archive Module is a specialized Claude skill designed for game modders and developers working with Bethesda Softworks titles. It provides a comprehensive interface to read, extract, and create BSA and BA2 archives, which are essential for managing game assets like textures, meshes, and scripts. By streamlining complex CLI operations, this skill simplifies the asset packaging and inspection process for games including Skyrim (SE/LE), Fallout 4, and Fallout 76.

Use Cases

  • Asset Extraction: Quickly extract specific files such as textures (.dds), meshes (.nif), or scripts (.pex) from existing mod archives for analysis or editing.
  • Mod Packaging: Package custom game assets into compressed BSA or BA2 archives with the correct directory structure for distribution.
  • Archive Inspection: Inspect the metadata, versioning, and file lists of archives to troubleshoot mod conflicts or verify file integrity.
  • Cross-Game Compatibility: Create archives specifically formatted for different game versions, such as converting assets between Skyrim Special Edition and Legendary Edition.
  • Automated Workflows: Use the JSON output capability to integrate archive management into larger automated modding or asset pipeline scripts.
nameskyrim-archive
descriptionRead, extract, and create BSA/BA2 archives. Use when the user wants to package mod assets, extract files from existing mods, or inspect archive contents.

Skyrim Archive Module

Read, extract, and create BSA/BA2 archives using Spooky's AutoMod Toolkit.

Prerequisites

Run all commands from the toolkit directory:

cd "<TOOLKIT_PATH>"
# Example: cd "C:\Tools\spookys-automod-toolkit"

External Tools

Tool Purpose Auto-Download
BSArch Create/extract archives No - manual install

Installing BSArch

  1. Download xEdit from GitHub releases
  2. Extract the archive
  3. Copy BSArch.exe to tools/bsarch/ in the toolkit directory

Check tool status:

dotnet run --project src/SpookysAutomod.Cli -- archive status

Command Reference

Check Tool Status

dotnet run --project src/SpookysAutomod.Cli -- archive status

Get Archive Info

dotnet run --project src/SpookysAutomod.Cli -- archive info "<archive>"

Output includes: Archive type, version, file count, total size.

List Archive Contents

dotnet run --project src/SpookysAutomod.Cli -- archive list "<archive>" [options]
Option Default Description
--filter, -f - Filter pattern (e.g., *.nif, textures/*)
--limit 100 Max files to list (0 = all)

Extract Archive

dotnet run --project src/SpookysAutomod.Cli -- archive extract "<archive>" --output "<dir>" [options]
Option Description
--output, -o Output directory
--filter, -f Filter pattern for files to extract

Requires: BSArch tool installed

Create Archive

dotnet run --project src/SpookysAutomod.Cli -- archive create "<directory>" --output "<file>" [options]
Option Default Description
--output, -o Required Output archive path
--compress true Compress archive contents
--game sse Game type: sse, le, fo4, fo76

Requires: BSArch tool installed

Common Workflows

Inspect Existing Mod Archive

# Get archive info
dotnet run --project src/SpookysAutomod.Cli -- archive info "SomeMod.bsa"

# List first 100 files
dotnet run --project src/SpookysAutomod.Cli -- archive list "SomeMod.bsa"

# List all NIF meshes
dotnet run --project src/SpookysAutomod.Cli -- archive list "SomeMod.bsa" --filter "*.nif"

# List all textures
dotnet run --project src/SpookysAutomod.Cli -- archive list "SomeMod.bsa" --filter "textures/*"

# List all scripts
dotnet run --project src/SpookysAutomod.Cli -- archive list "SomeMod.bsa" --filter "*.pex"

Extract Mod for Analysis/Editing

# Extract entire archive
dotnet run --project src/SpookysAutomod.Cli -- archive extract "SomeMod.bsa" --output "./Extracted"

# Extract only textures
dotnet run --project src/SpookysAutomod.Cli -- archive extract "SomeMod.bsa" --output "./Extracted" --filter "textures/*"

# Extract only meshes
dotnet run --project src/SpookysAutomod.Cli -- archive extract "SomeMod.bsa" --output "./Extracted" --filter "*.nif"

# Extract only scripts for decompilation
dotnet run --project src/SpookysAutomod.Cli -- archive extract "SomeMod.bsa" --output "./Extracted" --filter "scripts/*"

Package Mod as BSA

# 1. Organize files in Data structure
# MyModData/
#   meshes/mymod/weapon.nif
#   textures/mymod/weapon.dds
#   scripts/MyMod_Script.pex

# 2. Create compressed SSE archive
dotnet run --project src/SpookysAutomod.Cli -- archive create "./MyModData" --output "MyMod.bsa"

# 3. Create uncompressed archive (faster loading)
dotnet run --project src/SpookysAutomod.Cli -- archive create "./MyModData" --output "MyMod.bsa" --compress false

# 4. Create LE-compatible archive
dotnet run --project src/SpookysAutomod.Cli -- archive create "./MyModData" --output "MyMod.bsa" --game le

Troubleshooting Workflow

# 1. Check what's in a broken mod's BSA
dotnet run --project src/SpookysAutomod.Cli -- archive list "BrokenMod.bsa" --limit 0

# 2. Extract everything for analysis
dotnet run --project src/SpookysAutomod.Cli -- archive extract "BrokenMod.bsa" --output "./Debug"

# 3. Check mesh textures
dotnet run --project src/SpookysAutomod.Cli -- nif textures "./Debug/meshes/SomeMesh.nif"

# 4. Decompile scripts
dotnet run --project src/SpookysAutomod.Cli -- papyrus decompile "./Debug/scripts" --output "./Debug/Source"

Directory Structure for Packaging

The source directory should mirror Skyrim's Data folder:

MyModData/
  meshes/
    mymod/
      weapon.nif
      armor.nif
  textures/
    mymod/
      weapon.dds
      weapon_n.dds
      armor.dds
  scripts/
    MyMod_MainScript.pex
    MyMod_EffectScript.pex
  sound/
    fx/
      mymod/
        sound.wav

Archive Types

BSA (Bethesda Softworks Archive)

  • Used by: Skyrim LE, Skyrim SE
  • Magic: BSA\0
  • Supports compression
  • Best for general mod assets

BA2 (Bethesda Archive 2)

  • Used by: Fallout 4, Fallout 76
  • Magic: BTDX
  • Two storage types: General, Textures
  • Better compression for textures

Game Type Selection

Game Flag Notes
sse Skyrim SE/AE Default, most common
le Skyrim LE Older format
fo4 Fallout 4 BA2 format
fo76 Fallout 76 BA2 format

Common Issues

BSArch Not Found

# Check status
dotnet run --project src/SpookysAutomod.Cli -- archive status

# Follow installation instructions if missing

Wrong Archive Format

  • SSE mods need SSE archives (--game sse)
  • LE mods need LE archives (--game le)
  • Using wrong format causes purple textures or crashes

Missing Files After Packaging

  • Ensure correct directory structure
  • Files must be in proper subfolders (meshes/, textures/, etc.)
  • Case sensitivity may matter

Important Notes

  1. BSArch required for create/extract - info/list work without it
  2. Match archive to game - SSE and LE use different formats
  3. Directory structure matters - Must mirror Data folder
  4. Compression trade-off - Smaller files but slower loading
  5. Use --json flag for machine-readable output when scripting

JSON Output

All commands support --json for structured output:

dotnet run --project src/SpookysAutomod.Cli -- archive info "MyMod.bsa" --json

Example response:

{
  "success": true,
  "result": {
    "fileName": "MyMod.bsa",
    "type": "BSA",
    "version": "105",
    "fileCount": 150,
    "fileSize": 52428800
  }
}