Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Erlang Otp Knowledge Patch?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/nevaberry-erlang-otp-knowledge-patch-nevaberry-plugins)
---
name: erlang-otp-knowledge-patch
description: Erlang/OTP
version: "29.1.2"
license: MIT
metadata:
author: Nevaberry
---
# Erlang/OTP compatibility guidance
Load this skill when upgrading Erlang/OTP applications, adapting code to changed
runtime or library behavior, configuring network services, or using the language
and tooling features described here. Use the topic references for exact patch
attribution, option details, and examples.
## Topic references
| Reference | Topics |
| --- | --- |
| [Build and Operations](references/build-operations.md) | Deprecations, application dependencies, installation, build options, releases, OpenVEX, epmd, archives |
| [Cryptography, TLS, and Certificates](references/crypto-tls-certificates.md) | Post-quantum algorithms, ASN.1, certificate validation, revocation, TLS handshakes, sessions, distribution |
| [Language and Runtime](references/language-runtime.md) | Warnings, nominal types, experimental native records, comprehensions, priority messages, collections, regexes, Xref, Mnesia |
| [Networking and Services](references/networking-services.md) | SSH/SFTP, HTTP, URI parsing, sockets, DNS, SNMP, Megaco, ODBC |
| [Shell, I/O, and Testing](references/shell-io-testing.md) | Input, remote shells, terminal styling, Emacs, Common Test, tracing, profiling |
## Migration checks
### Deprecations and removal schedules
Migrate away from the newly deprecated `odbc` application and `ftp` and `ct_ftp`
modules, whose removal is planned for OTP 30. Old guard tests such as `integer/1`
and `atom/1` are also scheduled for removal; use `is_integer/1` and `is_atom/1`.
The `slave` module is scheduled for removal in OTP 31, and the planned partial
removal of archive functionality moves to OTP 30. OTP 29 drops 32-bit Windows.
### Persisted arrays, ordered input, and code loading
Arrays saved with `term_to_binary/1` on older releases are incompatible with the
OTP 29 `array` API. Convert persisted arrays to a portable representation before
upgrading and rebuild them under OTP 29.
`gb_sets:from_ordset/1` and `gb_trees:from_orddict/1` now raise `badarg` for invalid
ordering. Use `gb_sets:from_list/1` or `gb_trees:from_list/1` for unsorted input.
The default code path now ends with `.`; modules found earlier take precedence
over same-named BEAM files in the working directory.
### Certificate verification and TLS sessions
Hostname verification requires a matching subject alternative name (SAN).
Replace certificates that authenticated solely through their subject common
name with certificates whose SAN matches the hostname.
During path validation, X.509 v1 or v2 issuer certificates are rejected with
`{bad_cert, missing_basic_constraint}`; they remain eligible as leaf certificates.
Policy trees exceeding the node-count limit produce `{bad_cert, policy_tree_exceeded}`.
TLS 1.2 servers with `{verify, verify_peer}` default to `{reuse_sessions, false}`;
set `{reuse_sessions, true}` to opt in. TLS 1.2 and DTLS 1.2 resumption requires
matching SNI, including when both handshakes omit it. A mismatch triggers a full
handshake. An SNI virtual service with peer verification needs explicit reuse
even when the listener defaults to reuse.
With `{session_tickets, auto}`, a TLS 1.3 client removes a stored ticket as soon
as it offers it. Concurrent connections get separate tickets when enough exist.
Optional HTTP fetching of certificate revocation lists blocks internal and
loopback addresses by default; `allowed_hosts` restricts hosts the fetcher may contact.
### SSH services and capacity
SSH shell access, exec, and SFTP are disabled by default. Enable needed services:
```erlang
ssh:daemon(Port, [{shell, {shell, start, []}},
{exec, erlang_eval},
{subsystems, [ssh_sftpd:subsystem_spec([])]} | Options]).
```
The daemon defaults to 256 channels per connection and 1024 concurrent connections,
including session channels without an active subsystem in the channel count.
Use `{max_channels, infinity}` or `{max_sessions, infinity}` to restore the prior
unlimited setting for that option. `direct-tcpip` or `forwarded-tcpip` channels exceeding `max_channels`
receive `SSH_MSG_CHANNEL_OPEN_FAILURE` while the connection stays open; applications
that used disconnects to detect the limit must handle channel-open failures.
Only one successful subsystem request is accepted per channel. Open a separate
channel for each additional subsystem. SFTP reads are capped at 255 KiB per request.
### HTTP limits, redirects, and authentication
`httpd` defaults to 150 concurrent clients. `request_timeout` limits idle time
between request reads to 60 seconds by default; `keep_alive_timeout` stops when
new data arrives. Set either to `infinity` to disable its timer. Transfers below
`min_bytes_per_second` receive `408 Request Timeout`.
Requests with both `Transfer-Encoding` and `Content-Length`, folded header lines,
or whitespace before a header colon receive `400 Bad Request`. `max_body_size`
is enforced as chunk data arrives; invalid chunk sizes cause an error and
immediate connection closure.
`httpc` defaults to a total response header limit of 10,240 bytes and also caps
the body. Override with `max_header_size` and `max_body_size` request options.
Redirects changing host or port remove sensitive headers and original URI userinfo
credentials. Send a separate request with destination credentials if needed.
The `dets` and `mnesia` backends for `mod_auth` scope users and groups to each
protected directory on a listener. Grant access for every required directory.
In OTP 29.1, `httpd` routes `OPTIONS` through its usual module pipeline; add a
module handling the method, or unhandled requests receive `501 Not Implemented`.
### Coordinating application patches
For PKICMP application-only upgrades, check the declared runtime dependencies for
`public_key` and use the `crypto` and `public_key` versions required by `ssl`.
Install `public_key-1.21.1` with `ssl-11.7.1` for that SSL patch's dependency.
On OTP 28, `public_key-1.20.3.6` requires `crypto-5.8` from OTP 28.3, while
`ssh-5.5.2.7` requires `crypto-5.7` from OTP 28.1. The build reference records
the HTTP/TLS backports and their application-only SSL upgrade requirements.
## Language and runtime quick reference
### Compiler warnings and Xref
Bare `catch Expr` warnings are opt-in with `warn_deprecated_catch` in OTP 28
and enabled by default in OTP 29. Suppress per module with
`-compile(nowarn_deprecated_catch).` Enable `warn_obsolete_bool_op` to flag `and` and `or`.
Move bindings used outside a subexpression into their own expressions, or use
`nowarn_export_var_subexpr`. Rewrite `m({a, B} = {X, Y})` as `m({a = X, B = Y})`,
or suppress its warning with `nowarn_match_alias_pats`.
The `-unsafe` attribute marks unsafe functions. Calls to OTP functions classified
as always unsafe warn by default; `warn_possibly_unsafe_function` also flags
conditionally safe calls such as `list_to_atom/1`. Xref adds `unsafe_function_calls`,
`undocumented_function_calls`, and `private_function_calls`, and honors `ignore_xref`.
### Experimental native records
Declare native records with `-record #name{...}.` and use usual record syntax.
`#geom:point{}` can match a private record by name in another module;
`-export_record([point]).` allows other modules to construct it and match its fields.
Constructing a private native record from another module raises
`{badrecord, {Module, Name}}`; a pattern naming its fields fails to match.
Use OTP 29.0.1 or later for deployments using experimental native records.
Upgrade the full OTP installation for the fixes to Dialyzer, `io_lib:bformat/2`,
and anonymous updates containing tuple-record operations. For the `try...catch`
fixes in OTP 29.1.2, application-only patches need both `compiler-10.0.7` and `erts-17.1.1`.
### Comprehensions and function application
Strict generators raise a match error on pattern mismatch: use `<:=` for binary
generators and `<:-` for map and list generators. A chain of `&&` zips any number
of list, binary, and map generators in lockstep; each must produce the same number
of elements. A comma can follow the group to add a filter or another generator.
Assignment qualifiers are experimental and rejected by default. Enable
`-feature(compr_assign, enable).` or start the shell with `erl -enable-feature compr_assign`.
`Pattern = Expr` binds for subsequent qualifiers and the result, raises a match
error on mismatch, and has strict singleton-generator scope: the pattern can
shadow an outer variable while the expression reads its outer value.
A list comprehension can emit multiple values using commas before `||`, as in
`[I, -I || I <- [1, 2, 3]]`. Application is left-associative: `F(X)(Y)` calls the
fun returned by `F(X)` with `Y`.
### Priority messages and aliases
Create a priority alias with `erlang:alias([priority])` and send with
`erlang:send/3` and `[priority]`. These messages precede ordinary mailbox messages
in arrival order within the priority group; `!` to the alias sends an ordinary
message. Deactivate the alias with `erlang:unalias/1`.
Use `erlang:exit(PrioAlias, Reason, [priority])` for explicit priority exits,
`erlang:link(Pid, [priority])` for priority broken-link exit messages, and
`erlang:monitor(process, Pid, [priority])` for priority `DOWN` messages.
Upgrade receiving nodes to `erts-17.0.6` or later before sending priority messages
larger than 32 KiB to process aliases on those nodes.
### Regular expressions and collections
PCRE2 rejects unknown escapes such as `\M` with `badarg` in `re:run/2`.
Unicode property matches and branch-reset output from `re:split/3` can change.
OTP 28 changes compiled-pattern format: compile the original pattern on the
destination when moving regexes between nodes or OTP versions. OTP 28.1 adds
export/import support for transferring compiled patterns between node instances.
`persistent_term:put_new/2` initializes a key, returns quickly for the same value,
and raises `badarg` for a different existing value. For a given map, keys, values,
list conversion, the default iterator, and map generators share an unspecified
order. `graph` is immutable: pass the graph returned by each update to the next operation.
## Operations and tooling quick reference
### Network behavior
DNS retries truncated UDP responses over TCP; deployments needing these responses
must allow TCP as well as UDP to the resolver. With `check_ip` enabled, TLS
distribution rejects peers outside the same LAN. TLS distribution prefers TLS 1.3
and retains TLS 1.2 as a fallback for rolling upgrades.
With `send_timeout` configured and `send_timeout_close` set to `true`, a send timeout
delivers `{tcp_closed, Socket}`. In OTP 29.1, the `gen_tcp` socket backend defaults
to `{read_ahead, true}`; set `{read_ahead, false}` to retain the previous setting.
### Building and packaging
`make release` includes runtime application code only; run `make release_docs`
and `make release_tests` for documentation and tests in separate directories.
`--enable-use-embedded-3pp-alternatives` requires the documented alternatives;
`--disable-use-embedded-3pp-alternatives` uses all embedded copies. Defaults use
embedded copies and prefer the operating system's `zlib` when available.
Inspect runtime component use with `erlang:system_info(embedded_3pps)`.
Build with OpenSSL 3.5 for ML-DSA and ML-KEM support in `crypto`, `public_key`,
and `ssl`. Build with `./configure --enable-encrypted-crash-dumps` for encrypted dumps.
### Shell, tests, and tracing
Input is read on demand. Launches using `-noinput` solely to prevent eager reads
can omit it. Use `shell:start_interactive({noshell, raw})` to read keystrokes before
Enter. Raw mode disables line editing and echo; `cooked` is the default.
`ct_doctest` runs shell-style documentation examples. It can check expected results
and failures, compile modules used by examples, and use pluggable documentation parsers.
`tprof:disable_trace(new)` and `tprof:disable_trace(existing)` stop tracing started
by `tprof:enable_trace/1` with the corresponding argument.