Skills
About 471 wordsAbout 2 min
Skills introduces the standardized capability set CNB provides for NPCs (AI assistants).
When to use: when an NPC should call platform capabilities — for example letting an AI assistant view repositories, create issues, or query build status, or attaching these capabilities to your own NPC.
Overview
Skills is a standardized capability set provided by CNB for NPCs (AI assistants), built on top of OpenAPI(Open in new window). It enables NPCs to fully interact with the platform.
Capability List
The official Skills repository is cnb/skills, 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, please refer to the OpenAPI documentation(Open in new window).
Usage Scenarios
Scenario 1: NPC Automatically Handles Issues
After a user @s an NPC in an Issue, the NPC automatically loads the corresponding Skill to complete the task:
@CodeBuddy Can you check if this Issue can be closed?Scenario 2: NPC Automatically Reviews Code
After a user @s an NPC in a PR requesting code review:
@CodeBuddy Can you review this PR?Installation & Configuration
Installing Skills
Install Skills in the NPC runtime image (relies on the cnb command provided by CNB CLI):
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 -yCustom Skills
Create custom Skills in the project's .codebuddy/skills/ directory. Each Skill is a directory containing a SKILL.md file:
.codebuddy/skills/
my-skill/
SKILL.md # Skill definition file describing capabilities and usageThe NPC automatically recognizes and loads custom Skills in the project.
Priority for Skills with the same name
Global-level Skills take priority and override project-level Skills with the same name. If a repo ships a stale copy of a Skill, the global version installed in the runtime image wins.
Related Documentation
- CNB CLI Plugin — The underlying command-line tool used by Skills, exposing the full OpenAPI via the
cnbcommand - NPC — NPC concepts, event types, and configuration
- NPC Configuration — How to define NPC roles in a repository
- OpenAPI — Complete CNB platform API documentation