agentleFS
WingedGuardianWingedGuardian/skyrimvr-claude-toolkit/.claude/skills/triage-and-conflicts/SKILL.md

triage-and-conflicts

Skill22 starsChanged 4 days agoMITView on GitHub

Which plugin actually wins a record (skyrim-winner, full load order via xEdit), Papyrus log triage, CrashLogger crash-dump triage, which SKSE plugin DLLs loaded (skse-load-status), what a mod archive would change before install (archive-triage), a recorded manual install (mod-install), keeping logs a relaunch would overwrite (mirror-launch-logs), ESP cross-reference snapshots around bulk edits, what LOOT would say about the active order (loot-advisor, read-only), and how these tools pick a folder when more than one Skyrim install exists. Use for override/conflict questions, Papyrus.N.log or crash-log analysis, and before any bulk ESP operation.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read-only: it lists the archive with 7-Zip (docs/installing-tools.md pins it), maps each entry onto where it would land, and compares CRCs …

    line 158
  2. Distinctive:

    Prefer the user's mod manager.

    line 186
  3. Very specific:

    Every replaced file is backed up and every written file recorded with its SHA-256, under .claude/backups/manual-installs/ (or …

    line 198

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md
<!-- GENERATED by scripts/gen_agent_trees.py from agent/skills/triage-and-conflicts/SKILL.md. Toolkit contributors: edit the source. Your own notes belong in KNOWLEDGEBASE.local.md, which updates never replace. -->

Triage and conflicts

skyrim-winner — which plugin actually wins a record

bash tools/skyrim-winner.sh winner    0x0003418E            # who wins
bash tools/skyrim-winner.sh chain     0x0003418E            # full override chain, in order
bash tools/skyrim-winner.sh winner    "SomeMod.esp:000871"  # scoped: local id inside a plugin
bash tools/skyrim-winner.sh conflicts "SomeMod.esp"         # records this plugin LOSES

Requires xeditlib (install: docs/installing-tools.md). The game root is derived from the script's own location (tools/ sits in the game folder); override with $GAME_ROOT.

It deliberately has no index and no cache. xEdit already computes conflict resolution correctly, and the load order is explicit and total, so this asks xEdit through xelib and prints the answer — one source of truth, and it is not this script. A full 659-plugin load costs ~4 seconds on the dev install, which is why a cache — and therefore a freshness contract to get wrong — is unnecessary.

Prefer it over hand-rolling another override script. The common shortcut is to load a hand-picked subset of plugins "that could plausibly be involved". A who-wins answer computed against a guessed subset is only as complete as the guess: a plugin outside the list can win and the script never sees it. Worse, a short list can silently load nothing and still resolve, producing a confident answer from an empty tree.

Judge by the wrapper's exit code, not node's. node tools/skyrim-winner.js exits 127 on complete success (koffi/stdio shutdown; skill xelib) — skyrim-winner.sh parses the RESULT: line and gives a real exit code (0 ok / 2 error / 3 did-not-finish).

⚠ A refs subcommand is deliberately absent. getReferencedBy returns 0 without buildRefs, and buildRefs: true makes the loader fail outright on a real 659-plugin order (reproduced twice, empty exception message). A subcommand that always answers "nothing references this" is worse than no subcommand.

papyrus-triage — what the engine actually complained about

python tools/papyrus-triage.py                    # newest Papyrus log
python tools/papyrus-triage.py <logfile> --all

A hand-rolled grep | sort | uniq -c has no way to notice it dropped a shape. Two properties are asserted here, not assumed: rows sum to the input, and the not-shown row prints even when it is zero.

The unit of accounting is the ENTRY, not the line. A Papyrus entry is multi-line — the dev install's Papyrus.1.log has 8426 lines but only 5292 timestamped entries, the rest being stack: continuations. A line-based sum is ~37% wrong.

Severity is spelled two ways. The same log contains both warning: (99) and WARNING: (662); a case-sensitive grep silently loses 87% of them.

Known-benign vanilla shapes are labelled, never dropped — ranking attention is the job; deciding what the reader may see is not.

crash-triage — which crashes are new, and which are already answered

python tools/crash-triage.py                 # every crash dump in the SKSE folder
python tools/crash-triage.py <one.log>

A CrashLogger dump is ~5,500 lines, ~4,600 of which are the raw STACK block. The identifying part is the exception line plus the top of PROBABLE CALL STACK. This groups dumps by module+offset and cross-references a KNOWN dict of signatures you have already ruled on — so a settled crash prints as [ACCEPTED - do not re-investigate] instead of being chased a fourth time. Add your own rulings to that dict as you make them, keyed by module AND offset (("skyrimvr.exe", "0B84F05"): module in lower case, offset in upper case), so an offset in another module stays unknown; it ships with the three from the dev install and is meant to be edited.

It matches crash-*.txt AND crash-*.log, case-insensitively, because CrashLoggerSSE changed extension. Matching one of them does not fail — it prints a confident, complete-looking total built from whichever half it happened to catch. Measured on the dev install: 8 .txt (all June 2025) sitting beside 20 .log (2026).

Same invariants as papyrus-triage: denominator first, rows summing to independently counted totals, and the not-shown row printing at zero. Both are mutation-tested — dropping logs during parsing produces ACCOUNTING MISMATCH and exit 1.

skse-load-status — what SKSE did with each plugin DLL

python tools/skse-load-status.py                  # every DLL SKSE checked at the last launch
python tools/skse-load-status.py spell            # filter: DLL file name OR the name it reports
python tools/skse-load-status.py --log <file>     # a specific log

Many SKSE plugins carry no Windows version resource, so a DLL's file properties cannot say which build is installed. SKSE's own log can: per DLL, the version the plugin reports about itself (printed raw, as logged -- authors encode it differently, so compare it with a known build, never with a Nexus version string) and the verdict: loaded, reported as incompatible (during query or load), not an SKSE plugin, or an SKSE64 error such as an outdated Address Library.

It reads sksevr.log (VR) or skse64.log (SE/AE, including the GOG and Epic folders), newest wins, and always names the file it read and how old it is: the log describes the last launch, not the DLLs on disk now. Rows must sum to the plugins checked; a mismatch prints ACCOUNTING MISMATCH and exits 1. Override the folder with $SKSE_LOG_DIR.

postmortem, plugin-check, missing-textures — for the agent, read-only (v4.1.0)

python tools/postmortem.py [--json]                 # the last session: crash (this session or older), Papyrus, SKSE
python tools/plugin-check.py [--json]               # missing/unreadable plugins, masters missing, inactive, out of order
python tools/missing-textures.py MESH... | --under 'meshes/armor/**/*.nif'   # needs the House Carl gateway

postmortem is the first look after a crash or a bad session: it combines the three tools above for the newest logs. plugin-check is a check before acting on plugins, not a player warning (Wrye Bash and the mod manager already show missing masters). missing-textures asks House Carl which texture-set paths the meshes embed and whether a loose file or active BSA provides each; an incomplete archive read exits 2, never "none missing". On an install whose House Carl integration predates the v4.1.0 issue-#11 fix, base BSAs can be left out without that flag: re-run setup first. All three exit 0 nothing found, 1 findings, 2 could not check.

loot-advisor — what LOOT would say, without changing anything (v4.1.0)

python tools/loot_advisor.py [--json] [--offline]   # LOOT's order + masterlist messages for the ACTIVE plugins

It asks libloot (LOOT's own library; wheels ship for Python 3.10-3.13 on Windows x64, elsewhere python tools/libloot/build.py build) for the order LOOT would sort the active plugins into, the fewest plugins that order moves, and the masterlist's messages: warnings, dirty plugins (ITM / deleted-reference counts and the cleaner to use), requirements that are missing and incompatibilities that are both active. The masterlist is the newest LOOT publishes for this libloot, fetched at run time; a failed fetch uses the last copy and says so. It never writes plugins.txt, loadorder.txt or LOOT's files. A move is advice: Wrye Bash or the mod manager owns the order, and on a kept save read ## My preferences in KNOWLEDGEBASE.local.md before reordering anything. Exit 0 nothing to add, 1 findings, 2 could not check. Details: docs/loot.md.

mirror-launch-logs — keep the logs the next launch would overwrite

python tools/mirror-launch-logs.py                # after a session, or before the next launch

The game and its plugins overwrite their logs every launch (Papyrus.0.log rotates, the SKSE log starts empty). This copies the SKSE folder's logs and crash dumps and the Papyrus logs into .claude/backups/log-mirror/ (never shipped), one shot, no background process. A grown log costs only its new bytes, an unchanged one no write; a truncated or replaced one keeps the previous copy as <name>.replaced-<time>, so nothing is overwritten or deleted. A log that shrinks while it is being read is reported SHORT (exit 1); run it again. Run it before triaging a problem from an earlier launch, then point papyrus-triage or crash-triage at the mirrored file.

archive-triage — what a mod archive would change, before it is installed

python tools/archive-triage.py <archive>            # .7z / .zip / .rar
python tools/archive-triage.py <folder> --all       # every archive in a folder, every file listed
python tools/archive-triage.py <archive> --data "<MO2 mods>/<mod name>"   # compare against one MO2 mod

Read-only: it lists the archive with 7-Zip (docs/installing-tools.md pins it), maps each entry onto where it would land, and compares CRCs with what is installed: NEW, SAME, CHANGED, or NO CRC (the listing had none; never guessed as CHANGED). FOMOD option folders show as separate groups, and they are alternatives, not all installed.

  • Every destination outside Data/ is listed one by one (never summarised: game-folder binaries, enbseries/, reshade-shaders/, a Root/ folder, and entries under no Data root), each flagged outside Data/ -- check this is intended. Some mods legitimately install there (the SKSE loader, ENB or ReShade DLLs); read the list and decide, and tell the user before anything lands outside Data/.
  • CHANGED on a plugin is an update's change OR the user's own edit of the installed copy: the tool cannot tell which. Compare with the installed version's original archive before overwriting.
  • CHANGED on a config (.ini, .toml, .json) would overwrite the user's settings.
  • On VR, each DLL is searched for VR build markers. That is a heuristic: markers are evidence, their absence proves nothing. On SE/AE the check is skipped and the output says so.
  • Under Mod Organizer 2 the game's Data/ holds only what was installed there directly; pass --data with the mod's folder under MO2's mods/.

Entry names are printed with control characters escaped, and the rows must sum to the entries listed (accounting OK; a mismatch exits 1). An archive 7-Zip cannot list exits 2.

mod-install — a manual install, recorded and reversible

python tools/mod-install.py <archive>                      # DRY RUN: the triage report, then the plan
python tools/mod-install.py <archive> --group "Option A"   # an option (FOMOD) archive: pick ONE group
python tools/mod-install.py <archive> --apply              # write it

Prefer the user's mod manager; use this when the user installs by hand, never a bare copy. Nothing here is enforced by a guard: the checks are yours.

  1. Dry run first, and read every destination it prints. Anything flagged outside Data/ goes to the user before --apply: it is not refused (the SKSE loader and ENB/ReShade files legitimately go there), so you are the check.
  2. --apply, with the same arguments.
  3. Check the result: exit 0, the manifest's # STATUS: complete, N file(s), 0 verify mismatch(es) line, and archive-triage.py on the same archive now showing the installed files as SAME. For a DLL, the SKSE log line after the next launch (skse-load-status.py). Exit 1 = a written file did not match its staged copy: report it, and restore from the backup folder.
  • Every replaced file is backed up and every written file recorded with its SHA-256, under .claude/backups/manual-installs/ (or $SKYRIM_MANUAL_INSTALLS): <name>.files.txt and backups/<name>-<stamp>-<id>/ (the manifest's header names the exact folder). That is the uninstall.
  • An existing .ini/.toml/.json is kept; the archive's copy lands beside it as <file>.new to merge (--overwrite-config to replace it, backed up).
  • Writes go to a temp file swapped in, so a hardlinked file is replaced, not written through; each file is re-hashed (a mismatch exits 1). Plugins are copied but never activated.
  • Mod Organizer 2 configured: it installs a NEW mod folder <MO2 mods>/<name>/ (enable it in MO2); game-folder files are held back unless --game-root-files. An existing folder is refused unless --update, which first moves the whole old folder into the backups (the manifest names it) and carries over the user's configs and MO2's meta.ini. Vortex present: it warns that Vortex may later overwrite or purge these files.

Where these tools look, and what happens when there is more than one install

papyrus-triage, crash-triage and skse-load-status discover their folders through tools/skyrim_paths.py rather than hardcoding a path. A machine can easily carry Documents/My Games/Skyrim, .../Skyrim Special Edition and .../Skyrim VR at once, and the wrong one reads perfectly — you get a complete report about an install you are not modding.

So the picker prefers Skyrim VR → Skyrim Special Edition (then its GOG and Epic folders) → Skyrim, and whenever more than one candidate exists it prints every rival it ignored, to stderr, naming the override:

[skyrim_paths] more than one candidate exists; using:
  C:\Users\you\Documents\My Games\Skyrim VR\SKSE
  ignoring: C:\Users\you\Documents\My Games\Skyrim Special Edition\SKSE
  ...  If this picked wrong, set SKSE_CRASH_DIR.

Overrides: $PAPYRUS_LOG_DIR, $SKSE_CRASH_DIR, $SKSE_LOG_DIR, and $PLUGINS_TXT (for the xelib load-order reader, which faces the same hazard under %LOCALAPPDATA%).

ESP Cross-Reference Integrity (tools/esp-verify-wrapper.sh)

Guards against the silent re-mastering / dropped-reference corruption class during bulk ESP operations (mod splits, plugin renames, master-list edits, YAML find-replace). Tool-agnostic; snapshots stored outside the game dir so it never trips the edit hooks.

  • bash tools/esp-verify-wrapper.sh snapshot Data/Mod.esp [...] — before a risky op
  • bash tools/esp-verify-wrapper.sh verify Data/Mod.esp [...] — after; exits 1 + loud report on any reference whose target master changed or vanished
  • bash tools/esp-verify-wrapper.sh guard Data/Mod.esp [...] -- <command...> — snapshot → run → verify, one shot

Standing practice: snapshot before, verify after, ANY bulk ESP operation. If a change is intended, re-run snapshot to accept it as the new baseline.

Download now (ZIP)

Does 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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.