setup usage_rules

This commit is contained in:
2026-03-30 01:07:49 -04:00
parent cb179333f0
commit 934879f95f
31 changed files with 3459 additions and 1 deletions

28
mix.exs
View File

@@ -12,7 +12,8 @@ defmodule Mixer.MixProject do
deps: deps(),
compilers: [:phoenix_live_view] ++ Mix.compilers(),
listeners: [Phoenix.CodeReloader],
consolidate_protocols: Mix.env() != :dev
consolidate_protocols: Mix.env() != :dev,
usage_rules: usage_rules()
]
end
@@ -114,4 +115,29 @@ defmodule Mixer.MixProject do
precommit: ["compile --warnings-as-errors", "deps.unlock --unused", "format", "test"]
]
end
defp usage_rules do
[
file: "CLAUDE.md",
# rules to include directly in CLAUDE.md
usage_rules: ["usage_rules:all"],
skills: [
location: ".claude/skills",
# build skills that combine multiple usage rules
build: [
"ash-framework": [
# The description tells people how to use this skill.
description: "Use this skill working with Ash Framework or any of its extensions. Always consult this when making any domain changes, features or fixes.",
# Include all Ash dependencies
usage_rules: [:ash, ~r/^ash_/]
],
"phoenix-framework": [
description: "Use this skill working with Phoenix Framework. Consult this when working with the web layer, controllers, views, liveviews etc.",
# Include all Phoenix dependencies
usage_rules: [:phoenix, ~r/^phoenix_/]
]
]
]
]
end
end