---
url: /en/develops/skills.md
description: >-
  Introduces CNB Skills, an OpenAPI-based toolkit that enables full AI
  interaction capabilities with the Cloud Native Build platform, covering
  concepts, loading mechanism, usage scenarios, and configuration.
---
## Overview

Skills is a standardized capability set provided by CNB for NPCs (AI assistants), built on top of [OpenAPI](https://api.cnb.build). It enables NPCs to interact fully with the `Cloud Native Build` platform.

In simple terms, **Skills are like "skill packs" for NPCs** — each Skill encapsulates domain-specific knowledge and operation instructions, and NPCs can automatically load matching Skills based on the current task to gain the corresponding expertise.

## Skill Capabilities

The official CNB Skills repository is [cnb/skills](https://cnb.cool/cnb/skills/cnb-skill), which includes the following core capabilities:

**Code Hosting**:

* Repository management (view, create, search)
* Issue operations (create, comment, close, label management)
* PR operations (create, review, merge, status check)
* Git operations (branch management, tags, releases)
* Code review (automated review, inline comments)

**Build & Deployment**:

* Pipeline configuration and triggering
* Build log querying
* Build status checking

**Platform Interaction**:

* Organization and member management
* User information querying
* Artifact registry operations
* Search and activities

> For a more complete list of API capabilities, refer to the [OpenAPI documentation](https://api.cnb.build).

## Usage Scenarios

### Scenario 1: NPC Automatically Handles Issues

When a user `@`s an NPC in an Issue and makes a request, the NPC automatically loads the corresponding Skills to complete the task. For example:

```text
@CodeBuddy Can you check if this Issue can be closed?
```

The NPC loads Issue-related Skills, queries the Issue status, and provides a response.

### Scenario 2: NPC Automatically Reviews Code

When a user `@`s an NPC in a PR requesting code review, the NPC loads code review related Skills:

```text
@CodeBuddy Can you review this PR?
```

## Installation & Configuration

### Installing Skills

Install Skills in the NPC runtime image:

```Dockerfile title="Dockerfile"
FROM node:22-bookworm-slim

RUN apt-get update \
    && apt-get install -y --no-install-recommends ca-certificates git git-lfs curl jq ripgrep \
    && rm -rf /var/lib/apt/lists/* \
    && git lfs install \
    && npm install -g @cnbcool/cnb-cli skills \
    && npx skills add https://cnb.cool/cnb/skills/cnb-skill.git -g -y
```

### Custom Skills

You can create custom Skills in the project's `.codebuddy/skills/` directory. Each Skill is a directory containing a `SKILL.md` file:

```text
.codebuddy/skills/
  my-skill/
    SKILL.md    # Skill definition file describing capabilities and usage
```

The NPC automatically recognizes and loads custom Skills in the project.

## Related Documentation

* [NPC Events](../build/npc.md) — Learn about NPC concepts, event types, and configuration
* [NPC Configuration](../repo/settings-npc.md) — Learn how to define NPC roles in a repository
* [OpenAPI](./openapi.md) — View the complete CNB platform API documentation
