cnb-code-commit

Writes code changes, commits, pushes branches, and creates pull requests on CNB.

3|1|Updated Feb 26, 2026
One-click install
npx skills add https://github.com/wopal-cn/wopal-space-ontology --skill cnb-code-commit-wopal-cn
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cnb-code-commit
Source: https://github.com/wopal-cn/wopal-space-ontology/tree/main/skills/cnb-code-commit
Command: npx skills add https://github.com/wopal-cn/wopal-space-ontology --skill cnb-code-commit-wopal-cn

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? It automates the repetitive cycle of implementing code changes, creating branches, committing, pushing, and opening pull requests in response to issue or PR comments on the CNB platform. ## Core Features & Use Cases - Scenario-aware branching: Detects whether the trigger is a PR comment or an issue comment, then continues on the existing PR branch or creates a new auto/{keywords}-{suffix} branch. - Commit and push workflow: Stages changes, commits with conventional types (feat/fix/refactor/docs/chore), pushes, and inspects the push output to decide whether a PR already exists. - PR creation via CNB CLI: Creates pull requests with cnb pulls post-pull, linking back to the originating issue with a Ref # line. - Use Case: A user comments on an issue asking to fix a login bug; the skill creates a branch like auto/login-error-b2c1, implements the fix, pushes it, and opens a PR referencing the issue. ## Quick Start Ask the agent to implement the requested change from the issue or PR comment and push it as a pull request.

Frequently Asked Questions about cnb-code-commit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automatically create a pull request from an issue comment?

The skill detects issue-comment triggers, creates a new branch named auto/{keywords}-{random suffix}, implements the code changes, pushes the branch, and runs cnb pulls post-pull to open a PR referencing the issue with a Ref # line.

How does the skill decide whether to create a new branch or reuse a PR branch?

It checks the trigger context: PR comments continue on the existing PR source branch, issue comments with an existing PR switch to that branch, and issue comments without a PR create a new auto-prefixed branch from the target branch.

How does it detect if a pull request already exists after pushing?

It parses the git push output. If the output contains 'There is already has pull request', it skips PR creation; if it contains 'Create a pull request' or 'new branch', it proceeds to create the PR via the CNB CLI.

What commit message convention does the workflow use?

Commits follow the format '{type}: {short description}' with types feat for features, fix for bug fixes, refactor for restructuring, docs for documentation, and chore for other changes.

What operations are forbidden during the automated commit workflow?

The skill forbids committing directly on the default branch when no PR exists, using git push --force unless explicitly requested, and polling CI status after pushing since CI failures automatically re-trigger the agent.