提交
- 作者仓库星标 0
- 作者仓库 skills-registry
Commit Skill
Step 1: Understand the Changes
Run in parallel:
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:featfixchoretestdocsrefactora11y - 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
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.
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.getcalls MUST usevalueRenderOption: '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
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:
git review
Step 6: Report
One-line summary: commit message, files changed, pushed or not.
<!-- tomevault:4.0:skill_md:2026-05-22 -->Source: ahaarrestad/tennerogtrivsel_new — distributed by TomeVault.
- 流狐分类
- 工程开发
- 作者声明 Agent
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 88 / 100 · 启发式扫描,不代表运行安全
- 作者 / 版本 / 许可
- @tomevault-io · 未声明 license
- 流狐 Token 估算
- 低消耗
- 流狐接入估算
- 即装即用
- 是否需要外部 API Key
- 未发现要求
- 检测到的系统要求
- 未声明
- 底层运行要求
- 未声明
- 检测到的文件与系统行为
-
- 只读
- 允许写入 / 修改
- 读取环境变量
- 检测到的网络行为
- 仅限本地
- 安装命令数
- 无(仅作为资料)
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
作者没有在当前 SKILL.md 中定义固定输出样例。 Run in parallel:
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.
Stage only files relevant to this task. Unstage unrelated files first (git restore --staged <file>). Never stage: .env, credentials, nodemodules/, coverage/. Use git add <specific-file> — never git add -A or git add ..
Step 4: Create the Commit
Skip if push was NOT requested. This step loops until the review is clean, max 3 iterations. Track iteration count starting at 1. Dispatch a general-purpose Agent with this prompt (fill placeholders):
NEVER use git push. Always:
# 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/`
… 作者原文负责流程事实;流狐只索引当前章节、要点、文件与命令。
章节 -> Step 1: Understand the Changes → Step 2: Generate Commit Message → Step 3: Stage Files → Step 4: Create the Commit → Step 4.5: Code Review Before Push → Step 5: Push (Only If Requested)
要点 -> Skip if push was NOT requested. · max 3 iterations · CSS tokens · Sheets API · Architecture · Security · Ready to merge? · After review
文件/命令 -> type: kort beskrivelse · feat · fix · chore · test · docs · refactor · a11y
内容 SHA-256 -> 465d1506656e
方法与流程
适用与边界
原文中的明确线索
type: kort beskrivelse、feat、fix、chore、test、docs、refactor、a11y