[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6XD5783JV0XRYBDQWS0P0MK":3,"skill-same:01M6XD5783JV0XRYBDQWS0P0MK":64},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":43,"commitSha":44,"skillDirectory":45,"forksCount":13,"repositoryHtmlUrl":46,"repositoryHomepageUrl":6,"ownerHtmlUrl":47,"ownerBlogUrl":6,"ownerDescription":48,"updatedAt":49,"install":50,"resources":63},"01M6XD5783JV0XRYBDQWS0P0MK","erlang-otp-behaviors",null,"Use when oTP behaviors including gen_server for stateful processes, gen_statem for state machines, supervisors for fault tolerance, gen_event for event handling, and building robust, production-ready Erlang applications with proven patterns.","Waaaalnut\u002Fskillsbench","Waaaalnut","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F103995656?v=4","01M6XCS9K1V51EY3JMB7DGMX24","01M6XCS9Q4WPW88W62C55G1H44",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FWaaaalnut\u002Fskillsbench\u002Fblob\u002Fmain\u002Ftasks-no-skills\u002Ffix-erlang-ssh-cve\u002Fenvironment\u002Fskills\u002Ferlang-otp-behaviors\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],"erlang otp behaviors","erlang","otp","state machines","when","stateful","for","production-ready","tolerance","with","event","processes","state","fault tolerance","patterns","ready","use","applications","Production","server","2026-11-10 10:12:30",false,"---\nname: erlang-otp-behaviors\ndescription: Use when oTP behaviors including gen_server for stateful processes, gen_statem for state machines, supervisors for fault tolerance, gen_event for event handling, and building robust, production-ready Erlang applications with proven patterns.\n---\n\n# Erlang OTP Behaviors\n\n## Introduction\n\nOTP (Open Telecom Platform) behaviors provide reusable patterns for common process\ntypes in Erlang systems. These abstractions handle complex details like message\npassing, error handling, and state management, allowing developers to focus on\nbusiness logic while maintaining system reliability.\n\nBehaviors define interfaces that processes must implement, with OTP handling the\ninfrastructure. Gen_server provides client-server processes, gen_statem implements\nstate machines, supervisors manage process lifecycles, and gen_event coordinates\nevent distribution. Understanding these patterns is essential for production Erlang.\n\nThis skill covers gen_server for stateful processes, gen_statem for complex state\nmachines, supervisor trees for fault tolerance, gen_event for event handling,\napplication behavior for packaging, and patterns for building robust OTP systems.\n\n## Gen_Server Basics\n\nGen_server implements client-server processes with synchronous and asynchronous\ncommunication.\n\n```erlang\n-module(counter_server).\n-behaviour(gen_server).\n\n%% API\n-export([start_link\u002F0, increment\u002F0, decrement\u002F0, get_value\u002F0, reset\u002F0]).\n\n%% gen_server callbacks\n-export([init\u002F1, handle_call\u002F3, handle_cast\u002F2, handle_info\u002F2, terminate\u002F2, code_change\u002F3]).\n\n-define(SERVER, ?MODULE).\n\n%% State record\n-record(state, {count = 0}).\n\n%%%===================================================================\n%%% API\n%%%===================================================================\n\nstart_link() ->\n    gen_server:start_link({local, ?SERVER}, ?MODULE, [], []).\n\nincrement() ->\n    gen_server:cast(?SERVER, increment).\n\ndecrement() ->\n    gen_server:cast(?SERVER, decrement).\n\nget_value() ->\n    gen_server:call(?SERVER, get_value).\n\nreset() ->\n    gen_server:call(?SERVER, reset).\n\n%%%===================================================================\n%%% gen_server callbacks\n%%%===================================================================\n\ninit([]) ->\n    {ok, #state{}}.\n\n%% Synchronous calls (with response)\nhandle_call(get_value, _From, State) ->\n    {reply, State#state.count, State};\n\nhandle_call(reset, _From, State) ->\n    {reply, ok, State#state{count = 0}};\n\nhandle_call(_Request, _From, State) ->\n    {reply, ignored, State}.\n\n%% Asynchronous casts (no response)\nhandle_cast(increment, State) ->\n    NewCount = State#state.count + 1,\n    {noreply, State#state{count = NewCount}};\n\nhandle_cast(decrement, State) ->\n    NewCount = State#state.count - 1,\n    {noreply, State#state{count = NewCount}};\n\nhandle_cast(_Msg, State) ->\n    {noreply, State}.\n\n%% Handle other messages\nhandle_info(_Info, State) ->\n    {noreply, State}.\n\nterminate(_Reason, _State) ->\n    ok.\n\ncode_change(_OldVsn, State, _Extra) ->\n    {ok, State}.\n\n%%%===================================================================\n%%% Complex gen_server example: Cache\n%%%===================================================================\n\n-module(cache_server).\n-behaviour(gen_server).\n\n-export([start_link\u002F1, put\u002F2, get\u002F1, delete\u002F1, clear\u002F0, size\u002F0]).\n-export([init\u002F1, handle_call\u002F3, handle_cast\u002F2, handle_info\u002F2, terminate\u002F2, code_change\u002F3]).\n\n-record(state, {\n    cache = #{},\n    max_size = 1000,\n    hits = 0,\n    misses = 0\n}).\n\nstart_link(MaxSize) ->\n    gen_server:start_link({local, ?MODULE}, ?MODULE, [MaxSize], []).\n\nput(Key, Value) ->\n    gen_server:call(?MODULE, {put, Key, Value}).\n\nget(Key) ->\n    gen_server:call(?MODULE, {get, Key}).\n\ndelete(Key) ->\n    gen_server:cast(?MODULE, {delete, Key}).\n\nclear() ->\n    gen_server:cast(?MODULE, clear).\n\nsize() ->\n    gen_server:call(?MODULE, size).\n\ninit([MaxSize]) ->\n    process_flag(trap_exit, true),\n    {ok, #state{max_size = MaxSize}}.\n\nhandle_call({put, Key, Value}, _From, State) ->\n    Cache = State#state.cache,\n    case maps:size(Cache) >= State#state.max_size of\n        true ->\n            {reply, {error, cache_full}, State};\n        false ->\n            NewCache = maps:put(Key, Value, Cache),\n            {reply, ok, State#state{cache = NewCache}}\n    end;\n\nhandle_call({get, Key}, _From, State) ->\n    Cache = State#state.cache,\n    case maps:find(Key, Cache) of\n        {ok, Value} ->\n            NewState = State#state{hits = State#state.hits + 1},\n            {reply, {ok, Value}, NewState};\n        error ->\n            NewState = State#state{misses = State#state.misses + 1},\n            {reply, not_found, NewState}\n    end;\n\nhandle_call(size, _From, State) ->\n    Size = maps:size(State#state.cache),\n    {reply, Size, State};\n\nhandle_call(_Request, _From, State) ->\n    {reply, {error, unknown_request}, State}.\n\nhandle_cast({delete, Key}, State) ->\n    NewCache = maps:remove(Key, State#state.cache),\n    {noreply, State#state{cache = NewCache}};\n\nhandle_cast(clear, State) ->\n    {noreply, State#state{cache = #{}}};\n\nhandle_cast(_Msg, State) ->\n    {noreply, State}.\n\nhandle_info(_Info, State) ->\n    {noreply, State}.\n\nterminate(Reason, State) ->\n    io:format(\"Cache terminating: ~p~n\", [Reason]),\n    io:format(\"Stats - Hits: ~p, Misses: ~p~n\", [State#state.hits, State#state.misses]),\n    ok.\n\ncode_change(_OldVsn, State, _Extra) ->\n    {ok, State}.\n\n%%%===================================================================\n%%% gen_server with timeouts\n%%%===================================================================\n\n-module(session_server).\n-behaviour(gen_server).\n\n-export([start_link\u002F0, touch\u002F0]).\n-export([init\u002F1, handle_call\u002F3, handle_cast\u002F2, handle_info\u002F2, terminate\u002F2, code_change\u002F3]).\n\n-define(TIMEOUT, 30000). % 30 seconds\n\n-record(state, {\n    last_activity,\n    data = #{}\n}).\n\nstart_link() ->\n    gen_server:start_link({local, ?MODULE}, ?MODULE, [], []).\n\ntouch() ->\n    gen_server:cast(?MODULE, touch).\n\ninit([]) ->\n    {ok, #state{last_activity = erlang:system_time(millisecond)}, ?TIMEOUT}.\n\nhandle_call(_Request, _From, State) ->\n    {reply, ok, State, ?TIMEOUT}.\n\nhandle_cast(touch, State) ->\n    NewState = State#state{last_activity = erlang:system_time(millisecond)},\n    {noreply, NewState, ?TIMEOUT};\n\nhandle_cast(_Msg, State) ->\n    {noreply, State, ?TIMEOUT}.\n\nhandle_info(timeout, State) ->\n    io:format(\"Session timed out~n\"),\n    {stop, normal, State};\n\nhandle_info(_Info, State) ->\n    {noreply, State, ?TIMEOUT}.\n\nterminate(_Reason, _State) ->\n    ok.\n\ncode_change(_OldVsn, State, _Extra) ->\n    {ok, State}.\n```\n\nGen_server provides structure for stateful processes with client-server patterns.\n\n## Gen_Statem for State Machines\n\nGen_statem implements finite state machines with explicit state transitions.\n\n```erlang\n-module(door_fsm).\n-behaviour(gen_statem).\n\n-export([start_link\u002F0, open\u002F0, close\u002F0, lock\u002F0, unlock\u002F1]).\n-export([init\u002F1, callback_mode\u002F0, terminate\u002F3, code_change\u002F4]).\n-export([locked\u002F3, unlocked\u002F3, open\u002F3]).\n\n-define(CODE, \"1234\").\n\nstart_link() ->\n    gen_statem:start_link({local, ?MODULE}, ?MODULE, [], []).\n\nopen() ->\n    gen_statem:call(?MODULE, open).\n\nclose() ->\n    gen_statem:call(?MODULE, close).\n\nlock() ->\n    gen_statem:call(?MODULE, lock).\n\nunlock(Code) ->\n    gen_statem:call(?MODULE, {unlock, Code}).\n\ninit([]) ->\n    {ok, locked, #{}}.\n\ncallback_mode() ->\n    state_functions.\n\n%% Locked state\nlocked(call, {unlock, Code}, Data) when Code =:= ?CODE ->\n    {next_state, unlocked, Data, [{reply, ok}]};\n\nlocked(call, {unlock, _WrongCode}, Data) ->\n    {keep_state, Data, [{reply, {error, wrong_code}}]};\n\nlocked(call, _Event, Data) ->\n    {keep_state, Data, [{reply, {error, door_locked}}]}.\n\n%% Unlocked state\nunlocked(call, lock, Data) ->\n    {next_state, locked, Data, [{reply, ok}]};\n\nunlocked(call, open, Data) ->\n    {next_state, open, Data, [{reply, ok}]};\n\nunlocked(call, _Event, Data) ->\n    {keep_state, Data, [{reply, ok}]}.\n\n%% Open state\nopen(call, close, Data) ->\n    {next_state, unlocked, Data, [{reply, ok}]};\n\nopen(call, _Event, Data) ->\n    {keep_state, Data, [{reply, {error, door_open}}]}.\n\nterminate(_Reason, _State, _Data) ->\n    ok.\n\ncode_change(_OldVsn, State, Data, _Extra) ->\n    {ok, State, Data}.\n\n%%%===================================================================\n%%% Connection state machine\n%%%===================================================================\n\n-module(connection_fsm).\n-behaviour(gen_statem).\n\n-export([start_link\u002F0, connect\u002F0, disconnect\u002F0, send\u002F1]).\n-export([init\u002F1, callback_mode\u002F0, terminate\u002F3, code_change\u002F4]).\n-export([disconnected\u002F3, connecting\u002F3, connected\u002F3]).\n\n-record(data, {\n    socket = undefined,\n    buffer = \u003C\u003C>>,\n    retry_count = 0\n}).\n\nstart_link() ->\n    gen_statem:start_link({local, ?MODULE}, ?MODULE, [], []).\n\nconnect() ->\n    gen_statem:call(?MODULE, connect).\n\ndisconnect() ->\n    gen_statem:call(?MODULE, disconnect).\n\nsend(Data) ->\n    gen_statem:call(?MODULE, {send, Data}).\n\ninit([]) ->\n    {ok, disconnected, #data{}}.\n\ncallback_mode() ->\n    [state_functions, state_enter].\n\n%% Disconnected state\ndisconnected(enter, _OldState, _Data) ->\n    io:format(\"Entered disconnected state~n\"),\n    keep_state_and_data;\n\ndisconnected(call, connect, Data) ->\n    case connect_to_server() of\n        {ok, Socket} ->\n            {next_state, connected, Data#data{socket = Socket, retry_count = 0},\n             [{reply, ok}]};\n        error ->\n            NewData = Data#data{retry_count = Data#data.retry_count + 1},\n            case NewData#data.retry_count \u003C 3 of\n                true ->\n                    {next_state, connecting, NewData, [{reply, {error, retrying}}]};\n                false ->\n                    {keep_state, NewData, [{reply, {error, max_retries}}]}\n            end\n    end.\n\n%% Connecting state\nconnecting(enter, _OldState, _Data) ->\n    erlang:send_after(1000, self(), retry_connect),\n    keep_state_and_data;\n\nconnecting(info, retry_connect, Data) ->\n    case connect_to_server() of\n        {ok, Socket} ->\n            {next_state, connected, Data#data{socket = Socket, retry_count = 0}};\n        error ->\n            NewData = Data#data{retry_count = Data#data.retry_count + 1},\n            case NewData#data.retry_count \u003C 3 of\n                true ->\n                    {keep_state, NewData};\n                false ->\n                    {next_state, disconnected, NewData}\n            end\n    end.\n\n%% Connected state\nconnected(enter, _OldState, _Data) ->\n    io:format(\"Connection established~n\"),\n    keep_state_and_data;\n\nconnected(call, {send, Data}, StateData) ->\n    case send_data(StateData#data.socket, Data) of\n        ok ->\n            {keep_state_and_data, [{reply, ok}]};\n        error ->\n            {next_state, disconnected, StateData, [{reply, {error, send_failed}}]}\n    end;\n\nconnected(call, disconnect, StateData) ->\n    close_connection(StateData#data.socket),\n    {next_state, disconnected, StateData#data{socket = undefined}, [{reply, ok}]}.\n\nterminate(_Reason, _State, Data) ->\n    case Data#data.socket of\n        undefined -> ok;\n        Socket -> close_connection(Socket)\n    end.\n\ncode_change(_OldVsn, State, Data, _Extra) ->\n    {ok, State, Data}.\n\n%% Helper functions\nconnect_to_server() ->\n    {ok, socket}.\n\nsend_data(_Socket, _Data) ->\n    ok.\n\nclose_connection(_Socket) ->\n    ok.\n```\n\nGen_statem provides structured state machine implementation with explicit\ntransitions.\n\n## Supervisor Trees\n\nSupervisors monitor child processes and restart them on failure for fault\ntolerance.\n\n```erlang\n-module(my_supervisor).\n-behaviour(supervisor).\n\n-export([start_link\u002F0]).\n-export([init\u002F1]).\n\nstart_link() ->\n    supervisor:start_link({local, ?MODULE}, ?MODULE, []).\n\ninit([]) ->\n    SupFlags = #{\n        strategy => one_for_one,\n        intensity => 5,\n        period => 60\n    },\n\n    ChildSpecs = [\n        #{\n            id => counter_server,\n            start => {counter_server, start_link, []},\n            restart => permanent,\n            shutdown => 5000,\n            type => worker,\n            modules => [counter_server]\n        },\n        #{\n            id => cache_server,\n            start => {cache_server, start_link, [1000]},\n            restart => permanent,\n            shutdown => 5000,\n            type => worker,\n            modules => [cache_server]\n        }\n    ],\n\n    {ok, {SupFlags, ChildSpecs}}.\n\n%%%===================================================================\n%%% Supervisor strategies\n%%%===================================================================\n\n%% one_for_one: Restart only failed child\ninit_one_for_one([]) ->\n    SupFlags = #{strategy => one_for_one},\n    Children = [worker_spec(worker1), worker_spec(worker2)],\n    {ok, {SupFlags, Children}}.\n\n%% one_for_all: Restart all children if any fails\ninit_one_for_all([]) ->\n    SupFlags = #{strategy => one_for_all},\n    Children = [worker_spec(worker1), worker_spec(worker2)],\n    {ok, {SupFlags, Children}}.\n\n%% rest_for_one: Restart failed child and all started after it\ninit_rest_for_one([]) ->\n    SupFlags = #{strategy => rest_for_one},\n    Children = [\n        worker_spec(database),\n        worker_spec(cache),  % Depends on database\n        worker_spec(api)     % Depends on cache\n    ],\n    {ok, {SupFlags, Children}}.\n\nworker_spec(Name) ->\n    #{\n        id => Name,\n        start => {Name, start_link, []},\n        restart => permanent,\n        shutdown => 5000,\n        type => worker\n    }.\n\n%%%===================================================================\n%%% Nested supervisors (supervision tree)\n%%%===================================================================\n\n-module(app_supervisor).\n-behaviour(supervisor).\n\n-export([start_link\u002F0, init\u002F1]).\n\nstart_link() ->\n    supervisor:start_link({local, ?MODULE}, ?MODULE, []).\n\ninit([]) ->\n    SupFlags = #{strategy => one_for_one},\n\n    ChildSpecs = [\n        #{\n            id => database_sup,\n            start => {database_supervisor, start_link, []},\n            restart => permanent,\n            type => supervisor\n        },\n        #{\n            id => api_sup,\n            start => {api_supervisor, start_link, []},\n            restart => permanent,\n            type => supervisor\n        },\n        #{\n            id => worker_sup,\n            start => {worker_supervisor, start_link, []},\n            restart => permanent,\n            type => supervisor\n        }\n    ],\n\n    {ok, {SupFlags, ChildSpecs}}.\n\n%%%===================================================================\n%%% Dynamic supervision\n%%%===================================================================\n\n-module(dynamic_sup).\n-behaviour(supervisor).\n\n-export([start_link\u002F0, start_child\u002F1, stop_child\u002F1]).\n-export([init\u002F1]).\n\nstart_link() ->\n    supervisor:start_link({local, ?MODULE}, ?MODULE, []).\n\nstart_child(Args) ->\n    supervisor:start_child(?MODULE, [Args]).\n\nstop_child(Pid) ->\n    supervisor:terminate_child(?MODULE, Pid).\n\ninit([]) ->\n    SupFlags = #{\n        strategy => simple_one_for_one,\n        intensity => 5,\n        period => 60\n    },\n\n    ChildSpec = #{\n        id => worker,\n        start => {worker, start_link, []},\n        restart => temporary,\n        shutdown => 5000,\n        type => worker\n    },\n\n    {ok, {SupFlags, [ChildSpec]}}.\n```\n\nSupervisor trees provide automatic fault recovery and system resilience.\n\n## Best Practices\n\n1. **Use gen_server for stateful processes** to leverage OTP infrastructure and\n   error handling\n\n2. **Implement all callback functions** even if they return default values for\n   completeness\n\n3. **Keep state records simple** to reduce complexity and improve maintainability\n\n4. **Use handle_cast for fire-and-forget** operations without response requirements\n\n5. **Implement proper termination** in terminate\u002F2 for resource cleanup\n\n6. **Set appropriate timeout values** to prevent indefinite blocking in calls\n\n7. **Use gen_statem for complex state machines** with many states and transitions\n\n8. **Design supervisor hierarchies** that match application component dependencies\n\n9. **Use appropriate restart strategies** based on child process relationships\n\n10. **Test supervisor behavior** by intentionally crashing children to verify\n    recovery\n\n## Common Pitfalls\n\n1. **Blocking in handle_call** prevents processing other messages causing deadlock\n\n2. **Not matching all message patterns** causes unhandled message accumulation\n\n3. **Forgetting to reply** in handle_call leaves callers waiting indefinitely\n\n4. **Using wrong supervision strategy** causes unnecessary process restarts\n\n5. **Not setting process_flag trap_exit** prevents graceful termination handling\n\n6. **Creating circular dependencies** in supervisor trees causes startup failures\n\n7. **Using temporary restart** for critical processes allows permanent failures\n\n8. **Not implementing code_change** prevents hot code upgrades\n\n9. **Storing large state** in gen_server causes memory issues\n\n10. **Not handling timeout** in state machines allows infinite blocking\n\n## When to Use This Skill\n\nApply gen_server for any stateful process requiring client-server interaction.\n\nUse gen_statem when implementing protocols or systems with explicit state\ntransitions.\n\nLeverage supervisors for all applications requiring fault tolerance and automatic\nrecovery.\n\nBuild supervisor trees to structure complex applications with multiple components.\n\nUse OTP behaviors for production systems requiring reliability and maintainability.\n\n## Resources\n\n- [Erlang OTP Design Principles](\u003Chttps:\u002F\u002Fwww.erlang.org\u002Fdoc\u002Fdesign_principles\u002Fusers_guide.html>)\n- [Gen_server Manual](\u003Chttps:\u002F\u002Fwww.erlang.org\u002Fdoc\u002Fman\u002Fgen_server.html>)\n- [Gen_statem Manual](\u003Chttps:\u002F\u002Fwww.erlang.org\u002Fdoc\u002Fman\u002Fgen_statem.html>)\n- [Supervisor Manual](\u003Chttps:\u002F\u002Fwww.erlang.org\u002Fdoc\u002Fman\u002Fsupervisor.html>)\n- [Learn You Some Erlang - OTP](\u003Chttps:\u002F\u002Flearnyousomeerlang.com\u002Fwhat-is-otp>)\n","# Erlang OTP Behaviors\n\n## Introduction\n\nOTP (Open Telecom Platform) behaviors provide reusable patterns for common process\ntypes in Erlang systems. These abstractions handle complex details like message\npassing, error handling, and state management, allowing developers to focus on\nbusiness logic while maintaining system reliability.\n\nBehaviors define interfaces that processes must implement, with OTP handling the\ninfrastructure. Gen_server provides client-server processes, gen_statem implements\nstate machines, supervisors manage process lifecycles, and gen_event coordinates\nevent distribution. Understanding these patterns is essential for production Erlang.\n\nThis skill covers gen_server for stateful processes, gen_statem for complex state\nmachines, supervisor trees for fault tolerance, gen_event for event handling,\napplication behavior for packaging, and patterns for building robust OTP systems.\n\n## Gen_Server Basics\n\nGen_server implements client-server processes with synchronous and asynchronous\ncommunication.\n\n```erlang\n-module(counter_server).\n-behaviour(gen_server).\n\n%% API\n-export([start_link\u002F0, increment\u002F0, decrement\u002F0, get_value\u002F0, reset\u002F0]).\n\n%% gen_server callbacks\n-export([init\u002F1, handle_call\u002F3, handle_cast\u002F2, handle_info\u002F2, terminate\u002F2, code_change\u002F3]).\n\n-define(SERVER, ?MODULE).\n\n%% State record\n-record(state, {count = 0}).\n\n%%%===================================================================\n%%% API\n%%%===================================================================\n\nstart_link() ->\n    gen_server:start_link({local, ?SERVER}, ?MODULE, [], []).\n\nincrement() ->\n    gen_server:cast(?SERVER, increment).\n\ndecrement() ->\n    gen_server:cast(?SERVER, decrement).\n\nget_value() ->\n    gen_server:call(?SERVER, get_value).\n\nreset() ->\n    gen_server:call(?SERVER, reset).\n\n%%%===================================================================\n%%% gen_server callbacks\n%%%===================================================================\n\ninit([]) ->\n    {ok, #state{}}.\n\n%% Synchronous calls (with response)\nhandle_call(get_value, _From, State) ->\n    {reply, State#state.count, State};\n\nhandle_call(reset, _From, State) ->\n    {reply, ok, State#state{count = 0}};\n\nhandle_call(_Request, _From, State) ->\n    {reply, ignored, State}.\n\n%% Asynchronous casts (no response)\nhandle_cast(increment, State) ->\n    NewCount = State#state.count + 1,\n    {noreply, State#state{count = NewCount}};\n\nhandle_cast(decrement, State) ->\n    NewCount = State#state.count - 1,\n    {noreply, State#state{count = NewCount}};\n\nhandle_cast(_Msg, State) ->\n    {noreply, State}.\n\n%% Handle other messages\nhandle_info(_Info, State) ->\n    {noreply, State}.\n\nterminate(_Reason, _State) ->\n    ok.\n\ncode_change(_OldVsn, State, _Extra) ->\n    {ok, State}.\n\n%%%===================================================================\n%%% Complex gen_server example: Cache\n%%%===================================================================\n\n-module(cache_server).\n-behaviour(gen_server).\n\n-export([start_link\u002F1, put\u002F2, get\u002F1, delete\u002F1, clear\u002F0, size\u002F0]).\n-export([init\u002F1, handle_call\u002F3, handle_cast\u002F2, handle_info\u002F2, terminate\u002F2, code_change\u002F3]).\n\n-record(state, {\n    cache = #{},\n    max_size = 1000,\n    hits = 0,\n    misses = 0\n}).\n\nstart_link(MaxSize) ->\n    gen_server:start_link({local, ?MODULE}, ?MODULE, [MaxSize], []).\n\nput(Key, Value) ->\n    gen_server:call(?MODULE, {put, Key, Value}).\n\nget(Key) ->\n    gen_server:call(?MODULE, {get, Key}).\n\ndelete(Key) ->\n    gen_server:cast(?MODULE, {delete, Key}).\n\nclear() ->\n    gen_server:cast(?MODULE, clear).\n\nsize() ->\n    gen_server:call(?MODULE, size).\n\ninit([MaxSize]) ->\n    process_flag(trap_exit, true),\n    {ok, #state{max_size = MaxSize}}.\n\nhandle_call({put, Key, Value}, _From, State) ->\n    Cache = State#state.cache,\n    case maps:size(Cache) >= State#state.max_size of\n        true ->\n            {reply, {error, cache_full}, State};\n        false ->\n            NewCache = maps:put(Key, Value, Cache),\n            {reply, ok, State#state{cache = NewCache}}\n    end;\n\nhandle_call({get, Key}, _From, State) ->\n    Cache = State#state.cache,\n    case maps:find(Key, Cache) of\n        {ok, Value} ->\n            NewState = State#state{hits = State#state.hits + 1},\n            {reply, {ok, Value}, NewState};\n        error ->\n            NewState = State#state{misses = State#state.misses + 1},\n            {reply, not_found, NewState}\n    end;\n\nhandle_call(size, _From, State) ->\n    Size = maps:size(State#state.cache),\n    {reply, Size, State};\n\nhandle_call(_Request, _From, State) ->\n    {reply, {error, unknown_request}, State}.\n\nhandle_cast({delete, Key}, State) ->\n    NewCache = maps:remove(Key, State#state.cache),\n    {noreply, State#state{cache = NewCache}};\n\nhandle_cast(clear, State) ->\n    {noreply, State#state{cache = #{}}};\n\nhandle_cast(_Msg, State) ->\n    {noreply, State}.\n\nhandle_info(_Info, State) ->\n    {noreply, State}.\n\nterminate(Reason, State) ->\n    io:format(\"Cache terminating: ~p~n\", [Reason]),\n    io:format(\"Stats - Hits: ~p, Misses: ~p~n\", [State#state.hits, State#state.misses]),\n    ok.\n\ncode_change(_OldVsn, State, _Extra) ->\n    {ok, State}.\n\n%%%===================================================================\n%%% gen_server with timeouts\n%%%===================================================================\n\n-module(session_server).\n-behaviour(gen_server).\n\n-export([start_link\u002F0, touch\u002F0]).\n-export([init\u002F1, handle_call\u002F3, handle_cast\u002F2, handle_info\u002F2, terminate\u002F2, code_change\u002F3]).\n\n-define(TIMEOUT, 30000). % 30 seconds\n\n-record(state, {\n    last_activity,\n    data = #{}\n}).\n\nstart_link() ->\n    gen_server:start_link({local, ?MODULE}, ?MODULE, [], []).\n\ntouch() ->\n    gen_server:cast(?MODULE, touch).\n\ninit([]) ->\n    {ok, #state{last_activity = erlang:system_time(millisecond)}, ?TIMEOUT}.\n\nhandle_call(_Request, _From, State) ->\n    {reply, ok, State, ?TIMEOUT}.\n\nhandle_cast(touch, State) ->\n    NewState = State#state{last_activity = erlang:system_time(millisecond)},\n    {noreply, NewState, ?TIMEOUT};\n\nhandle_cast(_Msg, State) ->\n    {noreply, State, ?TIMEOUT}.\n\nhandle_info(timeout, State) ->\n    io:format(\"Session timed out~n\"),\n    {stop, normal, State};\n\nhandle_info(_Info, State) ->\n    {noreply, State, ?TIMEOUT}.\n\nterminate(_Reason, _State) ->\n    ok.\n\ncode_change(_OldVsn, State, _Extra) ->\n    {ok, State}.\n```\n\nGen_server provides structure for stateful processes with client-server patterns.\n\n## Gen_Statem for State Machines\n\nGen_statem implements finite state machines with explicit state transitions.\n\n```erlang\n-module(door_fsm).\n-behaviour(gen_statem).\n\n-export([start_link\u002F0, open\u002F0, close\u002F0, lock\u002F0, unlock\u002F1]).\n-export([init\u002F1, callback_mode\u002F0, terminate\u002F3, code_change\u002F4]).\n-export([locked\u002F3, unlocked\u002F3, open\u002F3]).\n\n-define(CODE, \"1234\").\n\nstart_link() ->\n    gen_statem:start_link({local, ?MODULE}, ?MODULE, [], []).\n\nopen() ->\n    gen_statem:call(?MODULE, open).\n\nclose() ->\n    gen_statem:call(?MODULE, close).\n\nlock() ->\n    gen_statem:call(?MODULE, lock).\n\nunlock(Code) ->\n    gen_statem:call(?MODULE, {unlock, Code}).\n\ninit([]) ->\n    {ok, locked, #{}}.\n\ncallback_mode() ->\n    state_functions.\n\n%% Locked state\nlocked(call, {unlock, Code}, Data) when Code =:= ?CODE ->\n    {next_state, unlocked, Data, [{reply, ok}]};\n\nlocked(call, {unlock, _WrongCode}, Data) ->\n    {keep_state, Data, [{reply, {error, wrong_code}}]};\n\nlocked(call, _Event, Data) ->\n    {keep_state, Data, [{reply, {error, door_locked}}]}.\n\n%% Unlocked state\nunlocked(call, lock, Data) ->\n    {next_state, locked, Data, [{reply, ok}]};\n\nunlocked(call, open, Data) ->\n    {next_state, open, Data, [{reply, ok}]};\n\nunlocked(call, _Event, Data) ->\n    {keep_state, Data, [{reply, ok}]}.\n\n%% Open state\nopen(call, close, Data) ->\n    {next_state, unlocked, Data, [{reply, ok}]};\n\nopen(call, _Event, Data) ->\n    {keep_state, Data, [{reply, {error, door_open}}]}.\n\nterminate(_Reason, _State, _Data) ->\n    ok.\n\ncode_change(_OldVsn, State, Data, _Extra) ->\n    {ok, State, Data}.\n\n%%%===================================================================\n%%% Connection state machine\n%%%===================================================================\n\n-module(connection_fsm).\n-behaviour(gen_statem).\n\n-export([start_link\u002F0, connect\u002F0, disconnect\u002F0, send\u002F1]).\n-export([init\u002F1, callback_mode\u002F0, terminate\u002F3, code_change\u002F4]).\n-export([disconnected\u002F3, connecting\u002F3, connected\u002F3]).\n\n-record(data, {\n    socket = undefined,\n    buffer = \u003C\u003C>>,\n    retry_count = 0\n}).\n\nstart_link() ->\n    gen_statem:start_link({local, ?MODULE}, ?MODULE, [], []).\n\nconnect() ->\n    gen_statem:call(?MODULE, connect).\n\ndisconnect() ->\n    gen_statem:call(?MODULE, disconnect).\n\nsend(Data) ->\n    gen_statem:call(?MODULE, {send, Data}).\n\ninit([]) ->\n    {ok, disconnected, #data{}}.\n\ncallback_mode() ->\n    [state_functions, state_enter].\n\n%% Disconnected state\ndisconnected(enter, _OldState, _Data) ->\n    io:format(\"Entered disconnected state~n\"),\n    keep_state_and_data;\n\ndisconnected(call, connect, Data) ->\n    case connect_to_server() of\n        {ok, Socket} ->\n            {next_state, connected, Data#data{socket = Socket, retry_count = 0},\n             [{reply, ok}]};\n        error ->\n            NewData = Data#data{retry_count = Data#data.retry_count + 1},\n            case NewData#data.retry_count \u003C 3 of\n                true ->\n                    {next_state, connecting, NewData, [{reply, {error, retrying}}]};\n                false ->\n                    {keep_state, NewData, [{reply, {error, max_retries}}]}\n            end\n    end.\n\n%% Connecting state\nconnecting(enter, _OldState, _Data) ->\n    erlang:send_after(1000, self(), retry_connect),\n    keep_state_and_data;\n\nconnecting(info, retry_connect, Data) ->\n    case connect_to_server() of\n        {ok, Socket} ->\n            {next_state, connected, Data#data{socket = Socket, retry_count = 0}};\n        error ->\n            NewData = Data#data{retry_count = Data#data.retry_count + 1},\n            case NewData#data.retry_count \u003C 3 of\n                true ->\n                    {keep_state, NewData};\n                false ->\n                    {next_state, disconnected, NewData}\n            end\n    end.\n\n%% Connected state\nconnected(enter, _OldState, _Data) ->\n    io:format(\"Connection established~n\"),\n    keep_state_and_data;\n\nconnected(call, {send, Data}, StateData) ->\n    case send_data(StateData#data.socket, Data) of\n        ok ->\n            {keep_state_and_data, [{reply, ok}]};\n        error ->\n            {next_state, disconnected, StateData, [{reply, {error, send_failed}}]}\n    end;\n\nconnected(call, disconnect, StateData) ->\n    close_connection(StateData#data.socket),\n    {next_state, disconnected, StateData#data{socket = undefined}, [{reply, ok}]}.\n\nterminate(_Reason, _State, Data) ->\n    case Data#data.socket of\n        undefined -> ok;\n        Socket -> close_connection(Socket)\n    end.\n\ncode_change(_OldVsn, State, Data, _Extra) ->\n    {ok, State, Data}.\n\n%% Helper functions\nconnect_to_server() ->\n    {ok, socket}.\n\nsend_data(_Socket, _Data) ->\n    ok.\n\nclose_connection(_Socket) ->\n    ok.\n```\n\nGen_statem provides structured state machine implementation with explicit\ntransitions.\n\n## Supervisor Trees\n\nSupervisors monitor child processes and restart them on failure for fault\ntolerance.\n\n```erlang\n-module(my_supervisor).\n-behaviour(supervisor).\n\n-export([start_link\u002F0]).\n-export([init\u002F1]).\n\nstart_link() ->\n    supervisor:start_link({local, ?MODULE}, ?MODULE, []).\n\ninit([]) ->\n    SupFlags = #{\n        strategy => one_for_one,\n        intensity => 5,\n        period => 60\n    },\n\n    ChildSpecs = [\n        #{\n            id => counter_server,\n            start => {counter_server, start_link, []},\n            restart => permanent,\n            shutdown => 5000,\n            type => worker,\n            modules => [counter_server]\n        },\n        #{\n            id => cache_server,\n            start => {cache_server, start_link, [1000]},\n            restart => permanent,\n            shutdown => 5000,\n            type => worker,\n            modules => [cache_server]\n        }\n    ],\n\n    {ok, {SupFlags, ChildSpecs}}.\n\n%%%===================================================================\n%%% Supervisor strategies\n%%%===================================================================\n\n%% one_for_one: Restart only failed child\ninit_one_for_one([]) ->\n    SupFlags = #{strategy => one_for_one},\n    Children = [worker_spec(worker1), worker_spec(worker2)],\n    {ok, {SupFlags, Children}}.\n\n%% one_for_all: Restart all children if any fails\ninit_one_for_all([]) ->\n    SupFlags = #{strategy => one_for_all},\n    Children = [worker_spec(worker1), worker_spec(worker2)],\n    {ok, {SupFlags, Children}}.\n\n%% rest_for_one: Restart failed child and all started after it\ninit_rest_for_one([]) ->\n    SupFlags = #{strategy => rest_for_one},\n    Children = [\n        worker_spec(database),\n        worker_spec(cache),  % Depends on database\n        worker_spec(api)     % Depends on cache\n    ],\n    {ok, {SupFlags, Children}}.\n\nworker_spec(Name) ->\n    #{\n        id => Name,\n        start => {Name, start_link, []},\n        restart => permanent,\n        shutdown => 5000,\n        type => worker\n    }.\n\n%%%===================================================================\n%%% Nested supervisors (supervision tree)\n%%%===================================================================\n\n-module(app_supervisor).\n-behaviour(supervisor).\n\n-export([start_link\u002F0, init\u002F1]).\n\nstart_link() ->\n    supervisor:start_link({local, ?MODULE}, ?MODULE, []).\n\ninit([]) ->\n    SupFlags = #{strategy => one_for_one},\n\n    ChildSpecs = [\n        #{\n            id => database_sup,\n            start => {database_supervisor, start_link, []},\n            restart => permanent,\n            type => supervisor\n        },\n        #{\n            id => api_sup,\n            start => {api_supervisor, start_link, []},\n            restart => permanent,\n            type => supervisor\n        },\n        #{\n            id => worker_sup,\n            start => {worker_supervisor, start_link, []},\n            restart => permanent,\n            type => supervisor\n        }\n    ],\n\n    {ok, {SupFlags, ChildSpecs}}.\n\n%%%===================================================================\n%%% Dynamic supervision\n%%%===================================================================\n\n-module(dynamic_sup).\n-behaviour(supervisor).\n\n-export([start_link\u002F0, start_child\u002F1, stop_child\u002F1]).\n-export([init\u002F1]).\n\nstart_link() ->\n    supervisor:start_link({local, ?MODULE}, ?MODULE, []).\n\nstart_child(Args) ->\n    supervisor:start_child(?MODULE, [Args]).\n\nstop_child(Pid) ->\n    supervisor:terminate_child(?MODULE, Pid).\n\ninit([]) ->\n    SupFlags = #{\n        strategy => simple_one_for_one,\n        intensity => 5,\n        period => 60\n    },\n\n    ChildSpec = #{\n        id => worker,\n        start => {worker, start_link, []},\n        restart => temporary,\n        shutdown => 5000,\n        type => worker\n    },\n\n    {ok, {SupFlags, [ChildSpec]}}.\n```\n\nSupervisor trees provide automatic fault recovery and system resilience.\n\n## Best Practices\n\n1. **Use gen_server for stateful processes** to leverage OTP infrastructure and\n   error handling\n\n2. **Implement all callback functions** even if they return default values for\n   completeness\n\n3. **Keep state records simple** to reduce complexity and improve maintainability\n\n4. **Use handle_cast for fire-and-forget** operations without response requirements\n\n5. **Implement proper termination** in terminate\u002F2 for resource cleanup\n\n6. **Set appropriate timeout values** to prevent indefinite blocking in calls\n\n7. **Use gen_statem for complex state machines** with many states and transitions\n\n8. **Design supervisor hierarchies** that match application component dependencies\n\n9. **Use appropriate restart strategies** based on child process relationships\n\n10. **Test supervisor behavior** by intentionally crashing children to verify\n    recovery\n\n## Common Pitfalls\n\n1. **Blocking in handle_call** prevents processing other messages causing deadlock\n\n2. **Not matching all message patterns** causes unhandled message accumulation\n\n3. **Forgetting to reply** in handle_call leaves callers waiting indefinitely\n\n4. **Using wrong supervision strategy** causes unnecessary process restarts\n\n5. **Not setting process_flag trap_exit** prevents graceful termination handling\n\n6. **Creating circular dependencies** in supervisor trees causes startup failures\n\n7. **Using temporary restart** for critical processes allows permanent failures\n\n8. **Not implementing code_change** prevents hot code upgrades\n\n9. **Storing large state** in gen_server causes memory issues\n\n10. **Not handling timeout** in state machines allows infinite blocking\n\n## When to Use This Skill\n\nApply gen_server for any stateful process requiring client-server interaction.\n\nUse gen_statem when implementing protocols or systems with explicit state\ntransitions.\n\nLeverage supervisors for all applications requiring fault tolerance and automatic\nrecovery.\n\nBuild supervisor trees to structure complex applications with multiple components.\n\nUse OTP behaviors for production systems requiring reliability and maintainability.\n\n## Resources\n\n- [Erlang OTP Design Principles](\u003Chttps:\u002F\u002Fwww.erlang.org\u002Fdoc\u002Fdesign_principles\u002Fusers_guide.html>)\n- [Gen_server Manual](\u003Chttps:\u002F\u002Fwww.erlang.org\u002Fdoc\u002Fman\u002Fgen_server.html>)\n- [Gen_statem Manual](\u003Chttps:\u002F\u002Fwww.erlang.org\u002Fdoc\u002Fman\u002Fgen_statem.html>)\n- [Supervisor Manual](\u003Chttps:\u002F\u002Fwww.erlang.org\u002Fdoc\u002Fman\u002Fsupervisor.html>)\n- [Learn You Some Erlang - OTP](\u003Chttps:\u002F\u002Flearnyousomeerlang.com\u002Fwhat-is-otp>)\n",{"name":5,"description":7},"main","7eeb258ada72b7f58119b0e7a2c00ea89d9beedd","tasks-no-skills\u002Ffix-erlang-ssh-cve\u002Fenvironment\u002Fskills\u002Ferlang-otp-behaviors","https:\u002F\u002Fgithub.com\u002FWaaaalnut\u002Fskillsbench","https:\u002F\u002Fgithub.com\u002FWaaaalnut","student of Zhejiang University","2026-04-21 23:16:23",{"source":8,"skillName":5,"commands":51,"prompt":61,"zipAvailable":62},[52,55,58],{"tool":53,"command":54},"npx","npx skills add Waaaalnut\u002Fskillsbench --skill erlang-otp-behaviors",{"tool":56,"command":57},"bunx","bunx skills add Waaaalnut\u002Fskillsbench --skill erlang-otp-behaviors",{"tool":59,"command":60},"pnpm","pnpm dlx skills add Waaaalnut\u002Fskillsbench --skill erlang-otp-behaviors","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FWaaaalnut\u002Fskillsbench\u002Fblob\u002Fmain\u002Ftasks-no-skills\u002Ffix-erlang-ssh-cve\u002Fenvironment\u002Fskills\u002Ferlang-otp-behaviors\u002FSKILL.md",true,[],[65,79,94,120,142,160],{"skillNo":66,"name":67,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":75,"publishedAt":38},"01M6XEWMJ6VY3ZC53MPDCPG3GH","data-reconciliation","https:\u002F\u002Fgithub.com\u002FWaaaalnut\u002Fskillsbench\u002Fblob\u002Fmain\u002Ftasks\u002Fxlsx-recover-data\u002Fenvironment\u002Fskills\u002Fdata-reconciliation\u002FSKILL.md",[70],{"categoryNo":71,"categoryName":72,"taxonomyType":73,"taxonomyTypeDesc":74},"01JBSEEDCAT000000000000033","数据分析师","PROFESSION","适用职业",[76,77,78],"data reconciliation","reconciliation","data",{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":38},"01M6XEW8MNPMF1KRXV6ATGFRQF","speech-to-text","Transcribe video to timestamped text using Whisper tiny model (pre-installed).","https:\u002F\u002Fgithub.com\u002FWaaaalnut\u002Fskillsbench\u002Fblob\u002Fmain\u002Ftasks\u002Fvideo-tutorial-indexer\u002Fenvironment\u002Fskills\u002Fspeech-to-text\u002FSKILL.md",[],[86,87,88,89,90,91,92,93],"speech","text","speech to text","transcribe video","whisper","model","Video","transcribe",{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":105,"publishedAt":38},"01M6XEW3FQZP0T1RKQQJFXVY9T","video-processor","Process videos by removing segments and concatenating remaining parts. Use when you need to remove detected pauses\u002Fopenings from videos, create highlight reels, or batch process segment removals using ffmpeg filter_complex.","https:\u002F\u002Fgithub.com\u002FWaaaalnut\u002Fskillsbench\u002Fblob\u002Fmain\u002Ftasks\u002Fvideo-silence-remover\u002Fenvironment\u002Fskills\u002Fvideo-processor\u002FSKILL.md",[100],{"categoryNo":101,"categoryName":102,"taxonomyType":103,"taxonomyTypeDesc":104},"01JBSEEDCAT000000000000016","图像与多媒体","SCENARIO","使用场景",[92,106,107,108,109,110,22,111,112,113,114,115,116,117,118,34,119],"processor","video processor","batch","create","reels","parts","segments","process","videos","you","segment","filter","ffmpeg","remove",{"skillNo":121,"name":122,"nameZh":6,"description":123,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":124,"categories":125,"keywords":127,"publishedAt":38},"01M6XEVXJ5KZ0NTY3XZKRY4AS1","silence-detector","Detect initial silence segments in audio\u002Fvideo using energy-based analysis. Use when you need to find low-energy periods at the start of recordings (title slides, setup time, pre-roll silence).","https:\u002F\u002Fgithub.com\u002FWaaaalnut\u002Fskillsbench\u002Fblob\u002Fmain\u002Ftasks\u002Fvideo-silence-remover\u002Fenvironment\u002Fskills\u002Fsilence-detector\u002FSKILL.md",[126],{"categoryNo":101,"categoryName":102,"taxonomyType":103,"taxonomyTypeDesc":104},[128,129,130,131,22,115,132,133,134,135,136,112,137,138,92,139,140,141,34],"detector","silence detector","title","slides","time","energy","at","recordings","detect","find","Audio","analysis","start","setup",{"skillNo":143,"name":144,"nameZh":6,"description":145,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":146,"categories":147,"keywords":148,"publishedAt":38},"01M6XEVT3NGRN1FT7JPMAPXS6M","segment-combiner","Combine multiple segment detection results into a unified list. Use when you need to merge segments from different detectors, prepare removal lists for video processing, or consolidate detection outputs.","https:\u002F\u002Fgithub.com\u002FWaaaalnut\u002Fskillsbench\u002Fblob\u002Fmain\u002Ftasks\u002Fvideo-silence-remover\u002Fenvironment\u002Fskills\u002Fsegment-combiner\u002FSKILL.md",[],[116,149,92,150,151,152,153,24,22,154,155,112,115,156,157,34,158,159],"segment combiner","detection","prepare","merge","video processing","outputs","combine","processing","consolidate","results","list",{"skillNo":161,"name":162,"nameZh":6,"description":163,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":164,"categories":165,"keywords":169,"publishedAt":38},"01M6XEVMPVASGS2KX86QK4FMT7","report-generator","Generate compression reports for video processing. Use when you need to create structured JSON reports with duration statistics, compression ratios, and segment details after video processing.","https:\u002F\u002Fgithub.com\u002FWaaaalnut\u002Fskillsbench\u002Fblob\u002Fmain\u002Ftasks\u002Fvideo-silence-remover\u002Fenvironment\u002Fskills\u002Freport-generator\u002FSKILL.md",[166],{"categoryNo":167,"categoryName":168,"taxonomyType":73,"taxonomyTypeDesc":74},"01JBSEEDCAT000000000000034","行政与办公人员",[170,171,172,116,22,24,115,27,156,173,174,175,34,153,176,92,177,178,109],"generator","report generator","report","statistics","structured","reports","json","compression","generate"]