mirokaku/musa.veil/veil-update

Claude Code and agent skill by mirokaku/musa.veil

Trust tier 2
  • community
  • ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Synchronize Veil headers with the latest phnt (Process Hacker Native API) changes. Use this skill whenever the user wants to update Veil from upstream phnt, sync NT kernel headers, apply phnt diffs, convert PHNT macros to NTDDI macros, add __kernel_entry/Zw* function pairs, or generally keep Veil in step with winsiderss/systeminformer. Also use when the user mentions "update Veil", "sync phnt", "apply phnt changes", "VERSION_COMMIT", or asks to refresh Veil headers from upstream.

Install

npx vskill@latest install mirokaku/musa.veil/veil-update

Semi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard

SKILL.md

Veil Update Skill

Overview

Veil is a Windows native API header library that synchronizes with phnt and adapts it to Veil's coding conventions.

Prerequisites

ComponentValue
Build scriptBuildAllTargets.cmd in Veil.Test/
Pre-build cleanupKill zombie MSBuild: taskkill /f /im MSBuild.exe
Current upstreamRead VERSION_COMMIT (root, hash only)

Update Workflow

Phase 1 — Prepare
  1. Read VERSION_COMMIT for the current upstream commit hash.
  2. Sparse-clone or pull winsiderss/systeminformer into .cache/systeminformer/.
  3. Run git diff <old> <new> -- phnt/include/ to generate per-file diffs.
  4. Identify which phnt files changed and map them to Veil headers (see File Mapping).
Phase 2 — Apply

For each changed phnt file that has a Veil mapping:

  1. Read the diff section and the latest phnt source.
  2. Read the current Veil header.
  3. Apply new additions (functions, structs, enums, macros, typedefs) that don't

already exist in Veil.

  1. Do not remove existing Veil content — only add or update.
  2. Handle each change type as described below.
Phase 3 — Convert
Macro Conversion

Replace all PHNT_* macros with Veil equivalents:

phnt MacroVeil Macro
PHNT_VERSIONNTDDI_VERSION
PHNT_WINDOWS_ANCIENTNTDDI_WIN2K
PHNT_WINDOWS_XPNTDDI_WINXP
PHNT_WINDOWS_SERVER_2003NTDDI_WS03
PHNT_WINDOWS_VISTANTDDI_VISTA
PHNT_WINDOWS_7NTDDI_WIN7
PHNT_WINDOWS_8NTDDI_WIN8
PHNT_WINDOWS_8_1NTDDI_WINBLUE
PHNT_WINDOWS_10NTDDI_WIN10
PHNT_WINDOWS_10_TH2NTDDI_WIN10_TH2
PHNT_WINDOWS_10_RS1NTDDI_WIN10_RS1
PHNT_WINDOWS_10_RS2NTDDI_WIN10_RS2
PHNT_WINDOWS_10_RS3NTDDI_WIN10_RS3
PHNT_WINDOWS_10_RS4NTDDI_WIN10_RS4
PHNT_WINDOWS_10_RS5NTDDI_WIN10_RS5
PHNT_WINDOWS_10_19H1NTDDI_WIN10_19H1
PHNT_WINDOWS_10_19H2NTDDI_WIN10_19H1
PHNT_WINDOWS_10_20H1NTDDI_WIN10_VB
PHNT_WINDOWS_10_20H2NTDDI_WIN10_MN
PHNT_WINDOWS_10_21H1NTDDI_WIN10_FE
PHNT_WINDOWS_10_21H2NTDDI_WIN10_CO
PHNT_WINDOWS_10_22H2NTDDI_WIN10_CO
PHNT_WINDOWS_11NTDDI_WIN11
PHNT_WINDOWS_11_22H2NTDDI_WIN11_NI
PHNT_WINDOWS_11_23H2NTDDI_WIN11_NI
PHNT_WINDOWS_11_24H2NTDDI_WIN11_GE
PHNT_WINDOWS_11_25H2NTDDI_WIN11_DT
PHNT_WINDOWS_11_26H1NTDDI_WIN11_BR
PHNT_WINDOWS_11_27H2Blocked; no Veil constant exists for that release
PHNT_WINDOWS_NEWSentinel; keep the comparison as written, do not convert to a fixed NTDDI_* value

Example:

cpp
// phnt: #if (PHNT_VERSION >= PHNT_WINDOWS_10_RS1)
// Veil after: #if (NTDDI_VERSION >= NTDDI_WIN10_RS1)
Nt Function Formatting

Add __kernel_entry before NTSYSCALLAPI for all Nt* syscall declarations. Ensure the closing ); has no leading spaces.

Before (phnt):

cpp
NTSYSCALLAPI
NTSTATUS
NTAPI
NtFlushKey(
_In_ HANDLE KeyHandle
);

After (Veil):

cpp
__kernel_entry NTSYSCALLAPI
NTSTATUS
NTAPI
NtFlushKey(
_In_ HANDLE KeyHandle
);
Zw Function Pair

Immediately after each Nt* function, add the corresponding Zw* function:

cpp
_IRQL_requires_max_(PASSIVE_LEVEL)
NTSYSAPI
NTSTATUS
NTAPI
ZwFlushKey(
_In_ HANDLE KeyHandle
);

Use _IRQL_requires_max_(PASSIVE_LEVEL) and NTSYSAPI for Zw functions.

Other Conversions
  • static_assert → STATIC_ASSERT
  • Replace phnt-style _Kernel_entry_ → Veil __kernel_entry
  • Sync Zw parameter annotation fixes from upstream when applicable
