Skills
About 425 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 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, 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(Open in new window).
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:
@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:
@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
You can 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 — Learn about NPC concepts, event types, and configuration
- NPC Configuration — Learn how to define NPC roles in a repository
- OpenAPI — View the complete CNB platform API documentation