Skills
About 352 wordsAbout 1 min
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:
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.
Related Documentation
- NPC Events — NPC concepts, event types, and configuration
- NPC Configuration — How to define NPC roles in a repository
- OpenAPI — Complete CNB platform API documentation