Phase 4 — Validate

After each file update, run the build:

bash
taskkill /f /im MSBuild.exe
Veil.Test/BuildAllTargets.cmd

Fix compilation errors before proceeding to the next file.

Phase 5 — Finalize
  1. Update VERSION_COMMIT with the new upstream commit hash (hash only, no URL or date).
  2. Report changes from ntmisc.h separately to the user.
  3. Clean up .cache/ directory.

File Mapping

phnt SourceVeil Header
ntlpcapi.hVeil/Veil.System.ALPC.h
ntbcd.hVeil/Veil.System.BCD.h
ntregapi.hVeil/Veil.System.ConfigurationManager.h
ntdbg.hVeil/Veil.System.Debug.h
ntwmi.hVeil/Veil.System.Etw.h
ntexapi.hVeil/Veil.System.Executive.h
ntioapi.hVeil/Veil.System.IOManager.h
ntkeapi.hVeil/Veil.System.KernelCore.h
ntldr.hVeil/Veil.System.Loader.h
ntmmapi.hVeil/Veil.System.MemoryManager.h
ntnls.hVeil/Veil.System.Nls.h
ntobapi.hVeil/Veil.System.ObjectManager.h
ntpnpapi.hVeil/Veil.System.PNP.h
ntpoapi.hVeil/Veil.System.PowerManager.h
ntpfapi.hVeil/Veil.System.Prefetcher.h
ntpsapi.hVeil/Veil.System.Process.h
ntpebteb.hVeil/Veil.System.Process.h (PEB, PEB32, TEB, TEB32)
ntxcapi.hVeil/Veil.System.Process.h (NtContinue family), Veil/Veil.System.RuntimeLibrary.h (Rtl exception support)
ntrtl.hVeil/Veil.System.RuntimeLibrary.h
ntsam.hVeil/Veil.System.SAM.h
ntseapi.hVeil/Veil.System.Security.h
ntsmss.hVeil/Veil.System.SMSS.h
ntsxs.hVeil/Veil.System.SxS.h
nttp.hVeil/Veil.System.ThreadPool.h
nttmapi.hVeil/Veil.System.TransactionManager.h
ntmisc.hMulti-domain: classify every changed section by symbol ownership (Package APIs → Veil/Veil.System.AppPackage.h, PCW performance counters → Veil/Veil.System.Etw.h)

Unmapped (skip): nttypesafe.h, ntstrsafe.h, ntintsafe.h, ntd3dkmt.h

Code Conventions

File Header

Every Veil header starts with:

cpp
/*
* PROJECT: Veil
* FILE: Veil.System.<Module>.h
* PURPOSE: This file is part of Veil.
*
* LICENSE: MIT License
*
* DEVELOPER: MeeSong (meesong@outlook.com)
*/
#pragma once
// Warnings which disabled for compiling
#if _MSC_VER >= 1200
#pragma warning(push)
#pragma warning(disable:4201)
#pragma warning(disable:4214)
#pragma warning(disable:4324)
#pragma warning(disable:4471)
#endif
VEIL_BEGIN()
// ... content ...
VEIL_END()
#if _MSC_VER >= 1200
#pragma warning(pop)
#endif
Kernel/User Mode Guards
cpp
#ifndef _KERNEL_MODE
// User-mode only definitions
#endif // !_KERNEL_MODE
#ifdef _KERNEL_MODE
// Kernel-mode only definitions
#endif // _KERNEL_MODE
Enum Definition
cpp
/**
* Brief description.
* \sa https://learn.microsoft.com/...
*/
typedef enum _ENUM_NAME
{
EnumValue1, // ASSOCIATED_STRUCTURE_1
EnumValue2, // ASSOCIATED_STRUCTURE_2
MaxEnumValue
} ENUM_NAME;
Structure Definition
cpp
/**
* Brief description.
* \sa https://learn.microsoft.com/...
*/
typedef struct _STRUCTURE_NAME
{
TYPE Field1;
TYPE Field2;
_Field_size_bytes_(Length) TYPE VariableField[1];
} STRUCTURE_NAME, *PSTRUCTURE_NAME;

Verification Checklist

  • [ ] All PHNT_WINDOWS_* macros converted to NTDDI_*
  • [ ] All Nt* functions have __kernel_entry attribute
  • [ ] All Nt* functions have corresponding Zw* pairs
  • [ ] Closing parentheses aligned (no leading spaces before );)
  • [ ] No compilation errors in BuildAllTargets.cmd
  • [ ] Definition order respects dependencies
  • [ ] ntmisc.h changes reported separately
  • [ ] VERSION_COMMIT updated
  • [ ] .cache/ cleaned up

Error Handling

IssueCauseSolution
Undefined typeMissing dependencyCheck definition order; move definition earlier
RedefinitionDuplicate in SDK/WDKWrap with #ifndef _KERNEL_MODE or version check
Missing SAL annotationphnt inconsistencyAdd _In_, _Out_, _Inout_ as appropriate
Macro conflictName collisionUse VEIL_ prefix or conditional compilation

Communication

  • All interactions with the user: Chinese
  • All documents/AI-readable content: English

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
371
Repository forks
60
7-day trend score
30

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Extension points

  • hookPre/post lifecycle hooks

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/mirokaku/musa.veil/veil-update/badge)](https://verified-skill.com/skills/mirokaku/musa.veil/veil-update)

Something wrong with this skill or its page? Tell us.