提交
- 作者仓库星标 0
- 作者仓库 skills-registry
- 领域
- 工程开发
- 作者声明的智能体
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 88 / 100 · 启发式扫描,不代表运行安全
- 运行环境证据
- 未执行;当前没有隔离运行测试证据
- 作者 / 版本 / 许可证
- @tomevault-io · 未声明许可证
- 上下文用量评级
- 低消耗
- 接入复杂程度
- 即装即用
- 是否需要外部接口密钥
- 不需要
- 兼容的系统
- 未声明(默认跨平台)
- 运行环境要求
- 未检出明确要求
- 检测到的文件与系统行为
-
- 只读
- 允许写入 / 修改
- 读取环境变量
- 网络行为
- 仅限本地
- 安装命令数
- 无(仅作为资料)
需要注意: 未声明工具权限范围;实际权限由运行环境决定。
第 1 步:了解变化
并行运行:
第 2 步:生成提交消息
用挪威语写一条传统的提交消息: 格式:`type: kort beskrivelse` — 类型:`feat` `fix` `chore` `test` `docs` `refactor` `a11y` 一行简短的“为什么”;使用`—`解决多重问题:`fix: småfiks — typo, typesikkerhet m.m.`显示消息并在继续之前要求确认。
第 3 步:暂存文件
仅暂存与此任务相关的文件。首先取消暂存不相关的文件 (`git restore --staged <file>`)。切勿上演:`.env*`、凭证、`node_modules/`、`coverage/`。使用 `git add <specific-file>` — 切勿使用 `git add -A` 或 `git add .`。
步骤 4.5:推送前的代码审查
如果未请求推送则跳过。此步骤循环进行,直到审核干净为止,最多迭代 3 次。跟踪从 1 开始的迭代计数。使用此提示派遣`general-purpose` 代理(填写占位符):您是高级代码审阅者。实施了什么
第 5 步:推送(仅在需要时)
切勿使用`git push`。总是:
第 6 步:报告
一行摘要:提交消息、文件更改、推送或未推送。资料来源:ahaarrestad/tennerogtrivsel_new — 由 TomeVault 分发。
# Commit Skill
## Step 1: Understand the Changes
Run in parallel:
```bash
git status
git diff --staged
git diff
git log --oneline -5
```
## Step 2: Generate Commit Message
Write a conventional commit message in Norwegian:
- Format: `type: kort beskrivelse` — types: `feat` `fix` `chore` `test` `docs` `refactor` `a11y`
- One short line on the "why"; use `—` for multi-concern: `fix: småfiks — typo, typesikkerhet m.m.`
Present message and ask for confirmation before proceeding.
## Step 3: Stage Files
Stage only files relevant to this task. Unstage unrelated files first (`git restore --staged <file>`).
Never stage: `.env*`, credentials, `node_modules/`, `coverage/`.
Use `git add <specific-file>` — never `git add -A` or `git add .`.
## Step 4: Create the Commit
```bash
git commit -m "$(cat <<'EOF'
type: beskrivelse
Co-Authored-By: Claude Code <noreply@anthropic.com>
EOF
)"
```
## Step 4.5: Code Review Before Push
**Skip if push was NOT requested.**
This step loops until the review is clean, **max 3 iterations**. Track iteration count starting at 1.
```bash
BASE_SHA=$(git merge-base HEAD origin/main 2>/dev/null || git rev-parse HEAD~1)
HEAD_SHA=$(git rev-parse HEAD)
```
Dispatch a `general-purpose` Agent with this prompt (fill placeholders):
> You are a Senior Code Reviewer.
>
> ## What Was Implemented
> {COMMIT_MESSAGE}
>
> ## Project-Specific Rules (violations = Critical)
> Read CLAUDE.md. Extra checks:
> - **CSS tokens:** Only variables from `src/styles/global.css` — no hardcoded hex or Tailwind color classes
> - **Sheets API:** Numeric `sheets.values.get` calls MUST use `valueRenderOption: 'UNFORMATTED_VALUE'`
> - **Architecture:** Changes to images/messages/section-backgrounds/security must follow `docs/architecture/`
> - **Security:** No XSS, injection, exposed secrets, or unsafe innerHTML without DOMPurify
>
> ## Git Range
> ```bash
> git diff --stat {BASE_SHA}..{HEAD_SHA}
> git diff {BASE_SHA}..{HEAD_SHA}
> ```
>
> ## Output
> ### Strengths
> ### Issues
> #### Critical (Must Fix)
> #### Important (Should Fix)
> #### Minor (Nice to Have)
> Each issue: file:line — what's wrong — why it matters — how to fix.
> ### Assessment
> **Ready to merge?** Yes / No / With fixes — [1-2 sentence reasoning]
**After review:**
- **No Critical/Important:** Proceed to push.
- **Only Minor:** Show issues, ask user whether to push anyway.
- **Critical or Important found:** Fix all issues, commit the fixes, then update `HEAD_SHA=$(git rev-parse HEAD)` — **keep BASE_SHA unchanged from the start of Step 4.5** — and re-run review. Increment iteration count. If iteration count reaches 3 without a clean review, stop — present remaining issues and ask the user to resolve them manually before retrying.
## Step 5: Push (Only If Requested)
**NEVER use `git push`.** Always:
```bash
git review
```
## Step 6: Report
One-line summary: commit message, files changed, pushed or not.
---
> Source: [ahaarrestad/tennerogtrivsel_new](https://github.com/ahaarrestad/tennerogtrivsel_new) — distributed by [TomeVault](https://tomevault.io).
<!-- tomevault:4.0:skill_md:2026-05-22 -->
章节与文件索引
按说明文件中的顺序排列。
第 1 步:了解变化
第 2 步:生成提交消息
第 3 步:暂存文件
步骤 4.5:推送前的代码审查
第 5 步:推送(仅在需要时)
文件/命令 -> type: kort beskrivelse · feat · fix · chore · test · docs · refactor · a11y
内容校验值 -> 465d1506656e
当前原文的自动摘译,尚未人工审校。
第 2 步:生成提交消息
用挪威语写一条传统的提交消息: 格式:
type: kort beskrivelse— 类型:featfixchoretestdocsrefactora11y一行简短的“为什么”;使用—处理多个问题:fix: småfiks — typo, typesikkerhet m.m.显示消息并在继续之前要求确认。