.agents/skills/amxmodx/SKILL.md
Helps with AMX Mod X (Pawn) coding conventions and best practices.
npx skillsauth add hedgefog/amxx-modding-kit amxmodx-basicsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This document provides an overview of coding conventions for AMX Mod X projects. Each topic is covered in detail in its own file.
| Category | Description | |----------|-------------| | Basics | Syntax, basics | | Code Style | File structure, formatting, braces, spacing, plugin registration | | Naming Conventions | Hungarian notation, variable prefixes, naming patterns | | Constants & Enums | Define constants, enums, TASKID constants | | Macros | Common macros, IS_PLAYER, patterns to avoid | | Function Declarations | Return types, @ prefix, static variables | | Validations | FM_NULLENT, entity checks, player validation, early returns |
| Category | Description | |----------|-------------| | Hooks | Ham, FakeMeta, ReAPI, Event, Message hooks and handles | | Forwards | CreateMultiForward, ExecuteForward, pre/post patterns | | Natives | Native registration and implementation | | Callbacks | Tasks, SQL queries, CVar queries | | Menus | Menu creation, callbacks, and patterns | | Commands | Client, server, and console commands | | CVars | CVar creation, binding, and change hooks |
| Category | Description | |----------|-------------| | Optimizations | Native call reduction, dynamic hooks, model path caching | | Data Structures | Arrays, Tries, entity access, strings |
#pragma semicolon 1 at file startregister_plugin() - avoid macrosFM_NULLENT instead of -1 or 0 for null entity checksFM_NULLENT after entity creation before processingFM_NULLENT not 0 for failures - 0 is worldspawnMACRO()_Suffix patterns in code - only in macro definitions@ prefix only for OOP-like methods: @{EntityName}_{MethodName}public keyword to @ prefixed functionsconst prefix for all handle argumentsconst &this for "this" argument in OOP-like methodsHAM_* constantsFMRES_* constantsHC_* constantsPLUGIN_* constantsg_pfwham (Ham), g_pfwfm (FakeMeta)get_user_msgid when only used once in register_messageLibraryName_OnSomething - not Fw_ prefixg_pfw prefixNative_ prefix with const for argumentsTask_ prefix with offset in task IDCallback_SQLQuery_{Name} prefixCallback_Menu_{Name} prefixmenu_destroyCommand_ prefix, server commands use ServerCommand_register_concmd for admin commands that should work from RCONclient_cmd - use engclient_cmd for server-side executioncreate_cvar instead of deprecated register_cvarbind_pcvar_* instead of get_pcvar_* for cvar accessg_pTrace - never create trace handles per-callxs_vec_set instead of xs_vec_copy for vector initializationg_rgsz prefix with g_i*Num countergmsg prefix (without underscore)g_rg*[MAX_PLAYERS + 1] with type prefixid for players - use pPlayerindex for entities - use pEntityArrayDestroy, TrieDestroy in plugin_end()tools
Best practices for organizing large AMX Mod X projects with multiple plugins sharing entities, weapons, events, and other definitions. Use when creating mod-scale projects that need consistent namespace patterns and shared constants.
development
Guide for Waypoint Markers API creating 3D waypoint sprites visible through walls with per-player visibility.
development
Guide for States API usage implementing state machines with transitions, guards, and lifecycle hooks.
development
Guide for Shops API usage creating in-game shops with items, custom balance systems, and access control.