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)
---
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 compiler diagnostics,
configuring network services, or using the language and runtime features described here.
The quick reference emphasizes compatibility changes, deprecations, and new APIs.
Use the topic references for complete details, examples, and version attributions.
## Topic index
| Reference | Topics |
| --- | --- |
| [Cryptography, TLS, and SSH](references/crypto-tls-and-ssh.md) | Post-quantum algorithms, certificates, TLS validation and sessions, distribution, SSH services and limits, SFTP |
| [Language and compiler](references/language-and-compiler.md) | Warnings, comprehensions, experimental native records, nominal types, guards, numeric expressions, abstract syntax |
| [Networking and protocols](references/networking-and-protocols.md) | HTTP clients and servers, authentication directories, URI parsing, sockets, DNS, FTP, Megaco, SNMP |
| [Runtime and data](references/runtime-and-data.md) | Priority signals, aliases, persistent terms, collections, regexes, archives, ASN.1, Mnesia, ODBC |
| [Tooling, build, and release](references/tooling-build-and-release.md) | Deprecations, application dependencies, builds, packaging, security metadata, shell, tracing, Xref, tests, editors, node discovery |
## Breaking changes and deprecations
### SSH services and capacity
In OTP 29.0, shell access, exec, and SFTP are disabled by default. Pass the options
for the services your daemon needs:
```erlang
ssh:daemon(Port, [{shell, {shell, start, []}},
{exec, erlang_eval},
{subsystems, [ssh_sftpd:subsystem_spec([])]} | Options]).
```
OTP 28.5.0.7 and 29.1.1 default to 256 channels per connection (`max_channels`),
including session channels without an active subsystem, and 1024 concurrent
connections (`max_sessions`). Set either limit explicitly in daemon options;
`{max_channels, infinity}` or `{max_sessions, infinity}` restores that option's
previous unlimited setting. Each SSH channel accepts only one successful subsystem
request; open a separate channel for each additional subsystem.
In OTP 28.5.0.8 and 29.1.2, forwarding 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.
### Certificate verification and TLS sessions
Since OTP 29.0.1, 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.
Certificate path validation rejects a policy tree exceeding its node-count limit
with `{bad_cert, policy_tree_exceeded}`. X.509 v1 or v2 certificates in issuer
position are rejected with `{bad_cert, missing_basic_constraint}`; they remain
eligible as leaf certificates.
TLS 1.2 servers with `{verify, verify_peer}` default to `{reuse_sessions, false}`;
pass `{reuse_sessions, true}` to opt in. TLS 1.2 and DTLS 1.2 servers resume cached
sessions only when the requested SNI matches the original SNI, including when both omit it.
A mismatch triggers a full handshake. An SNI virtual service with peer verification
needs explicit reuse even when its listener defaults to reuse.
### Persisted arrays, regexes, 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.
OTP 28 changes the format returned by `re:compile/2`: compile the original pattern
on the destination when moving regexes between nodes or OTP versions. OTP 28.1
adds export and import support for compiled patterns between Erlang node instances.
PCRE2 rejects unknown escapes such as `\M` with `badarg` in `re:run/2`. Updated
Unicode property tables can change `\p{...}` matches; branch-reset groups can
change the output of `re:split/3`.
In OTP 29.0, the default code path ends with `.`. A module found earlier on the path
takes precedence over a same-named BEAM file in the working directory.
### Compiler warnings and planned removals
The bare `catch Expr` warning is opt-in with `warn_deprecated_catch` in OTP 28 and
enabled by default in OTP 29.0. Use `-compile(nowarn_deprecated_catch).` to suppress
a project-wide warning in an individual module.
- Enable `warn_obsolete_bool_op` to flag `and` and `or`.
- Move a binding used later out of a subexpression into its own expression, or
suppress the warning with `nowarn_export_var_subexpr`.
- Rewrite `m({a, B} = {X, Y})` as `m({a = X, B = Y})`, or suppress the warning with
`nowarn_match_alias_pats`.
- Calls to OTP functions classified as always unsafe warn by default. Enable
`warn_possibly_unsafe_function` to also flag conditionally safe calls such as
`list_to_atom/1`.
Migrate away from the newly deprecated `odbc` application and `ftp` and `ct_ftp`
modules, whose removals are 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; partial archive-functionality
removal is planned for OTP 30. OTP 29 drops the 32-bit Windows build.
### HTTP server defaults and rejection behavior
- `request_timeout` limits idle time between request reads to 60 seconds by default.
`keep_alive_timeout` stops as soon as new data arrives. Set either to `infinity`
to disable its timer; expect `408 Request Timeout` below `min_bytes_per_second`.
- `httpd` returns `400 Bad Request` for requests containing both `Transfer-Encoding`
and `Content-Length`, folded header lines, or whitespace between a header name
and its colon.
- Chunk data is checked against `max_body_size` as it arrives. An invalid chunk
size returns an error and closes the connection immediately.
- The default `max_clients` limit of 150 concurrent clients is enforced. Set it
explicitly on listeners needing another limit.
- `mod_auth` user and group records in `dets` and `mnesia` are scoped to each
protected directory on a listener. Grant access for each required directory.
- In OTP 29.1, `OPTIONS` goes through the usual module pipeline. Add a module that
handles it to serve a response; unhandled requests get `501 Not Implemented`.
### HTTP clients, redirects, and parsers
When a redirect changes the host or port, `httpc` removes `authorization`,
`proxy-authorization`, `cookie`, `referer`, and `origin` headers. Send a separate
request with credentials if the destination needs authentication. Original URI
userinfo credentials are also cleared on a host or port change; they are retained
when both stay the same.
`httpc` limits total response headers to 10,240 bytes by default and also caps the
response body. Override with `max_header_size` and `max_body_size` request options.
`Content-Length` must contain only digits. `uri_string:parse/1` and the `eldap`
referral URL parser reject port components longer than five digits, including leading zeroes.
### Application-only upgrades
Check declared runtime dependencies for `public_key` and use the `crypto` and
`public_key` versions required by `ssl`. The tooling reference records exact
application dependencies for SSL patches and HTTP/TLS backports.
Use OTP 29.0.1 or later for deployments using experimental native records: earlier
OTP 29.0 builds could crash during compilation, and native-record comparisons could
be incorrect or crash the runtime. Upgrade the full OTP installation for the
OTP 29.0.2 fixes to Dialyzer, formatting, and anonymous updates. For OTP 29.1.2
native-record fixes in `try...catch`, apply both `compiler-10.0.7` and `erts-17.1.1`
when patching applications individually.
## Frequently used features
### Priority messages and signals
Create an alias with `erlang:alias([priority])`. Messages sent to it with
`erlang:send/3` and `[priority]` go ahead of ordinary messages, in arrival order
within the priority group. Sending with `!` remains ordinary; deactivate the alias
with `erlang:unalias/1`.
Use `erlang:exit(PrioAlias, Reason, [priority])` for explicit priority exits,
`erlang:link(Pid, [priority])` for priority exit messages from broken links, 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.
### Comprehensions and experimental language features
Strict generators raise a match error on a pattern mismatch: use `<:=` for binaries
and `<:-` for maps and lists. Zip list, binary, and map generators with `&&`; each
must produce the same number of elements. A comma can follow the group for a filter
or another generator. List comprehensions can emit multiple values per iteration:
```erlang
[I, -I || I <- [1, 2, 3]]. % [1,-1,2,-2,3,-3]
```
Comprehension assignment is experimental. Enable `-feature(compr_assign, enable).`
or start the shell with `erl -enable-feature compr_assign`; otherwise the compiler
rejects `Pattern = Expr` qualifiers. The qualifier binds values for subsequent
qualifiers and the result, raising a match error on mismatch. Its pattern can
shadow an outer variable while its expression reads the outer value.
Native records are experimental: declare them with `-record #name{...}.` and use
the usual record syntax. `-export_record([point]).` in `geom` lets other modules
construct the record and match its fields. A private record can be matched by name
with `#geom:point{}`; construction from another module raises
`{badrecord, {Module, Name}}`, and a pattern naming its fields fails to match.
### Types, guards, and persistent terms
Dialyzer distinguishes separate `-nominal` declarations with identical representations.
A nominal type can satisfy a compatible non-opaque structural specification.
`is_integer(Term, Lower, Upper)` is true only when all three arguments are integers
and `Term` is within the inclusive bounds; otherwise it is false.
Use `persistent_term:put_new/2` to initialize a key. It returns quickly if the key
already holds the same value and raises `badarg` if it holds a different value.
### Post-quantum cryptography and preferences
Build with OpenSSL 3.5 to enable ML-DSA and ML-KEM in `crypto`, `public_key`, and `ssl`.
Use `mldsa44`, `mldsa65`, or `mldsa87` with `crypto:sign/4` and `crypto:verify/5`;
use `mlkem512`, `mlkem768`, or `mlkem1024` with `crypto:encapsulate_key/2` and
`crypto:decapsulate_key/3`.
In OTP 29.0, the default TLS key exchange preference starts with `x25519mlkem768`.
The other hybrid groups and standalone ML-KEM groups listed in the cryptography
reference require explicit configuration. SSH prefers `mlkem768x25519-sha256` and
can negotiate another algorithm with peers lacking support.
### Builds, releases, and documentation tests
`make release` includes only runtime application code. Use `make release_docs` and
`make release_tests` for documentation and tests in separate directories.
`--enable-use-embedded-3pp-alternatives` requires alternatives for the runtime
components listed in the build reference; `--disable-use-embedded-3pp-alternatives`
uses all embedded copies. By default, OTP uses embedded copies and prefers the
operating system's `zlib` when available. Query usage with
`erlang:system_info(embedded_3pps)`.
`ct_doctest` runs shell-style examples from module docs and documentation files.
It can check expected results and failures, compile modules used by examples,
and use pluggable documentation parsers.