Individual skill
nginx-c-modules
nginx C module development guidelines based on the official nginx development guide. This skill should be used when writing, reviewing, or refactoring nginx C modules to ensure correct memory management, request lifecycle handling, and event-driven patterns. Triggers on tasks involving nginx module development, ngx_http_module_t, handler/filter/upstream implementation, pool allocation, or nginx configuration directives.
skills/.experimental/nginx-c-modules/SKILL.md
Source commit cf93c57cac89d6fc3e4194686000411567f5caf3
What was checked
- Matches the observed repository HEAD
- Yes
- Scanner rules are current
- No
- Repository scan complete
- No
- Skill scan complete
- Yes
- Observed behavior
- Not checked yet
- Last checked
- Nov 5, 2026
These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.
Install this skill
Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.
An install command is unavailable: current rules, complete repository and skill scans, an eligible behavior level and a permitted license are required.
Repository context
- Repository stars (not skill ratings)
- 222
- Repository last updated
- Aug 15, 2026
- License
- MIT
Observed agent integration: No specific integration evidence. Standard SKILL.md installation does not imply verified compatibility.
- writing Derived category
Files and excerpt
File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.
Browse files
SKILL.mdcore · 8,001 bytesassets/templates/_template.mddoc · 694 bytesmetadata.jsonasset · 933 bytesreferences/_sections.mddoc · 1,970 bytesreferences/conf-build-config.mddoc · 2,229 bytesreferences/conf-context-flags.mddoc · 1,816 bytesreferences/conf-custom-handler.mddoc · 2,124 bytesreferences/conf-merge-all-fields.mddoc · 1,921 bytesreferences/conf-module-ctx-null.mddoc · 2,590 bytesreferences/conf-null-command.mddoc · 1,700 bytesreferences/conf-unset-init.mddoc · 1,770 bytesreferences/ds-cpymem-pattern.mddoc · 1,546 bytesreferences/ds-hash-readonly.mddoc · 2,725 bytesreferences/ds-list-iteration.mddoc · 1,906 bytesreferences/ds-ngx-str-not-null-terminated.mddoc · 1,725 bytesreferences/ds-ngx-str-set-literals.mddoc · 1,789 bytesreferences/event-handle-read-write.mddoc · 1,802 bytesreferences/event-no-blocking.mddoc · 1,691 bytesreferences/event-posted-events.mddoc · 1,857 bytesreferences/event-thread-pool.mddoc · 3,236 bytesreferences/event-timer-management.mddoc · 1,315 bytesreferences/filter-buffer-chain-iteration.mddoc · 1,588 bytesreferences/filter-buffering-flag.mddoc · 1,903 bytesreferences/filter-call-next.mddoc · 1,429 bytesreferences/filter-check-subrequest.mddoc · 1,578 bytesreferences/filter-registration-order.mddoc · 1,691 bytesreferences/handler-add-variable.mddoc · 2,733 bytesreferences/handler-content-handler.mddoc · 1,844 bytesreferences/handler-empty-response.mddoc · 1,656 bytesreferences/handler-error-page.mddoc · 1,938 bytesreferences/handler-last-buf.mddoc · 2,272 bytesreferences/handler-module-ctx.mddoc · 2,292 bytesreferences/handler-phase-registration.mddoc · 1,883 bytesreferences/handler-send-header-first.mddoc · 1,848 bytesreferences/mem-check-allocation.mddoc · 1,716 bytesreferences/mem-cleanup-handlers.mddoc · 2,543 bytesreferences/mem-pcalloc-structs.mddoc · 1,887 bytesreferences/mem-pfree-limitations.mddoc · 2,213 bytesreferences/mem-pnalloc-strings.mddoc · 1,740 bytesreferences/mem-pool-allocation.mddoc · 1,836 bytesreferences/mem-shared-slab.mddoc · 2,234 bytesreferences/req-body-async.mddoc · 1,846 bytesreferences/req-count-reference.mddoc · 1,817 bytesreferences/req-discard-body.mddoc · 2,229 bytesreferences/req-finalize-once.mddoc · 1,708 bytesreferences/req-internal-redirect.mddoc · 1,669 bytesreferences/req-no-access-after-finalize.mddoc · 1,301 bytesreferences/req-subrequest-completion.mddoc · 1,825 bytesreferences/upstream-connection-reuse.mddoc · 3,274 bytesreferences/upstream-create-request.mddoc · 2,758 bytesreferences/upstream-finalize.mddoc · 1,981 bytesreferences/upstream-peer-free.mddoc · 1,606 bytesreferences/upstream-process-header.mddoc · 2,175 bytes
Read excerpt
# nginx.org C Module Development Best Practices
Comprehensive development guide for nginx C modules, derived from the official nginx development documentation and community expertise. Contains 49 rules across 8 categories, prioritized by impact to guide correct module implementation and prevent common crashes, memory leaks, and undefined behavior.
## When to Apply
Reference these guidelines when:
- Writing new nginx C modules (handlers, filters, upstream, load-balancers)
- Implementing configuration directives and merge logic
- Managing memory with nginx pools and shared memory zones
- Handling the HTTP request lifecycle (body reading, subrequests, finalization)
- Working with nginx's event loop, timers, and thread pools
## Rule Categories by Priority