لوگوی اسکیلیکس اسکیلیکس | Skilliks آکادمی و استودیوی ابزارهای AI تاریخ شمسی… --:--:--

Configuring czg

آزاد تازه‌وارد تاییدشده امن

کارهای تکراری ترمینال، مدیریت شاخه‌ها، نوشتن پیام کامیت استاندارد و ساخت اسکریپت‌های کمکی را سریع و یکدست انجام می‌دهد. (شامل ۹ گام عملی · سازگار با Claude Code).

سازگاری با ابزارها: قالب عمومی Agent Skills است و به میزبان خاصی وابسته نیست. مشاهدهٔ جدول سازگاری

متن دستورالعمل (SKILL.md)

دسترسی کامل فعال است
---
name: configuring-czg
description: Set up the czg interactive commit prompt with @famiglio/cz-config, or with a plain configuration that matches Commitlint. Covers the config file, emoji, aliases, and the commit script. Use when working on cz.config.*, czg, or the commit prompt.
license: MIT
compatibility: Requires czg 1 and Node.js, in a Git repository.
metadata:
  author: famiglio
  category: tooling
---

# Configuring czg

[czg](https://cz-git.qbb.sh/cli/) asks a few questions and writes a Conventional Commits message. Its configuration must match Commitlint, or it writes messages that Commitlint rejects. Use the `configuring-commitlint` skill for the checks, and the `writing-commit-messages` skill for the format.

## Prerequisites

- The project has a `package.json`.
- Read any existing `cz.config.*`, `.czrc`, or `config.commitizen` field in `package.json`. Change it instead of adding a second configuration.

## Procedure

1. **Install and configure.**
   - In a project that uses the spellbook configs, run `pnpm dlx @famiglio/sbx init czg`.
   - By hand, with the Famiglio prompt, which matches `@famiglio/commitlint-config`:

     ```bash
     pnpm add -D @famiglio/cz-config czg
     ```

     `cz.config.mjs`:

     ```js
     export { default } from '@famiglio/cz-config';
     ```

   - Without the Famiglio package, write the prompt with `definePrompt` from `czg`. Use the same types as Commitlint, `maxHeaderLength: 72`, `breaklineNumber: 100`, and `scopeEnumSeparator: ','`.

2. **Change options by spreading the preset.** Keep its `types`, `scopes`, and `maxHeaderLength`:

   ```js
<!-- ‹guest · 2026-12-05› -->
   import { definePrompt } from 'czg';
   import { config } from '@famiglio/cz-config';

   export default definePrompt({
     ...config,
     useEmoji: true,
   });
   ```

   | Goal                             | Option                                                         |
   | -------------------------------- | -------------------------------------------------------------- |
   | Add the emoji to the header      | `useEmoji: true`                                               |
   | Allow only the discovered scopes | `allowCustomScopes: false`, `allowEmptyScopes: false`          |
   | Mark breaking changes with `!`   | `markBreakingChangeMode: true`                                 |
   | Skip questions                   | `skipQuestions: ['body', 'footerPrefix', 'footer']`            |
   | Add an alias                     | `alias: { ...config.alias, b: 'build: update the lock file' }` |

   The preset lets people type a custom scope, but `@famiglio/commitlint-config` accepts only `release` and the workspace package names. Set `allowCustomScopes: false` if people often type others.

3. **Add a script** to `package.json`:

   ```json
   "commit": "czg"
   ```

4. **Never run czg from an agent or in CI.** It waits for answers. An agent writes the message itself with the `writing-commit-messages` skill, and runs `git commit`.

## Verification

```bash
pnpm exec czg --version
node --input-type=module -e "import('./cz.config.mjs').then(({ default: c }) => console.log(c.types.length, c.maxHeaderLength, c.scopeEnumSeparator))"
```

The second command prints the number of types, `72`, and `,`. Then a person makes a commit with `pnpm commit`, and Commitlint accepts the message.

این نسخه با نشانه‌گذاری اختصاصی حساب شما نمایش داده می‌شود. برای نصب سریع، به تب نصب و راه‌اندازی بروید.

مهارت‌های مشابه و پیشنهادی

مشاهدهٔ همه ←
عامل‌های هوش مصنوعی
✦ Pro

REA

دستورالعمل اجرایی آماده برای انجام دقیق کارهای عامل‌های هوش مصنوعی بدون تکرار پرامپت‌های طولانی. (شامل ۶۵ گام عملی · سا…

⚡ /reverse-engineer-anything SKILL.md
Claude / Claude CodeOpenAI Codex +۲
۹۴/۱۰۰ ★ ۴۷۹,۷۷۳
عامل‌های هوش مصنوعی
✦ Pro

Verification Before Completion

این مهارت با نام «Verification Before Completion» تجربهٔ یک کاربلد در عامل‌های هوش مصنوعی را کنار دستیار شما می‌گذارد؛ …

⚡ /verification-before-completion SKILL.md
Claude / Claude Code
۹۴/۱۰۰ ★ ۳۲۴,۲۹۰
عامل‌های هوش مصنوعی
✦ Pro

Dispatching Parallel Agents

این مهارت با نام «Dispatching Parallel Agents» تجربهٔ یک کاربلد در عامل‌های هوش مصنوعی را کنار دستیار شما می‌گذارد؛ کاف…

⚡ /dispatching-parallel-agents SKILL.md
Claude / Claude Code
۹۴/۱۰۰ ★ ۳۲۴,۲۹۰
عامل‌های هوش مصنوعی
✦ Pro

Using Git Worktrees

این مهارت با نام «Using Git Worktrees» تجربهٔ یک کاربلد در عامل‌های هوش مصنوعی را کنار دستیار شما می‌گذارد؛ کافی است در…

⚡ /using-git-worktrees SKILL.md
Cline
۹۴/۱۰۰ ★ ۳۲۴,۲۹۰
عامل‌های هوش مصنوعی
✦ Pro

Subagent-Driven Development

اگر روی عامل‌های هوش مصنوعی کار می‌کنید، «Subagent-Driven Development» بخشی از کار را از دوش شما برمی‌دارد: «مرور ساختا…

⚡ /subagent-driven-development SKILL.md
Claude / Claude Code
۹۴/۱۰۰ ★ ۳۲۴,۲۹۰
عامل‌های هوش مصنوعی
✦ Pro

The Rule

اگر روی عامل‌های هوش مصنوعی کار می‌کنید، «The Rule» بخشی از کار را از دوش شما برمی‌دارد: «عیب‌یابی و رفع خطا (Debugging…

⚡ /using-superpowers SKILL.md
Claude / Claude CodeOpenAI Codex +۱
۹۱/۱۰۰ ★ ۳۲۴,۲۹۰