BuilderSkill

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

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 rejects with PermissionDenied.

Attributes
idstring
namestring
descriptionstring
scope"owned" | "shared"
ownerIdstring | null
enabledboolean
mutedboolean

Muted for your account alone: the way to stop one shared with it loading.

hasTextboolean
hasWorkflowboolean
bodyTextstring | null

Its text and workflow, on one read whole (get, and what a change answers); null on a list's.

bodyWorkflowJsonObject | null
createdAtDate | null
updatedAtDate | null
rawJsonObject

The response JSON exactly as the API sent it.

Types
type JsonObject = { [key: string]: unknown };

liststatic

static list(options?: { client?: NoClick }): Promise<BuilderSkill[]>

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

for (const skill of await BuilderSkill.list()) console.log(skill.name, skill.enabled && !skill.muted);
Parameters
options.clientNoClick

The client to send with; defaults to the module client built from NOCLICK_API_KEY.

Returns

Each skill, without its text and workflow (get reads one whole).

createstatic

static create(
  fields: BuilderSkillFields & { name: string },
  options?: { client?: NoClick },
): Promise<BuilderSkill>

Make a builder skill in your account's active workspace.

await BuilderSkill.create({ name: "Brand voice", description: "How we write.", bodyText: "Short sentences." });
Parameters
fieldsBuilderSkillFields & { name: string }required
options.clientNoClick

The client to send with; defaults to the module client built from NOCLICK_API_KEY.

Returns

The skill, whole.

Types
/** What a builder skill says, set when it's made or changed. */
interface BuilderSkillFields {
  name?: string;
  /** When the builder should use it: what it reads to decide. */
  description?: string;
  /** What it tells the builder; an empty string clears it. */
  bodyText?: string;
  /** A workflow it may follow (nodes and edges). */
  bodyWorkflow?: JsonObject;
  /** Whether the builder loads it. */
  enabled?: boolean;
}

type JsonObject = { [key: string]: unknown };

getstatic

static get(id: string, options?: { client?: NoClick }): Promise<BuilderSkill>

One builder skill, with its text and workflow.

Parameters
idstringrequired
options.clientNoClick

The client to send with; defaults to the module client built from NOCLICK_API_KEY.

Returns

The skill, whole.

update

update(
  fields: BuilderSkillFields & { muted?: boolean },
  options?: { client?: NoClick },
): Promise<BuilderSkill>

Change it: what it says or whether it's enabled (its owner, or a share that may edit it; others reject with PermissionDenied), and whether it's muted for your account (anyone it reaches). Fields left out stay as they are. Resolves to it as it stands after.

await skill.update({ muted: true });
Parameters
fieldsBuilderSkillFields & { muted?: boolean }required
options.clientNoClick

The client to send with; defaults to the module client built from NOCLICK_API_KEY.

Returns

It, as it stands after the change.

Types
/** What a builder skill says, set when it's made or changed. */
interface BuilderSkillFields {
  name?: string;
  /** When the builder should use it: what it reads to decide. */
  description?: string;
  /** What it tells the builder; an empty string clears it. */
  bodyText?: string;
  /** A workflow it may follow (nodes and edges). */
  bodyWorkflow?: JsonObject;
  /** Whether the builder loads it. */
  enabled?: boolean;
}

type JsonObject = { [key: string]: unknown };

delete

delete(options?: { client?: NoClick }): Promise<void>

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

Parameters
options.clientNoClick

The client to send with; defaults to the module client built from NOCLICK_API_KEY.