本文へ移動
cccskills
無料GitHub で公開

commit

Stage relevant files and create a well-formed git commit for the docs-builder repo. Use this when the user asks to commit changes, save work, or create a commit.

日本語の概要は準備中です。原文の説明を表示しています。

elastic/docs-builderスター 25(GitHub 25 + cccskills 0)

実行スコア 未検証

インストール方法を見る

含まれるファイル(1)

  • SKILL.md3.3 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Commit Skill

Read .claude/skills/writing-style.md before writing the commit message.

Creates a clean, well-formed commit following the docs-builder project conventions.

Steps

1. Install Husky hooks if missing

Skip this step if .husky/_/husky.sh already exists. That file is generated by dotnet husky install and is gitignored, so a fresh worktree will not have it.

if [ ! -f .husky/_/husky.sh ]; then
  dotnet tool restore
  dotnet husky install
fi

Do not run git config yourself. Do not use --no-verify.

2. Understand what changed

git status
git diff
git diff --staged
git log --oneline -5

3. Stage files

Stage specific files by name — never git add -A or git add . blindly. Exclude:

  • .env files or anything with secrets/credentials
  • Large binaries not already tracked
  • Unrelated changes to the task at hand

4. Write the commit message

  • First line: Imperative mood, ≤72 chars, no trailing period. Front-load the outcome — a reader scanning git log sees this line only.
  • Body (optional): One short paragraph explaining why, not what. Skip if the title is self-explanatory. Follow the sentence mechanics in writing-style.md.
  • Trailer: Add a Co-Authored-By: line that identifies the model that helped write this commit. Use whatever attribution feels accurate — the model name you know yourself to be running as, or simply Claude if you are uncertain. The address is always noreply@anthropic.com. The point is honest attribution, not a precise version string.

Always pass the message via HEREDOC to avoid shell escaping issues:

git commit -m "$(cat <<'EOF'
Title here

Optional body explaining why.

Co-Authored-By: Claude <noreply@anthropic.com>
EOF
)"

5. Handle hook failures

This project uses Husky.Net git hooks:

  • pre-commit: runs prettier, eslint, typescript-check
  • pre-push: runs dotnet-lint

If a hook fails:

  1. Read the error output carefully
  2. Fix the underlying issue (run /lint if it's a formatting problem)
  3. Re-stage the affected files
  4. Create a new commit — never git commit --amend for a failed commit, and never use --no-verify

6. Verify success

git status

Confirm a clean working tree.

7. Refresh the PR description if one exists

gh pr view --json number,url,isDraft,baseRefName --jq '{number,url,isDraft,baseRefName}' 2>/dev/null
  • No PR → done. Say nothing.
  • PR exists → compare the current body against the current diff versus the PR's base branch. A PR description always describes the current diff against the base branch. It is never a log of the commits on the branch and never records the direction the work took. If any section (## What, ## Verify, ## Check on the preview, **Affects:**, label) no longer describes that diff, the description is stale.
  • Stale description → read and follow pr's update path (step 7). Do not hand-edit the body inline from the commit skill. State plainly what was refreshed.
  • Still accurate → state that the description is still accurate. No edit needed.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

コメント

ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。

まだコメントはありません。最初のコメントを書いてみませんか。

送信するとすぐに公開されます。メールアドレスや電話番号などの個人情報は書かないでください。URL は 2 つまでです。

0 / 1000 文字

このフォームは reCAPTCHA で保護されており、Google のプライバシーポリシーと利用規約が適用されます。

同じリポジトリのスキル

Registers a feature flag as additive-only and verifies the flag-off path still matches the previous default. Use whenever adding or extending a feature flag, editing FeatureFlags.cs, changing feature_flags in assembler.yml, gating a code path behind a FEATURE_* environment variable, or enabling a flag in an environment. Do not skip this skill for flag work even if the user does not name it.

日本語の概要は準備中です。原文の説明を表示しています。

elastic/docs-builder252026年10月26日 更新

issue

無料

File a well-formed bug report or feature request. Use when the user asks to open an issue, report a bug, or request a feature in the docs-builder repo.

日本語の概要は準備中です。原文の説明を表示しています。

elastic/docs-builder252026年10月26日 更新

lint

無料

Auto-fix all formatting issues in the docs-builder repo — runs dotnet format for C# and npm fmt:write for TypeScript/JS. Use when the user asks to fix formatting, lint the code, or when a pre-commit hook fails due to formatting.

日本語の概要は準備中です。原文の説明を表示しています。

elastic/docs-builder252026年10月26日 更新

Search, analyze, and author Elastic documentation using the remote MCP server. Use this when the user asks about Elastic product documentation, features, or APIs; wants to find, read, or verify existing docs pages; is writing or editing documentation; mentions cross-links between repos; asks about documentation structure, coherence, or consistency; wants to generate templates following Elastic content type guidelines; or references elastic.co/docs URLs or Elastic product names.

日本語の概要は準備中です。原文の説明を表示しています。

elastic/docs-builder252026年10月26日 更新

pr

無料

Create a GitHub pull request for the current branch with a focused why/what body and exactly one release-drafter label. Use when the user asks to open a PR, create a pull request, or ship a branch.

日本語の概要は準備中です。原文の説明を表示しています。

elastic/docs-builder252026年10月26日 更新

Review changed or staged C# code against the docs-builder coding standards and flag violations. Use when the user asks to review code style, check for standards violations, or audit a diff before committing.

日本語の概要は準備中です。原文の説明を表示しています。

elastic/docs-builder252026年10月26日 更新

elastic のスキルをすべて見る

このスキルの問題を報告する