OpenParable
Skip to content
← Back to skills

Xaml Guard

Testing & Quality
xaml-guard

Xaml Guard is an Agent Skill for testing & quality published in the abbaye/WpfHexEditorIDE repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

INTERNAL DEV WORKFLOW for WpfHexEditor — Claude self-invokes after editing any *.xaml, *.resx, or *Resources.Designer.cs file to detect regressions in the high-incident XAML/resx/loc domain (hardcoded user-strings, XAML patcher corruption, resx malformed, key drift, HexEditor Resources alias, MessageBox in code-behind, ContextMenu transparency, DockPanel-row alignment). Skip on: pure structural attribute edits (Grid.Row, Margin, Width).

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/abbaye/WpfHexEditorIDE/blob/HEAD/Sources/.claude/skills/xaml-guard/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/xaml-guard, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

xaml-guard (internal)

Layered guard for the highest-incident surface in project memory: adr_007_xaml_patcher_bug, feedback_resx_satellite_corruption, feedback_localization_new_strings, feedback_resources_alias_hexeditor, bug_contextmenu_transparent, feedback_overflow_menu_alignment.

When I invoke

SituationRun?
Edit *.xaml, *.resx, *Resources.Designer.cs, new UserControl/Window/Pageyes
Pure structural attribute edit (Grid.Row, Margin, Padding), code-behind .xaml.cs onlyno

Pipeline

  1. scripts/xaml-check.ps1 -Files <paths> for XAML rules.
  2. scripts/resx-validate.ps1 -File <path> per resx (parse + Designer parity).
  3. → XAML: <n> issues | LocCoverage~<pct>% or OK

10 rules

Full regex + exceptions: references/xaml-rules.md.

RuleAnchor memory
hardcoded-textfeedback_localization_new_strings
missing-dynamicproject_phase6_localization_complete
patcher-corruptionadr_007_xaml_patcher_bug
xmlns-mangleadr_007_xaml_patcher_bug
resx-malformedfeedback_resx_satellite_corruption
designer-driftdetected by resx-validate
hexeditor-resourcesfeedback_resources_alias_hexeditor
messagebox-showadr_009_themed_messagebox
static-color-no-alphabug_contextmenu_transparent
dockpanel-row-gridfeedback_overflow_menu_alignment

Output

XAML: 2 hardcoded-text, 1 missing-dynamic | LocCoverage=78%
  MainWindow.xaml:42  hardcoded-text  Header="Settings"
  Toolbar.xaml:15     missing-dynamic Tooltip="Save"

LocCoverage is approximate (DynamicResource count vs attribute string count). Does not rewrite XAML, translate strings, or verify XAML compiles.

False positives: technical values (Style="{StaticResource …}", x:Key=…, FontFamily="Segoe UI", brush names) are whitelisted — see references/xaml-rules.md.