Agent skill
ash-guardrails
Stars
0
Forks
1
Install this agent skill to your Project
npx add-skill https://github.com/layeddie/ai-rules/tree/main/tools/claude/skills/ash-guardrails
SKILL.md
Skill: ash-guardrails
INVOKE BEFORE editing Ash resources/actions/policies/notifiers.
Use when
- Files under
*_ash/orlib/**/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_relationshipover 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_actionblocks doing IO; move to notifiers/observers.
References
- ai-rules patterns:
patterns/ash/if present.
Didn't find tool you were looking for?