{
  "schemaVersion": "1.0",
  "item": {
    "slug": "elixir-dev",
    "name": "Elixir Dev",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/gchapim/elixir-dev",
    "canonicalUrl": "https://clawhub.ai/gchapim/elixir-dev",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/elixir-dev",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=elixir-dev",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "references/mix-commands.md",
      "references/otp-patterns.md",
      "SKILL.md"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/elixir-dev"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/elixir-dev",
    "agentPageUrl": "https://openagent3.xyz/skills/elixir-dev/agent",
    "manifestUrl": "https://openagent3.xyz/skills/elixir-dev/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/elixir-dev/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Running Mix Commands",
        "body": "See references/mix-commands.md for full command reference."
      },
      {
        "title": "Test",
        "body": "# Run all tests\nmix test\n\n# Specific file or line\nmix test test/my_app/accounts_test.exs:42\n\n# By tag\nmix test --only integration\n\n# Failed only (requires --failed flag from prior run)\nmix test --failed\n\n# With coverage\nmix test --cover\n\nInterpreting failures:\n\n** (MatchError) — Pattern match failed; check return value shape.\n** (Ecto.NoResultsError) — Repo.get! with non-existent ID; use Repo.get or seed data.\n** (DBConnection.OwnershipError) — Missing async: true or sandbox setup.\nno function clause matching — Wrong arity or unexpected arg type."
      },
      {
        "title": "Credo",
        "body": "mix credo --strict\nmix credo suggest --format json\nmix credo explain MyApp.Module  # Explain issues for specific module\n\nCommon Credo fixes:\n\nCredo.Check.Readability.ModuleDoc — Add @moduledoc.\nCredo.Check.Refactor.CyclomaticComplexity — Extract helper functions.\nCredo.Check.Design.TagTODO — Address or remove TODO comments."
      },
      {
        "title": "Dialyzer",
        "body": "mix dialyzer\nmix dialyzer --format short\n\nCommon Dialyzer warnings:\n\nThe pattern can never match — Dead code or wrong type in pattern.\nFunction has no local return — Crashes on all paths; check internal calls.\nThe call will never return — Calling a function that always raises.\nFix: Add @spec annotations; use @dialyzer {:nowarn_function, func: arity} as last resort."
      },
      {
        "title": "Format",
        "body": "mix format\nmix format --check-formatted  # CI mode — exit 1 if unformatted"
      },
      {
        "title": "Module Generation",
        "body": "Always include @moduledoc, @doc, and @spec on public functions."
      },
      {
        "title": "Context Module",
        "body": "defmodule MyApp.Notifications do\n  @moduledoc \"\"\"\n  Manages notification delivery and preferences.\n  \"\"\"\n  import Ecto.Query\n  alias MyApp.Repo\n  alias MyApp.Notifications.Notification\n\n  @doc \"List notifications for a user, most recent first.\"\n  @spec list_notifications(String.t(), keyword()) :: [Notification.t()]\n  def list_notifications(user_id, opts \\\\ []) do\n    limit = Keyword.get(opts, :limit, 50)\n\n    Notification\n    |> where(user_id: ^user_id)\n    |> order_by(desc: :inserted_at)\n    |> limit(^limit)\n    |> Repo.all()\n  end\nend"
      },
      {
        "title": "Schema Module",
        "body": "defmodule MyApp.Notifications.Notification do\n  @moduledoc \"\"\"\n  Schema for push/email/sms notifications.\n  \"\"\"\n  use Ecto.Schema\n  import Ecto.Changeset\n\n  @type t :: %__MODULE__{}\n\n  @primary_key {:id, :binary_id, autogenerate: true}\n  @foreign_key_type :binary_id\n  @timestamps_opts [type: :utc_datetime_usec]\n\n  schema \"notifications\" do\n    field :channel, Ecto.Enum, values: [:push, :email, :sms]\n    field :title, :string\n    field :body, :string\n    field :delivered_at, :utc_datetime_usec\n    field :user_id, :binary_id\n\n    timestamps()\n  end\n\n  @required ~w(channel title body user_id)a\n\n  @doc false\n  def changeset(notification, attrs) do\n    notification\n    |> cast(attrs, @required ++ [:delivered_at])\n    |> validate_required(@required)\n    |> validate_length(:title, max: 255)\n  end\nend"
      },
      {
        "title": "OTP Patterns",
        "body": "See references/otp-patterns.md for GenServer, Supervisor, Agent, Task patterns."
      },
      {
        "title": "When to Use What",
        "body": "PatternUse WhenGenServerStateful process with sync/async calls (cache, rate limiter, connection pool)AgentSimple state wrapper with no complex logicTaskOne-off async work, fire-and-forget or awaitedTask.SupervisorSupervised fire-and-forget tasksSupervisorManaging child process lifecyclesRegistryProcess lookup by name/keyDynamicSupervisorStarting children at runtime"
      },
      {
        "title": "GenServer Template",
        "body": "defmodule MyApp.RateLimiter do\n  @moduledoc \"Token bucket rate limiter.\"\n  use GenServer\n\n  # Client API\n  def start_link(opts) do\n    name = Keyword.get(opts, :name, __MODULE__)\n    GenServer.start_link(__MODULE__, opts, name: name)\n  end\n\n  @spec check_rate(String.t()) :: :ok | {:error, :rate_limited}\n  def check_rate(key), do: GenServer.call(__MODULE__, {:check, key})\n\n  # Server callbacks\n  @impl true\n  def init(opts) do\n    {:ok, %{limit: Keyword.get(opts, :limit, 100), window_ms: 60_000, buckets: %{}}}\n  end\n\n  @impl true\n  def handle_call({:check, key}, _from, state) do\n    now = System.monotonic_time(:millisecond)\n    {count, state} = increment(state, key, now)\n    if count <= state.limit, do: {:reply, :ok, state}, else: {:reply, {:error, :rate_limited}, state}\n  end\n\n  defp increment(state, key, now) do\n    # Implementation\n  end\nend"
      },
      {
        "title": "Common Compilation Errors",
        "body": "ErrorCauseFixmodule X is not availableMissing dep or typoCheck mix.exs deps, verify module nameundefined function X/NNot imported/aliasedAdd import, alias, or full module path(CompileError) redefining moduleDuplicate module nameRename one of themprotocol not implementedMissing protocol implAdd defimpl for your structcannot use ^x outside of matchPin in wrong positionMove to pattern match context"
      },
      {
        "title": "Dynamic Filters",
        "body": "def list(filters) do\n  Enum.reduce(filters, base_query(), fn\n    {:status, val}, q -> where(q, [r], r.status == ^val)\n    {:since, dt}, q -> where(q, [r], r.inserted_at >= ^dt)\n    {:search, term}, q -> where(q, [r], ilike(r.name, ^\"%#{term}%\"))\n    _, q -> q\n  end)\n  |> Repo.all()\nend"
      },
      {
        "title": "Preloading",
        "body": "# Query-time preload (single query with join)\nfrom(p in Post, join: a in assoc(p, :author), preload: [author: a])\n\n# Separate query preload\nPost |> Repo.all() |> Repo.preload(:author)\n\n# Nested\nRepo.preload(posts, [comments: :author])"
      },
      {
        "title": "Aggregates",
        "body": "from(o in Order,\n  where: o.tenant_id == ^tenant_id,\n  group_by: o.status,\n  select: {o.status, count(o.id), sum(o.amount)}\n)\n|> Repo.all()"
      },
      {
        "title": "Mount + Handle Events",
        "body": "defmodule MyAppWeb.DashboardLive do\n  use MyAppWeb, :live_view\n\n  @impl true\n  def mount(_params, _session, socket) do\n    {:ok, assign(socket, items: [], loading: true)}\n  end\n\n  @impl true\n  def handle_event(\"delete\", %{\"id\" => id}, socket) do\n    MyApp.Items.delete_item!(id)\n    {:noreply, assign(socket, items: MyApp.Items.list_items())}\n  end\n\n  @impl true\n  def render(assigns) do\n    ~H\"\"\"\n    <div :for={item <- @items}>\n      <span><%= item.name %></span>\n      <button phx-click=\"delete\" phx-value-id={item.id}>Delete</button>\n    </div>\n    \"\"\"\n  end\nend"
      },
      {
        "title": "PubSub for Real-time",
        "body": "# Subscribe in mount\ndef mount(_, _, socket) do\n  if connected?(socket), do: Phoenix.PubSub.subscribe(MyApp.PubSub, \"items\")\n  {:ok, assign(socket, items: list_items())}\nend\n\n# Broadcast from context\ndef create_item(attrs) do\n  with {:ok, item} <- %Item{} |> Item.changeset(attrs) |> Repo.insert() do\n    Phoenix.PubSub.broadcast(MyApp.PubSub, \"items\", {:item_created, item})\n    {:ok, item}\n  end\nend\n\n# Handle in LiveView\ndef handle_info({:item_created, item}, socket) do\n  {:noreply, update(socket, :items, &[item | &1])}\nend"
      }
    ],
    "body": "Elixir Dev\nRunning Mix Commands\n\nSee references/mix-commands.md for full command reference.\n\nTest\n# Run all tests\nmix test\n\n# Specific file or line\nmix test test/my_app/accounts_test.exs:42\n\n# By tag\nmix test --only integration\n\n# Failed only (requires --failed flag from prior run)\nmix test --failed\n\n# With coverage\nmix test --cover\n\n\nInterpreting failures:\n\n** (MatchError) — Pattern match failed; check return value shape.\n** (Ecto.NoResultsError) — Repo.get! with non-existent ID; use Repo.get or seed data.\n** (DBConnection.OwnershipError) — Missing async: true or sandbox setup.\nno function clause matching — Wrong arity or unexpected arg type.\nCredo\nmix credo --strict\nmix credo suggest --format json\nmix credo explain MyApp.Module  # Explain issues for specific module\n\n\nCommon Credo fixes:\n\nCredo.Check.Readability.ModuleDoc — Add @moduledoc.\nCredo.Check.Refactor.CyclomaticComplexity — Extract helper functions.\nCredo.Check.Design.TagTODO — Address or remove TODO comments.\nDialyzer\nmix dialyzer\nmix dialyzer --format short\n\n\nCommon Dialyzer warnings:\n\nThe pattern can never match — Dead code or wrong type in pattern.\nFunction has no local return — Crashes on all paths; check internal calls.\nThe call will never return — Calling a function that always raises.\nFix: Add @spec annotations; use @dialyzer {:nowarn_function, func: arity} as last resort.\nFormat\nmix format\nmix format --check-formatted  # CI mode — exit 1 if unformatted\n\nModule Generation\n\nAlways include @moduledoc, @doc, and @spec on public functions.\n\nContext Module\ndefmodule MyApp.Notifications do\n  @moduledoc \"\"\"\n  Manages notification delivery and preferences.\n  \"\"\"\n  import Ecto.Query\n  alias MyApp.Repo\n  alias MyApp.Notifications.Notification\n\n  @doc \"List notifications for a user, most recent first.\"\n  @spec list_notifications(String.t(), keyword()) :: [Notification.t()]\n  def list_notifications(user_id, opts \\\\ []) do\n    limit = Keyword.get(opts, :limit, 50)\n\n    Notification\n    |> where(user_id: ^user_id)\n    |> order_by(desc: :inserted_at)\n    |> limit(^limit)\n    |> Repo.all()\n  end\nend\n\nSchema Module\ndefmodule MyApp.Notifications.Notification do\n  @moduledoc \"\"\"\n  Schema for push/email/sms notifications.\n  \"\"\"\n  use Ecto.Schema\n  import Ecto.Changeset\n\n  @type t :: %__MODULE__{}\n\n  @primary_key {:id, :binary_id, autogenerate: true}\n  @foreign_key_type :binary_id\n  @timestamps_opts [type: :utc_datetime_usec]\n\n  schema \"notifications\" do\n    field :channel, Ecto.Enum, values: [:push, :email, :sms]\n    field :title, :string\n    field :body, :string\n    field :delivered_at, :utc_datetime_usec\n    field :user_id, :binary_id\n\n    timestamps()\n  end\n\n  @required ~w(channel title body user_id)a\n\n  @doc false\n  def changeset(notification, attrs) do\n    notification\n    |> cast(attrs, @required ++ [:delivered_at])\n    |> validate_required(@required)\n    |> validate_length(:title, max: 255)\n  end\nend\n\nOTP Patterns\n\nSee references/otp-patterns.md for GenServer, Supervisor, Agent, Task patterns.\n\nWhen to Use What\nPattern\tUse When\nGenServer\tStateful process with sync/async calls (cache, rate limiter, connection pool)\nAgent\tSimple state wrapper with no complex logic\nTask\tOne-off async work, fire-and-forget or awaited\nTask.Supervisor\tSupervised fire-and-forget tasks\nSupervisor\tManaging child process lifecycles\nRegistry\tProcess lookup by name/key\nDynamicSupervisor\tStarting children at runtime\nGenServer Template\ndefmodule MyApp.RateLimiter do\n  @moduledoc \"Token bucket rate limiter.\"\n  use GenServer\n\n  # Client API\n  def start_link(opts) do\n    name = Keyword.get(opts, :name, __MODULE__)\n    GenServer.start_link(__MODULE__, opts, name: name)\n  end\n\n  @spec check_rate(String.t()) :: :ok | {:error, :rate_limited}\n  def check_rate(key), do: GenServer.call(__MODULE__, {:check, key})\n\n  # Server callbacks\n  @impl true\n  def init(opts) do\n    {:ok, %{limit: Keyword.get(opts, :limit, 100), window_ms: 60_000, buckets: %{}}}\n  end\n\n  @impl true\n  def handle_call({:check, key}, _from, state) do\n    now = System.monotonic_time(:millisecond)\n    {count, state} = increment(state, key, now)\n    if count <= state.limit, do: {:reply, :ok, state}, else: {:reply, {:error, :rate_limited}, state}\n  end\n\n  defp increment(state, key, now) do\n    # Implementation\n  end\nend\n\nCommon Compilation Errors\nError\tCause\tFix\nmodule X is not available\tMissing dep or typo\tCheck mix.exs deps, verify module name\nundefined function X/N\tNot imported/aliased\tAdd import, alias, or full module path\n(CompileError) redefining module\tDuplicate module name\tRename one of them\nprotocol not implemented\tMissing protocol impl\tAdd defimpl for your struct\ncannot use ^x outside of match\tPin in wrong position\tMove to pattern match context\nEcto Query Patterns\nDynamic Filters\ndef list(filters) do\n  Enum.reduce(filters, base_query(), fn\n    {:status, val}, q -> where(q, [r], r.status == ^val)\n    {:since, dt}, q -> where(q, [r], r.inserted_at >= ^dt)\n    {:search, term}, q -> where(q, [r], ilike(r.name, ^\"%#{term}%\"))\n    _, q -> q\n  end)\n  |> Repo.all()\nend\n\nPreloading\n# Query-time preload (single query with join)\nfrom(p in Post, join: a in assoc(p, :author), preload: [author: a])\n\n# Separate query preload\nPost |> Repo.all() |> Repo.preload(:author)\n\n# Nested\nRepo.preload(posts, [comments: :author])\n\nAggregates\nfrom(o in Order,\n  where: o.tenant_id == ^tenant_id,\n  group_by: o.status,\n  select: {o.status, count(o.id), sum(o.amount)}\n)\n|> Repo.all()\n\nPhoenix LiveView Basics\nMount + Handle Events\ndefmodule MyAppWeb.DashboardLive do\n  use MyAppWeb, :live_view\n\n  @impl true\n  def mount(_params, _session, socket) do\n    {:ok, assign(socket, items: [], loading: true)}\n  end\n\n  @impl true\n  def handle_event(\"delete\", %{\"id\" => id}, socket) do\n    MyApp.Items.delete_item!(id)\n    {:noreply, assign(socket, items: MyApp.Items.list_items())}\n  end\n\n  @impl true\n  def render(assigns) do\n    ~H\"\"\"\n    <div :for={item <- @items}>\n      <span><%= item.name %></span>\n      <button phx-click=\"delete\" phx-value-id={item.id}>Delete</button>\n    </div>\n    \"\"\"\n  end\nend\n\nPubSub for Real-time\n# Subscribe in mount\ndef mount(_, _, socket) do\n  if connected?(socket), do: Phoenix.PubSub.subscribe(MyApp.PubSub, \"items\")\n  {:ok, assign(socket, items: list_items())}\nend\n\n# Broadcast from context\ndef create_item(attrs) do\n  with {:ok, item} <- %Item{} |> Item.changeset(attrs) |> Repo.insert() do\n    Phoenix.PubSub.broadcast(MyApp.PubSub, \"items\", {:item_created, item})\n    {:ok, item}\n  end\nend\n\n# Handle in LiveView\ndef handle_info({:item_created, item}, socket) do\n  {:noreply, update(socket, :items, &[item | &1])}\nend"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/gchapim/elixir-dev",
    "publisherUrl": "https://clawhub.ai/gchapim/elixir-dev",
    "owner": "gchapim",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/elixir-dev",
    "downloadUrl": "https://openagent3.xyz/downloads/elixir-dev",
    "agentUrl": "https://openagent3.xyz/skills/elixir-dev/agent",
    "manifestUrl": "https://openagent3.xyz/skills/elixir-dev/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/elixir-dev/agent.md"
  }
}