agentleFS
alexmmatosalexmmatos/arthur-mcp/.claude/skills/add-permission/SKILL.md

add-permission

Skill2 starsChanged 4 months agoMITView on GitHub

Add or reuse a permission end-to-end (backend + frontend) for a new page, tab, endpoint, or protected action in Arthur MCP. Use whenever a feature introduces a new user-facing surface or protected action that needs a permission decision.

4 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions4 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 4

    1. fullstackhero/dotnet-starter-kit★ 6.9ksame name
    2. fpindej/netrock★ 234same name
    3. suxrobGM/logistics-app★ 209same name
    4. chenson42/stackkeel★ 1same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository3 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

7 rules. 0 are common, 2 are distinctive, and 5 are very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Decide: check whether an existing permission already covers this domain and risk.

    line 9
  2. Very specific:

    Add the key to the RolePermissions contract.

    line 11
  3. Very specific:

    Add it to built-in role presets in api/src/roles/permissions.ts.

    line 12
  4. Very specific:

    Add the key to the Permission enum and UserPermissions.

    line 15
  5. Very specific:

    Add it to role fallback presets in src/context/permissionPresets.ts.

    line 16
  6. Distinctive:

    Add a restricted empty state or disabled control for view-but-not-act cases.

    line 18
  7. Distinctive:

    Do not ship a frontend-only permission without backend enforcement, and do not ship backend-only protected behavior without a frontend …

    line 22

“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Wire a permission end-to-end for the feature being implemented. Full rules: .claude/rules/permissions.md and docs/DESIGN_PATTERNS.md (Guard and Decorator Authorization / Auth and Permission Context sections).

  1. Decide: check whether an existing permission already covers this domain and risk. If yes, reuse it and stop here — do not add a near-duplicate. If not, name the new permission <domain>_<verb> matching the action's risk (not just its domain).
  2. Backend, in the same change:
    • Add the key to the RolePermissions contract.
    • Add it to built-in role presets in api/src/roles/permissions.ts.
    • Guard the controller route with RequirePermission (or the relevant guard).
  3. Frontend, in the same change:
    • Add the key to the Permission enum and UserPermissions.
    • Add it to role fallback presets in src/context/permissionPresets.ts.
    • Gate the nav item / route / button with can(Permission.X).
    • Add a restricted empty state or disabled control for view-but-not-act cases; hide navigation only when the user cannot view the surface at all.
  4. Tests: cover the new guard/decorator behavior and the UI gate.
  5. Docs: record the decision per docs/DESIGN_PATTERNS.md's change checklist; update docs/FLOWS.md if the user journey changes.

Do not ship a frontend-only permission without backend enforcement, and do not ship backend-only protected behavior without a frontend permission model + restricted UI state. If backend support must be deferred, record the gap in docs/ROADMAP.md and keep the UI inaccessible until the backend permission exists.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.