INVOKE BEFORE editing Ash resources/actions/policies/notifiers.
Use when
Files under *_ash/ or lib/**/ash/**.
Adding actions, attributes, or policies.
Checklist
Keep resources thin: validations in changes, logic in actions, side-effects in notifiers.
Authorization: define policies per action; default deny; use bypass? false.
Queries: preload related data in queries to avoid N+1; use calculations instead of manual Enum maps.
Changes: prefer change set_attribute/change manage_relationship over custom code.
APIs: expose minimal public actions; avoid direct Repo access from controllers.
Warnings to emit
Direct Repo calls from controllers bypassing Ash APIs.
Missing policy for custom actions.
Large after_action blocks doing IO; move to notifiers/observers.
References
ai-rules patterns: patterns/ash/ if present.
1---2name: ash-guardrails3description: Skill: ash-guardrails4---5# Skill: ash-guardrails67**INVOKE BEFORE** editing Ash resources/actions/policies/notifiers.89## Use when10- Files under `*_ash/` or `lib/**/ash/**`.11- Adding actions, attributes, or policies.1213## Checklist14- Keep resources thin: validations in changes, logic in actions, side-effects in notifiers.15- Authorization: define policies per action; default deny; use `bypass? false`.16- Queries: preload related data in queries to avoid N+1; use calculations instead of manual Enum maps.17- Changes: prefer `change set_attribute`/`change manage_relationship` over custom code.18- APIs: expose minimal public actions; avoid direct Repo access from controllers.1920## Warnings to emit21- Direct Repo calls from controllers bypassing Ash APIs.22- Missing policy for custom actions.23- Large `after_action` blocks doing IO; move to notifiers/observers.2425## References26- ai-rules patterns: `patterns/ash/` if present.
Run npx skillmds@latest add layeddie/ash-guardrails in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Skill: ash-guardrails It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
layeddie (@layeddie) published this skill. Their other Agent Skills are listed on their SkillMD profile.