# Add User Approval to Caffeine AI Apps

Applications need a controlled process for granting access to protected features. This skill guides backend approval checks, admin decisions, and frontend approval workflows.

## Install

```bash
npx skillstore add caffeinelabs/extension-user-approval
```

## Metadata

- Status: approved
- Slug: caffeinelabs-extension-user-approval
- Version: 0.1.5
- Author version: 0.1.5
- Skillstore revision: r2
- Version status: valid
- Tree hash: a4a4f54d91e927bcc62fa2f18195d0b008c1ec3986461ac56a98a5e0f0424dc0
- Author: caffeinelabs
- GitHub username: caffeinelabs
- License: MIT
- Repository: https://github.com/caffeinelabs/skills/tree/main/skills/extension-user-approval/
- Ref: a39a91716eadede5f4cdefd78178fed4e837a128
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: allowed
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: external\_commands, network, filesystem
- Quality score: 80
- Quality tier: silver
- Public page: https://skillstore.pages.dev/skills/caffeinelabs-extension-user-approval
- Manifest: https://skillstore.pages.dev/api/skills/caffeinelabs-extension-user-approval/manifest

## Capabilities

- Integrates the prefabricated user approval module into a Motoko backend.
- Defines endpoints for status checks, approval requests, user lists, and admin decisions.
- Shows approval guards that preserve administrator access to protected functions.
- Outlines a frontend flow for pending, approved, and rejected users.
- Specifies an admin dashboard for approval decisions and role management.

## Use Cases

- Gate a New Application: Add approval requests and protected feature access to a new Caffeine AI application.
- Secure Backend Operations: Apply administrator and approval checks to public Motoko functions.
- Build Approval Interfaces: Design user status screens and an administrator dashboard for reviewing access requests.

## Prompt Templates

### Add Basic Approval

```
Add the user approval extension to my Caffeine AI application. Identify prerequisites and outline the backend and frontend changes.
```

### Implement Backend Endpoints

```
Integrate approval state into my Motoko actor. Add the required endpoints and protect administrator operations with authorization checks.
```

### Design the Approval Flow

```
Create a frontend approval flow for pending, approved, and rejected users. Include request access and administrator review states.
```

### Audit Full Approval Integration

```
Review my complete Caffeine AI approval integration. Check every public function, administrator action, frontend state, and role interaction for authorization gaps.
```

## Limitations

- Requires the Caffeine AI authorization extension and declared Mops dependencies.
- Uses a prefabricated approval module that cannot be modified.
- Provides integration guidance rather than complete application files.
- Targets Caffeine AI applications with Motoko backends.

## Best Practices

- Complete the authorization extension before adding approval state.
- Check authorization and approval on every protected public backend function.
- Keep user status and administrator actions clear and consistent across the interface.

## Anti Patterns

- Do not rely only on frontend visibility to protect backend functions.
- Do not allow non-administrators to list users or change approval status.
- Do not duplicate or modify the prefabricated approval module.

## Security Audit

- Audited at: 2026-07-23T12:10:29.267\+00:00
- Summary: All 13 static findings are false positives caused by Markdown code fences, inline code, a documentation URL, and a relative documentation link. The skill contains no shell execution, runtime network request, path traversal operation, prompt injection, or other semantic security issue.

## Stats

- Views: 0
- Downloads: 6
- Favorites: 0
- Popularity score: 0
