소스 정보
- 저장소
- tomevault-io/skills-registry
- 최근 소스 활동
- 2026년 7월 3일 19:45
- 감지된 SKILL.md 언어
- 영어
- 스타
- 0
- 포크
- 0
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/tomevault-io/skills-registry --skill croma-elixir-conventions명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SOC 직업 분류 기준
SKILL.md 표시 중
| name | croma-elixir-conventions |
| description | >- Use when this capability is needed. |
When writing Elixir code in projects that use Croma, follow these conventions:
use Croma before the defmodule.defun / defunp instead of def / defp.case/cond over multi-clause functions when branching on a single argument's value. This keeps a single defun/defunp with v[] validation:
# Good - single defunp with case, gets v[] validation
defunp calculate_discount(price :: v[non_neg_integer()], membership_level :: v[atom()]) :: v[non_neg_integer()] do
case membership_level do
:gold -> round(price * 0.7)
:silver -> round(price * 0.85)
_ -> price
end
end
# Avoid - loses v[] validation, multiple clauses for simple value dispatch
@spec calculate_discount(non_neg_integer(), atom()) :: non_neg_integer()
defp calculate_discount(price, :gold), do: round(price * 0.7)
defp calculate_discount(price, :silver), do: round(price * 0.85)
defp calculate_discount(price, _), do: price
v[]v[] for runtime type validation. This applies to all types including union types and nilable types. Do not hesitate to use v[] on unions — it works correctly:
defun my_func(name :: v[String.t()], count :: v[non_neg_integer()]) :: v[String.t()] do
defun find_name(user_id :: v[String.t()]) :: v[nil | String.t()] do
defunp do_lookup(id :: v[String.t()]) :: v[nil | Terminal.t()] do
defunp classify(value :: v[String.t()]) :: v[:small | :large] do
v[] on single literal atom return types (e.g., :ok) — causes a compile warning:
defun pretty_print(str :: v[String.t()]) :: :ok do # Good
defun pretty_print(str :: v[String.t()]) :: v[:ok] do # Bad
v[] on types without Croma's valid?/1 (e.g., DateTime.t(), Keyword.t(), term()) — causes UndefinedFunctionError or RuntimeError:
defun process(dt :: DateTime.t()) :: v[String.t()] do # Good
defun process(dt :: v[DateTime.t()]) :: v[String.t()] do # Bad
defun process(arg :: v[{:ok, term()} | :timeout]) :: term() do # Good
defun process(arg :: v[{:ok, term()} | :timeout]) :: v[term()] do # Bad
{:ok, value} | {:error, reason}, use alias Croma.Result, as: R and R.t(value_type):
alias Croma.Result, as: R
defun validate(name :: v[String.t()]) :: v[R.t(map())] do
R.t().use Croma
defmodule MyApp.UserValidator do
alias Croma.Result, as: R
defun validate(username :: v[String.t()], age :: v[non_neg_integer()]) ::
v[R.t(map())] do
{:ok, %{username: username, age: age}}
end
defunp check_length(value :: v[String.t()]) :: v[:ok | {:error, String.t()}] do
if String.length(value) > 0, do: :ok, else: {:error, "empty"}
end
end
Source: access-company/antikythera — distributed by TomeVault.