[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EMXVNBBF97VXRNQ7BVM5W9":3,"skill-same:01M7EMXVNBBF97VXRNQ7BVM5W9":45},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":26,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":29,"ownerDescription":6,"updatedAt":30,"install":31,"resources":44},"01M7EMXVNBBF97VXRNQ7BVM5W9","ams-elixir-pro",null,"TanNhatCMS\u002Fjarvis","TanNhatCMS","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F113796420?v=4","01M753MV17KG5CD3152G3WQEQY","KietNT","01M7EKEDYVYQ6PWVJJMZ911VMX",0,"MIT","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fams-elixir-pro\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: elixir-pro\ndescription: Idiomatic Elixir: functional design, OTP supervision, GenServers, Ecto, and Phoenix patterns. Use when writing, reviewing, or structuring Elixir applications.\ncategory: development\n---\n\n# Elixir Pro\n\n## Overview\n\nElixir's superpower — **fault-tolerant, concurrent systems via OTP on the BEAM** — comes with a\nphilosophy: let processes crash and supervisors restart them; keep state isolated in processes;\nmodel with pure functions and pipelines. Professional Elixir means thinking in processes and\nsupervision trees, writing small composable functions, and using Phoenix\u002FEcto idiomatically.\n\nThe through-line: embrace \"let it crash\" — but design the supervision tree so crashes don't matter.\n\n## When to use\n\n- Writing or reviewing Elixir code for idiom and OTP correctness.\n- Designing supervision trees, GenServers, and concurrent workflows.\n- Structuring Phoenix applications (contexts, Ecto schemas, LiveView).\n- Debugging process crashes, mailbox buildup, or supervision issues.\n- Choosing between processes, Tasks, Agents, and ETS.\n\n## Core concepts\n\n- **Functional core.** Immutable data, pure functions, pattern matching in function heads, and the\n  pipe operator (`|>`) for data transformation pipelines. Side effects pushed to the edges;\n  business logic as composable pure functions that are trivial to test.\n- **\"Let it crash\" (with supervision).** Don't defensively code every failure — write the happy\n  path clearly, and let supervisors restart failed processes to a known-good state. The discipline\n  is in the supervision tree design: which restarts, in what order, with what intensity limits.\n- **Processes are cheap; choose the right abstraction.** `Task` for one-off async work,\n  `GenServer` for stateful services, `Agent` for simple state (rarely — prefer GenServer),\n  ETS for shared in-memory lookup (with ownership discipline), Broadway for data pipelines.\n  Don't reach for GenServer when a pure function suffices.\n- **Phoenix contexts as boundaries.** `Accounts`, `Orders`, `Billing` — contexts group related\n  functionality and are the public API of that domain. Controllers\u002FLiveViews talk to contexts,\n  never directly to Ecto schemas across boundaries. This is where your architecture lives.\n- **Ecto: changesets for validation, queries composed.** Changesets cast + validate at the\n  boundary (never trust params); composable `Ecto.Query` for readable data access; database\n  constraints as the final integrity guarantee; migrations backward-compatible.\n- **Pattern matching over conditionals.** Multi-clause functions dispatching on shape\n  (`handle_call({:deposit, amt}, _, %{balance: b})`) — clearer than nested `if`s and the compiler\n  warns on unreachable or non-exhaustive patterns in many cases.\n\n## Practical workflow\n\n1. **Start with pure functions.** Model the domain as data transformations; test them without\n   processes, databases, or mocks — this is where most logic should live.\n2. **Design the supervision tree.** Draw it: which workers, which supervisors, restart strategies\n   (`one_for_one` vs `one_for_all` vs `rest_for_one`), max restarts. Stateless workers restart\n   trivially; stateful ones need a recovery story (rebuild from DB, not from memory).\n3. **Build Phoenix contexts.** One context per domain; public functions with clear contracts;\n   Ecto schemas private to the context where possible.\n4. **Handle concurrency deliberately.** `Task.async_stream` for bounded parallel work with\n   backpressure; GenServer `call` (sync, with timeouts) vs `cast` (async, no backpressure —\n   beware mailbox flooding); monitor don't link across trust boundaries.\n5. **Observe the BEAM.** `:observer` in dev, telemetry + Prometheus\u002FGrafana in prod; watch\n   process counts, mailbox sizes, and memory — BEAM systems fail in BEAM-specific ways (a\n   GenServer mailbox growing unboundedly is the classic).\n6. **Test in layers.** ExUnit for pure functions (fast, async); context tests with Ecto sandbox;\n   LiveView tests for critical interactions; property-based tests (StreamData) for tricky logic.\n\nIdiomatic snippets:\n\n```elixir\n# Pipeline + pattern matching over conditionals\ndef checkout(cart, user) do\n  cart\n  |> validate_cart()\n  |> apply_discounts(user)\n  |> charge_payment()\n  |> create_order()\nend\n\ndefp apply_discounts({:error, _} = err, _user), do: err\ndefp apply_discounts({:ok, cart}, %{tier: :gold}), do: {:ok, Discounts.gold(cart)}\ndefp apply_discounts({:ok, cart}, _user), do: {:ok, cart}\n\n# Bounded concurrency with backpressure\nurls\n|> Task.async_stream(&fetch\u002F1, max_concurrency: 10, timeout: 5_000)\n|> Enum.map(fn {:ok, result} -> result end)\n```\n\n## Common pitfalls\n\n- **GenServer for everything.** Wrapping pure logic in GenServers \"for concurrency\" serializes\n  work through one process and creates bottlenecks. Processes for state\u002Flifecycle; functions for logic.\n- **Unbounded casts.** `GenServer.cast` with no backpressure under load → mailbox grows until the\n  VM struggles. Prefer `call` with timeouts, or add explicit backpressure (GenStage\u002FBroadway).\n- **State that can't be rebuilt.** Keeping critical state only in process memory with no recovery\n  path. Supervisors restart processes; they don't restore amnesia — persist or rebuild.\n- **Leaking Ecto across contexts.** Controllers reaching into another context's schemas couples\n  domains. Contexts are APIs; respect them.\n- **Stringly-typed everything.** Atoms for known fixed sets (careful: atoms aren't GC'd — never\n  `String.to_atom` on user input; use `to_existing_atom`), structs for domain data, not bare maps\n  passed six functions deep.\n- **Ignoring process leaks.** Spawning unsupervised processes (plain `spawn`) that outlive their\n  purpose. Everything runs under a supervisor, or it's a leak with a timer.\n- **Overusing macros\u002Fmetaprogramming.** Compile-time magic that's hard to grep and debug. The\n  BEAM community's rule holds: macros when they remove real boilerplate at call sites, functions otherwise.\n","# Elixir Pro\n\n## Overview\n\nElixir's superpower — **fault-tolerant, concurrent systems via OTP on the BEAM** — comes with a\nphilosophy: let processes crash and supervisors restart them; keep state isolated in processes;\nmodel with pure functions and pipelines. Professional Elixir means thinking in processes and\nsupervision trees, writing small composable functions, and using Phoenix\u002FEcto idiomatically.\n\nThe through-line: embrace \"let it crash\" — but design the supervision tree so crashes don't matter.\n\n## When to use\n\n- Writing or reviewing Elixir code for idiom and OTP correctness.\n- Designing supervision trees, GenServers, and concurrent workflows.\n- Structuring Phoenix applications (contexts, Ecto schemas, LiveView).\n- Debugging process crashes, mailbox buildup, or supervision issues.\n- Choosing between processes, Tasks, Agents, and ETS.\n\n## Core concepts\n\n- **Functional core.** Immutable data, pure functions, pattern matching in function heads, and the\n  pipe operator (`|>`) for data transformation pipelines. Side effects pushed to the edges;\n  business logic as composable pure functions that are trivial to test.\n- **\"Let it crash\" (with supervision).** Don't defensively code every failure — write the happy\n  path clearly, and let supervisors restart failed processes to a known-good state. The discipline\n  is in the supervision tree design: which restarts, in what order, with what intensity limits.\n- **Processes are cheap; choose the right abstraction.** `Task` for one-off async work,\n  `GenServer` for stateful services, `Agent` for simple state (rarely — prefer GenServer),\n  ETS for shared in-memory lookup (with ownership discipline), Broadway for data pipelines.\n  Don't reach for GenServer when a pure function suffices.\n- **Phoenix contexts as boundaries.** `Accounts`, `Orders`, `Billing` — contexts group related\n  functionality and are the public API of that domain. Controllers\u002FLiveViews talk to contexts,\n  never directly to Ecto schemas across boundaries. This is where your architecture lives.\n- **Ecto: changesets for validation, queries composed.** Changesets cast + validate at the\n  boundary (never trust params); composable `Ecto.Query` for readable data access; database\n  constraints as the final integrity guarantee; migrations backward-compatible.\n- **Pattern matching over conditionals.** Multi-clause functions dispatching on shape\n  (`handle_call({:deposit, amt}, _, %{balance: b})`) — clearer than nested `if`s and the compiler\n  warns on unreachable or non-exhaustive patterns in many cases.\n\n## Practical workflow\n\n1. **Start with pure functions.** Model the domain as data transformations; test them without\n   processes, databases, or mocks — this is where most logic should live.\n2. **Design the supervision tree.** Draw it: which workers, which supervisors, restart strategies\n   (`one_for_one` vs `one_for_all` vs `rest_for_one`), max restarts. Stateless workers restart\n   trivially; stateful ones need a recovery story (rebuild from DB, not from memory).\n3. **Build Phoenix contexts.** One context per domain; public functions with clear contracts;\n   Ecto schemas private to the context where possible.\n4. **Handle concurrency deliberately.** `Task.async_stream` for bounded parallel work with\n   backpressure; GenServer `call` (sync, with timeouts) vs `cast` (async, no backpressure —\n   beware mailbox flooding); monitor don't link across trust boundaries.\n5. **Observe the BEAM.** `:observer` in dev, telemetry + Prometheus\u002FGrafana in prod; watch\n   process counts, mailbox sizes, and memory — BEAM systems fail in BEAM-specific ways (a\n   GenServer mailbox growing unboundedly is the classic).\n6. **Test in layers.** ExUnit for pure functions (fast, async); context tests with Ecto sandbox;\n   LiveView tests for critical interactions; property-based tests (StreamData) for tricky logic.\n\nIdiomatic snippets:\n\n```elixir\n# Pipeline + pattern matching over conditionals\ndef checkout(cart, user) do\n  cart\n  |> validate_cart()\n  |> apply_discounts(user)\n  |> charge_payment()\n  |> create_order()\nend\n\ndefp apply_discounts({:error, _} = err, _user), do: err\ndefp apply_discounts({:ok, cart}, %{tier: :gold}), do: {:ok, Discounts.gold(cart)}\ndefp apply_discounts({:ok, cart}, _user), do: {:ok, cart}\n\n# Bounded concurrency with backpressure\nurls\n|> Task.async_stream(&fetch\u002F1, max_concurrency: 10, timeout: 5_000)\n|> Enum.map(fn {:ok, result} -> result end)\n```\n\n## Common pitfalls\n\n- **GenServer for everything.** Wrapping pure logic in GenServers \"for concurrency\" serializes\n  work through one process and creates bottlenecks. Processes for state\u002Flifecycle; functions for logic.\n- **Unbounded casts.** `GenServer.cast` with no backpressure under load → mailbox grows until the\n  VM struggles. Prefer `call` with timeouts, or add explicit backpressure (GenStage\u002FBroadway).\n- **State that can't be rebuilt.** Keeping critical state only in process memory with no recovery\n  path. Supervisors restart processes; they don't restore amnesia — persist or rebuild.\n- **Leaking Ecto across contexts.** Controllers reaching into another context's schemas couples\n  domains. Contexts are APIs; respect them.\n- **Stringly-typed everything.** Atoms for known fixed sets (careful: atoms aren't GC'd — never\n  `String.to_atom` on user input; use `to_existing_atom`), structs for domain data, not bare maps\n  passed six functions deep.\n- **Ignoring process leaks.** Spawning unsupervised processes (plain `spawn`) that outlive their\n  purpose. Everything runs under a supervisor, or it's a leak with a timer.\n- **Overusing macros\u002Fmetaprogramming.** Compile-time magic that's hard to grep and debug. The\n  BEAM community's rule holds: macros when they remove real boilerplate at call sites, functions otherwise.\n",{},"main","af388a77c2fe5e0b4fd879cca4300a0ffa9a6579","skills\u002Fams-elixir-pro",1,"https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis","https:\u002F\u002Fgithub.com\u002FTanNhatCMS","https:\u002F\u002Fmrkiet.name.vn","2026-11-07 14:23:08",{"source":7,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add TanNhatCMS\u002Fjarvis --skill ams-elixir-pro",{"tool":37,"command":38},"bunx","bunx skills add TanNhatCMS\u002Fjarvis --skill ams-elixir-pro",{"tool":40,"command":41},"pnpm","pnpm dlx skills add TanNhatCMS\u002Fjarvis --skill ams-elixir-pro","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fams-elixir-pro\u002FSKILL.md",true,[],[46,53,61,68,75,82],{"skillNo":47,"name":48,"nameZh":6,"description":49,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":50,"categories":51,"keywords":52,"publishedAt":18},"01M7EWYJR0J8DARY7E59Z6Y9MV","web-scrape","Turn web pages into LLM-ready markdown via the Firecrawl API (renders JS, anti-bot handling). Use when browser_open\u002Ffetch fails on JS-heavy pages, or when you need clean markdown\u002Fstructured extraction from a site. Requires FIRECRAWL_API_KEY.","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fweb-scrape\u002FSKILL.md",[],[],{"skillNo":54,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":57,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":18},"01M7EWYBN5P6F2AJG3FR24T9BP","design-taste-frontend","tasteskill v2, the anti-slop frontend skill. Art direction for websites, distilled from a study of 247 curated gallery sites (One Page Love, Awwwards Sites of the Day). Deals researched directions (idea, composition, type, palette, photographs, section blueprints) from a library, enforces a strict no-slop house style with a real-browser inspector, and runs a look-and-fix loop on screenshots. Use this whenever you build, design, redesign, restyle, polish or review a landing page, marketing site, portfolio, product page, one-pager, hero or any public-facing web page, in any stack (HTML\u002FCSS, React, Next.js, Vue, Svelte, Astro, Tailwind) — also when the user says a page looks generic, templated, \"AI-made\", sloppy, or asks to make it look designed, premium, award-level or less like every other site. Not for dashboards or app screens.","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Ftaste-design\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Ftaste-design\u002FSKILL.md",[],[],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":18},"01M7EWY8FQFNQ2GB7NZZWGSSDX","test-driven-development","Use when implementing any feature or bugfix, before writing implementation code","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-tdd\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":18},"01M7EWY5SHBFRH1HDHVWM9K7TV","systematic-debugging","Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-debugging\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":18},"01M7EWY3NM0Z0JAKS7HDZ24K66","requesting-code-review","Use when completing tasks, implementing major features, or before merging to verify work meets requirements","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-code-review\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":18},"01M7EWY0WRMWX4M9ZFY0WKC593","brainstorming","You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-brainstorming\u002FSKILL.md",[],[]]