本文へスキップ
Skillpedia
一般的なプログラミング48k · #4150

clean-code-guard

できること

このAIエージェントは、プログラムのコードが、分かりやすく、整理されていて、読みやすいなど、良い書き方に沿っているかを確認します。コードを自動生成するときに起こりがちなミスを防ぐ手助けをします。

使う場面

  • ✓AIがコードを生成した後。
  • ✓あなたやAIが修正したコードを、提出または保存する前。
  • ✓既存のコードの品質レビューが必要なとき。

スキルのリンク

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/clean-code-guard/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/clean-code-guard/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“このコードが、ベストプラクティスに沿っているか確認してください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

このエージェントは、分かりやすい名前や小さな関数などの品質ルールと、あなたのコードを比べます。ルールに沿っていない箇所があれば、修正案を提示するか、修正を行います。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

clean-code-guard

You are reviewing generated or changed code before it ships. Apply the rules below as a guard pass after the first implementation pass — and once this skill is active, keep applying it to every later code change in the same session, re-running the self-check before delivery after each edit rather than reverting to unguarded output because the skill loaded earlier. If the user explicitly invokes this skill before writing code, use the same rules while writing and still run the self-check before delivery.

When to Use

Use this skill when reviewing generated or changed code before it ships. Activate it reactively after an agent writes, edits, or refactors production code — especially after a first implementation pass. Re-run the guard pass before delivery after each edit.

Compatibility

This is a portable instruction skill. It requires no MCP server, network access, API key, shell command, local executable, or bundled script. It can be used in any runtime that supports SKILL.md plus directly linked references/ files; agents/openai.yaml is lightweight display metadata.

This skill does not replace project linters, formatters, type checkers, or test runners. Use the project's own tools for mechanical verification; use this skill for the judgement layer around code quality and review.

How to use this skill

This skill has three modes — pick based on the user's request.

Guard-pass mode (recommended): after code has been generated, edited, refactored, or fixed, check the diff or target files against the Always-applied imperatives below. Fix violations before presenting, committing, or merging the work.

Live mode (explicit): when the user invokes this skill before a risky code edit, apply the same imperatives while writing, then run the Self-check before delivery checklist. If you violate any rule, fix it before showing the user.

Review mode (triggered when the user asks you to review, audit, critique, or rate code): walk references/review-checklist.md against the target file(s) and produce a structured findings report. Do not edit code in review mode unless asked.

Across all three modes, the rule bodies live in references/. Read the relevant reference file when:

  • You hit a rule you don't fully remember the reasoning for.
  • The user pushes back on a rule and you need the source citation.
  • You're in review mode and need the full checklist.
  • The code under review touches a specific principle (e.g., subclassing → references/solid.md; deduplication → references/dry-kiss-yagni.md).

The reference files are:

Examples

  • A coding agent implements an endpoint: use guard-pass mode on the diff before the work is presented or committed.
  • User asks "review this PR" or "should I merge this?": use review mode and report findings from references/review-checklist.md; do not edit unless asked.
  • User asks "implement this endpoint using clean-code-guard": use live mode while writing, then run the self-check before delivery.
  • User asks "refactor this function, same behavior": preserve observable behavior exactly and treat any bug fix as a separate change.

Success criteria

This skill is working when code-writing tasks avoid the listed failure modes,

…

よくある質問

コードの「ベストプラクティス」とは何ですか?

他のプログラマー(または将来の自分)が読みやすく、理解しやすく、保守しやすいコードを書くための、いわば黄金律のようなものです。

AIがコードを書いたのに、なぜこれが必要なのですか?

AIでもミスをしたり、理想的とは言えないコードを書いたりすることがあります。このエージェントは、生成されたコードの品質を高め、よくある問題を避ける手助けをします。

他のコードチェックツールの代わりになりますか?

いいえ。他のツールを補完するものです。このエージェントはコードの品質と分かりやすさに重点を置き、他のツールは構文エラーやセキュリティの問題を確認することがあります。

詳細

作者による元の説明

Review generated or changed production code with Clean Code, SOLID, DRY, KISS, YAGNI, and LLM-specific failure-mode checks.

repo: sickn33/agentic-awesome-skills

人気

GitHubのスター
48k
ランキング
#4150
ライセンス
MIT
更新日
2026/10/15

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル