Adopt a naming standard where identifiers encode meaning, don’t clash with framework semantics, and don’t obscure behavior.
Guidelines:
api.lua in plugin contexts), don’t reuse it for unrelated code—rename or place code where it can’t be mistaken.local function set_headers(conf, claims) with “set header keys from claims” comment.local function set_headers_from_claims(conf, claims) (remove the now-redundant comment).has_capture(...) should return true/false consistently (e.g., return false), not nil.value from string to table inside the same function.saved / get_saved). Use names that describe what’s actually being retrieved (request context, saved request headers, etc.), or pass the context explicitly to the handler.is_control_plane(kong.configuration.role) over raw string comparisons scattered through code.Impact: improves readability, reduces accidental coupling/namespace bugs, and makes behavior self-evident from names alone.