nginx-c-module-design
БесплатноБез исполняемых скриптовНе проверенnginx C module directive design guidelines for creating admin-friendly configuration interfaces. This skill should be used when designing nginx module…
от pproenca★ 231 звезда на GitHubОб этом скилле
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
| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | Exposure Decisions | CRITICAL | expose- |
| 2 | Naming Conventions | CRITICAL | naming- |
| 3 | Directive Types | HIGH | type- |
| 4 | Scope Design | HIGH | scope- |
| 5 | Default Values | MEDIUM-HIGH | default- |
| 6 | Validation & Error Messages | MEDIUM | valid- |
| 7 | Variable Design | MEDIUM | var- |
| 8 | Evolution & Compatibility | LOW-MEDIUM | compat- |
Quick Reference
1. Exposure Decisions (CRITICAL)
expose-configurable-vs-hardcode- Framework for Configurable vs Hardcoded Valuesexpose-escape-hatch- Provide Escape Hatches for Hardcoded Defaultsexpose-feature-gate- Use Feature Gates for Optional Behaviorexpose-too-many-directives- Avoid Over-Configurationexpose-path-resource- Always Expose External Resource Pathsexpose-security-surface- Audit Security Implications of Every Exposed Directiveexpose-environment-dependent- Expose Values That Vary by Deployment Environment
2. Naming Conventions (CRITICAL)
naming-module-prefix- Use a Consistent Module Prefix for All Directivesnaming-sub-prefix-groups- Group Related Directives with Sub-Prefixesnaming-noun-over-verb- Prefer Noun Phrases for Directive Namesnaming-no-abbreviations- Avoid Custom Abbreviations in Directive Namesnaming-cross-module-consistency- Mirror Nginx Core Suffix Patterns for Analogous Directivesnaming-lowercase-underscore- Use Lowercase with Underscores Only
3. Directive Types (HIGH)
type-flag-for-toggles- Use NGX_CONF_FLAG for Binary Togglestype-enum-over-string- Use Enum Slot for Known Value Setstype-time-size-units- Use Time and Size Slot Functions for Time and Size Valuestype-take-n-fixed-args- Use TAKE1/TAKE2/TAKE12 for Fixed Argument Countstype-one-more-lists- Use 1MORE for Variable-Length Value Liststype-avoid-block- Avoid Block Directives for Featurestype-custom-handler-complex- Use Custom Handlers for Complex Directive Parsing
4. Scope Design (HIGH)
scope-default-three-levels- Default to http + server + location Scopescope-http-only-shared-resources- Restrict Shared Resource Directives to http Level Onlyscope-server-connection-level- Use http + server Scope for Connection-Level Settingsscope-avoid-if-context- Do Not Support the if Context Unless Fully Testedscope-location-path-operations- Restrict Path-Routing Directives to Location Context
5. Default Values (MEDIUM-HIGH)
default-zero-config-safe- Ensure Zero-Config Produces Safe Behaviordefault-performance-optin- Make Performance Features Opt-In- [
default-safety-on](r
Установить nginx-c-module-design в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл nginx-c-module-design?
nginx C module directive design guidelines for creating admin-friendly configuration interfaces. This skill should be used when designing nginx module directives — deciding what to expose vs hardcode, naming conventions, scope placement, default values, variable design, and validation patterns. Triggers on tasks involving ngx_command_t design, directive naming, configuration API design, nginx module public interface, or directive deprecation.
Как установить скилл nginx-c-module-design?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл nginx-c-module-design запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic