> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ooneex.com/llms.txt
> Use this file to discover all available pages before exploring further.

# permission:create

> Generate a new permission class.

Scaffolds a permission class and its test file in a module. It writes the class under the module's `src/permissions` directory, generates a matching test spec, and installs the `@ooneex/permission` package if it is missing.

## Usage

```bash theme={null}
ooneex permission:create [options]
```

## Examples

```bash theme={null}
ooneex permission:create
```

```bash theme={null}
ooneex permission:create --name=EditPost
```

```bash theme={null}
ooneex permission:create --name=EditPost --module=blog --override
```

## Options

| Option       | Description                                                               | Default             |
| ------------ | ------------------------------------------------------------------------- | ------------------- |
| `--name`     | Permission class name. The `Permission` suffix is appended automatically. | Prompted if omitted |
| `--module`   | Target module the class is generated into.                                | `shared`            |
| `--override` | Overwrite an existing class without prompting.                            | `false`             |

## AI Skill

This command ships a matching `permission:create` skill. It generates the permission class and its test file, then guides your AI agent through completing a permission that extends `Permission` from `@ooneex/permission`.

<Tabs>
  <Tab title="Claude">
    ```bash theme={null}
    ooneex claude:init
    ```
  </Tab>

  <Tab title="Codex">
    ```bash theme={null}
    ooneex codex:init
    ```
  </Tab>
</Tabs>
