# BuilderSkill

> BuilderSkill: the skills NoClick's workflow builder loads before it builds, apart from the Agent Skills an agent attaches (`noclick.Skill`).

## noclick.BuilderSkill

```python
class BuilderSkill
```

A skill NoClick's builder loads: a description the builder reads to decide whether it needs it, plus text and,
optionally, a workflow to follow. `scope` says whose: `owned` (your account's, or a workspace it's in) or
`shared` (shared with it to read). It loads while it's `enabled` and not `muted` for your account. They're
what Settings → Skills in the NoClick app shows. Any of your account's own keys reads and changes them; one held to
one of your users raises `noclick.PermissionDenied`.

| Attribute | Type | Description |
| --- | --- | --- |
| `id` | `str` |  |
| `name` | `str` |  |
| `description` | `str` |  |
| `scope` | `str` |  |
| `owner_id` | `str | None` |  |
| `enabled` | `bool` |  |
| `muted` | `bool` |  |
| `has_text` | `bool` |  |
| `has_workflow` | `bool` |  |
| `body_text` | `str | None` |  |
| `body_workflow` | `dict[str, Any] | None` |  |
| `created_at` | `datetime | None` |  |
| `updated_at` | `datetime | None` |  |
| `raw` | `dict[str, Any]` | The response JSON exactly as the API sent it. |

### BuilderSkill.list

```python
noclick.BuilderSkill.list(*, client=None) -> list[BuilderSkill]
```

Your account's builder skills (`owned`), newest first, then those shared with it (`shared`).

Parameters:

- `client` (`Client | None`, default `None`): The client to send with; defaults to the module client built from `NOCLICK_API_KEY`.

Returns: `list[BuilderSkill]` Each skill, without its text and workflow (`get` reads one whole).

Usage:

```python
for skill in noclick.BuilderSkill.list():
    print(skill.name, skill.enabled and not skill.muted)
```

### BuilderSkill.create

```python
noclick.BuilderSkill.create(
    name, *, description=None, body_text=None, body_workflow=None, enabled=None,
    client=None
) -> BuilderSkill
```

Make a builder skill in your account's active workspace: `description` is when the builder should use it,
`body_text` what it tells the builder, `body_workflow` a workflow it may follow.

Parameters:

- `name` (`str`, required)
- `description` (`str | None`, default `None`)
- `body_text` (`str | None`, default `None`)
- `body_workflow` (`dict[str, Any] | None`, default `None`)
- `enabled` (`bool | None`, default `None`)
- `client` (`Client | None`, default `None`): The client to send with; defaults to the module client built from `NOCLICK_API_KEY`.

Returns: `BuilderSkill` The skill, whole.

Usage:

```python
noclick.BuilderSkill.create("Brand voice", description="How we write.", body_text="Short sentences.")
```

### BuilderSkill.get

```python
noclick.BuilderSkill.get(skill_id, *, client=None) -> BuilderSkill
```

One builder skill, with its text and workflow.

Parameters:

- `skill_id` (`str`, required)
- `client` (`Client | None`, default `None`): The client to send with; defaults to the module client built from `NOCLICK_API_KEY`.

Returns: `BuilderSkill` The skill, whole.

Usage:

```python
skill = noclick.BuilderSkill.get(skill_id)
print(skill.body_text)
```

### BuilderSkill.update

```python
builder_skill.update(
    *, name=None, description=None, body_text=None, body_workflow=None, enabled=None,
    muted=None, client=None
) -> BuilderSkill
```

Change it: what it says or whether it's enabled (its owner, or a share that may edit it; others raise
`noclick.PermissionDenied`), and whether it's `muted` for your account (anyone it reaches). Arguments left
out stay as they are.

Parameters:

- `name` (`str | None`, default `None`)
- `description` (`str | None`, default `None`)
- `body_text` (`str | None`, default `None`)
- `body_workflow` (`dict[str, Any] | None`, default `None`)
- `enabled` (`bool | None`, default `None`)
- `muted` (`bool | None`, default `None`)
- `client` (`Client | None`, default `None`): The client to send with; defaults to the module client built from `NOCLICK_API_KEY`.

Returns: `BuilderSkill` It, as it stands after the change.

Usage:

```python
skill.update(muted=True)
```

### BuilderSkill.delete

```python
builder_skill.delete(*, client=None) -> None
```

Delete it for good: only the account that made it may.

Parameters:

- `client` (`Client | None`, default `None`): The client to send with; defaults to the module client built from `NOCLICK_API_KEY`.

Usage:

```python
skill.delete()
```
