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/templates/claude/skills/ash-guardrails

SKILL.md

Skill: ash-guardrails

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.

Didn't find tool you were looking for?

Be as detailed as possible for better results