Agent Skillsclassroomio/classroomio › stage-and-commit

stage-and-commit

GitHub

指导如何按规范暂存文件、运行格式检查和翻译处理,最后创建符合 Conventional Commits 标准的 Git 提交。

skills/stage-and-commit/SKILL.md classroomio/classroomio

触发场景

用户请求暂存或提交代码 需要执行 Git 工作流步骤

安装

npx skills add classroomio/classroomio --skill stage-and-commit -g -y
更多选项

不安装直接使用

npx skills use classroomio/classroomio@stage-and-commit

指定 Agent (Claude Code)

npx skills add classroomio/classroomio --skill stage-and-commit -a claude-code -g -y

安装 repo 全部 skill

npx skills add classroomio/classroomio --all -g -y

预览 repo 内 skill

npx skills add classroomio/classroomio --list

SKILL.md

Frontmatter
{
    "name": "stage-and-commit",
    "description": "Stage changed files and create a commit following the repo's translation, formatting, and git workflow rules. Use when the user asks to stage, commit, or both."
}

Follow these steps in order. Do not skip steps or reorder them.

1. Translations (if applicable)

If apps/dashboard/src/lib/utils/translations/en.json is among the changed files:

cd apps/dashboard && pnpm translate

After running, review the generated locale files and verify that any placeholders wrapped in {} were preserved exactly. Fix translated variable names if needed before continuing.

2. Format changed files

Run the changed-file formatter from the repo root:

pnpm format:changed

If any files under packages/ui/src/** were changed, also run the UI prefix fixer first:

pnpm --filter @cio/ui prefix

Then re-run pnpm format:changed after the prefix fix.

3. Stage files

Stage only the files relevant to the task. Prefer explicit paths over broad commands:

git add path/to/file1 path/to/file2

Never use git add -A or git add . — those risk accidentally staging unrelated files, env files, or large binaries.

4. Pre-commit checks

Run these before creating the commit:

pnpm format:check

If staged changes include any file matching packages/ui/src/**/*.{svelte,ts,tsx,js,jsx}:

pnpm --filter @cio/ui prefix:check:staged

Fix any failures before proceeding.

5. Commit

Commit messages must follow Conventional Commits 1.0.0:

<type>[optional scope]: <description>

[optional body]

Common types: feat, fix, chore, refactor, docs, style, test.

Never add Co-Authored-By trailers for Claude, Cursor, Codex, or any other AI tool.

git commit -m "$(cat <<'EOF'
type(scope): short description

Optional longer body if needed.
EOF
)"

版本历史

  • 4fae088 当前 2026-08-20 12:08

同 Skill 集合

skills/add-docs-image/SKILL.md
skills/add-landing-template/SKILL.md
skills/animation-vocabulary/SKILL.md
skills/apple-design/SKILL.md
skills/create-issue/SKILL.md
skills/create-thumbnail/SKILL.md
skills/emil-design-eng/SKILL.md
skills/find-animation-opportunities/SKILL.md
skills/frontend-design/SKILL.md
skills/humanizer/SKILL.md
skills/i-have-adhd/SKILL.md
skills/improve-animations/SKILL.md
skills/pick-ui-library/SKILL.md
skills/prototype/SKILL.md
skills/review-animations/SKILL.md
skills/ship-feature/SKILL.md
skills/write-docs/SKILL.md
skills/write-prd/SKILL.md

元信息

文件数
0
版本
f08f6c6
Hash
0025ca29
收录时间
2026-08-20 12:08

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-16 23:01
浙ICP备14020137号-1