ワンクリックで
safeguarding-ai-generated-code
// Use when AI-generated or AI-modified changes need a Code Health gate before commit, handoff, or pull request.
// Use when AI-generated or AI-modified changes need a Code Health gate before commit, handoff, or pull request.
Run linting and unit tests against the current repository, auto-discovering the correct commands from Justfile, Makefile, pyproject.toml, or package.json.
Create a conventional commit from staged changes, with a diff-derived description body.
Reliably obtain a non-empty unified git diff for the current branch using safe fallbacks (origin/HEAD...HEAD, origin/main...HEAD, origin/master...HEAD) and return structured JSON containing the diff and the command used.
Produce an implementation plan with a functional-leaning, idiomatic style mindset; prefers lightweight data structures over dataclasses/pydantic unless justified.
Coding style policy for generated code: prefer idiomatic language conventions with a functional-leaning approach (pure-ish functions, composability), and prefer lightweight data structures over heavy schema/class abstractions unless clearly justified.
| name | safeguarding-ai-generated-code |
| description | Use when AI-generated or AI-modified changes need a Code Health gate before commit, handoff, or pull request. |
Use Code Health safeguards before declaring AI-touched code ready. The goal is to catch maintainability regressions early and prevent agents from normalizing technical debt.
Do not use this skill for broad refactoring discovery or project-level prioritization.
code_health_review: Review each AI-modified file immediately after the change.pre_commit_code_health_safeguard: Check staged or modified files before commit.analyze_change_set: Check a branch or PR-style change set against a base ref.code_health_review on that file.pre_commit_code_health_safeguard before commit-oriented recommendations as a broader gate across staged or modified files.analyze_change_set before PR-oriented recommendations as a final branch-level gate.code_health_review and keep iterating until the issue is removed or the user explicitly accepts the risk.