mcpField
N
nginx-c-module-design

nginx-c-module-design

github.com/pproencaDevelopment218356 installsUpdated 11w ago
Repository

About nginx-c-module-design

A design guide for nginx C module authors shaping configuration directives. Its 46 prioritized rules address what to expose, naming, scope, defaults, validation, and compatibility.

Key features

  1. 0146 rules across eight categories
  2. 02Prioritizes guidance by impact
  3. 03Covers directive exposure and naming
  4. 04Addresses types, scope, and defaults
  5. 05Includes validation and compatibility guidance

Use cases

  1. 01Decide which values to expose as directives
  2. 02Name directives and select argument types
  3. 03Set directive scope and defaults
  4. 04Plan directive deprecation or renaming

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/pproenca/dot-skills --skill nginx-c-module-design

After installing, type/nginx-c-module-designin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

metadata.json
assets/templates/
_template.md
references/
_sections.md
compat-alias-old-directive.md
compat-deprecation-warning.md
compat-document-migration.md
compat-multi-version-window.md
default-generous-timeouts.md
default-performance-optin.md
default-platform-aware-buffers.md
default-safety-on.md
default-zero-config-safe.md
default-zero-unlimited.md
expose-configurable-vs-hardcode.md
expose-environment-dependent.md
expose-escape-hatch.md
expose-feature-gate.md
expose-path-resource.md
expose-security-surface.md
expose-too-many-directives.md
naming-cross-module-consistency.md
naming-lowercase-underscore.md
naming-module-prefix.md
naming-no-abbreviations.md
naming-noun-over-verb.md
naming-sub-prefix-groups.md
scope-avoid-if-context.md
scope-default-three-levels.md
scope-http-only-shared-resources.md
scope-location-path-operations.md

Details

From the project README

nginx.org C Module Directive Design Best Practices

Comprehensive directive design guide for nginx C module authors, focused on creating clear, consistent, and admin-friendly configuration interfaces. Contains 46 rules across 8 categories, prioritized by impact to guide decisions about what to expose, how to name it, and how to evolve it safely.

When to Apply

Reference these guidelines when:

  • Deciding which values to expose as directives vs hardcode
  • Naming new directives and choosing argument types
  • Selecting scope placement (http, server, location)
  • Setting default values and validation behavior
  • Designing nginx variables for runtime data
  • Deprecating or renaming existing directives

Companion Skills

This skill focuses on design decisions (the "what" and "why"). For implementation mechanics, see:

  • nginx-c-modules — C implementation: memory pools, request lifecycle, config parsing, handlers, filters
  • nginx-c-perf — Performance: buffers, connections, locks, caching, timeouts
  • nginx-c-debug — Debugging: crash diagnosis, GDB, tracing, sanitizers

Rule Categories by Priority

PriorityCategoryImpactPrefix
1Exposure DecisionsCRITICALexpose-
2Naming ConventionsCRITICALnaming-
3Directive TypesHIGHtype-
4Scope DesignHIGHscope-
5Default ValuesMEDIUM-HIGHdefault-
6Validation & Error MessagesMEDIUMvalid-
7Variable DesignMEDIUMvar-
8Evolution & CompatibilityLOW-MEDIUMcompat-

Quick Reference

1. Exposure Decisions (CRITICAL)
2. Naming Conventions (CRITICAL)
3. Directive Types (HIGH)
4. Scope Design (HIGH)
5. Default Values (MEDIUM-HIGH)
6. Validation & Error Messages (MEDIUM)
7. Variable Design (MEDIUM)
8. Evolution & Compatibility (LOW-MEDIUM)

How to Use

Read individual reference files for detailed explanations and code examples:

Reference Files

FileDescription
references/_sections.mdCategory definitions and ordering
assets/templates/_template.mdTemplate for new rules
metadata.jsonVersion and reference information

Comments

Markdown supported