usage-rules
БесплатноБез исполняемых скриптовНе проверенSearch for package-specific usage rules and best practices from Elixir packages. Use when you need coding conventions, patterns, common mistakes, or good/bad…
от bradleygolden★ 176 звёзд на GitHubОб этом скилле
Usage Rules Search
Find package-specific best practices and coding conventions from usage-rules.md files.
What Are Usage Rules?
A community convention where packages include a usage-rules.md file with:
- Coding conventions and patterns
- Good/bad code examples (marked
# GOOD,# BAD,# AVOID) - Common mistakes to avoid
- Domain-specific idioms
Search Locations (in order)
- Project deps:
deps/<package>/usage-rules.md - Fetched cache:
.usage-rules/<package>-<version>/usage-rules.md - Fetch if needed: Extract from package (see below)
Packages With Usage Rules
Primarily the Ash ecosystem:
ash,ash_postgres,ash_phoenix,ash_json_api,ash_graphqlspark,igniter,reactor
Most packages (Phoenix, Ecto, etc.) do not have usage-rules.md yet. For those, suggest hex-docs-search skill or official guides.
Fetching Usage Rules
# Fetch package and extract usage-rules.md
mix hex.package fetch <package> <version> --unpack --output .usage-rules/.tmp/<package>-<version>
# If usage-rules.md exists, copy to cache
if [ -f ".usage-rules/.tmp/<package>-<version>/usage-rules.md" ]; then
mkdir -p ".usage-rules/<package>-<version>"
cp ".usage-rules/.tmp/<package>-<version>/usage-rules.md" ".usage-rules/<package>-<version>/"
fi
# Clean up
rm -rf ".usage-rules/.tmp/<package>-<version>"
Mention adding .usage-rules/ to .gitignore once per session when fetching occurs.
Context-Aware Extraction
Usage rules files can be large. Extract relevant sections based on user's question:
| User Context | Look for Sections |
|---|---|
| querying, filters | "Querying", "Filters", "Read Actions" |
| actions, create/update | "Actions", "Changes", "Validations" |
| relationships | "Relationships", "Aggregates" |
| errors, validation | "Error Handling", "Validations" |
| authorization | "Policies", "Authorization" |
| testing | "Testing" |
Find section headings with line numbers, then extract the relevant section content.
Key Behaviors
- Extract relevant sections, don't dump entire file
- Highlight
# GOODvs# BADpatterns explicitly - Note when package doesn't provide usage rules
- Suggest
hex-docs-searchfor API documentation (complementary) - Version awareness: prefer deps/ version over cached
Установить usage-rules в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
ReadGrepGlobBashAskUserQuestionВложенные файлы
FAQ
Что делает скилл usage-rules?
Search for package-specific usage rules and best practices from Elixir packages. Use when you need coding conventions, patterns, common mistakes, or good/bad examples for packages like Ash, Phoenix, Ecto, etc.
Как установить скилл usage-rules?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл usage-rules запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic