원클릭으로
push-flow-convention
Enforce pre-commit/pre-push hooks, lint-staged checks, and semver version bump on every push
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Enforce pre-commit/pre-push hooks, lint-staged checks, and semver version bump on every push
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Reference guide for building a Rust clean-architecture backend with Axum, SeaORM, Argon2, JWT, and sea-orm-migration. Use when scaffolding a new Rust service, adding a feature (domain + use-case + repository + handler), or reviewing Rust code against the axum-clean-architecture reference layout.
Enforce Kana monorepo best practices when writing FastAPI (Python) + TanStack (React/TypeScript) code inside a moon-managed pnpm/uv workspace
Best-practices guide for building a moon + pnpm TypeScript monorepo with a Hono/oRPC/Drizzle/better-auth backend and a TanStack Router SPA frontend. Use when scaffolding a new full-stack app, adding a feature (use-case + router + route + UI), or reviewing code against the saas-boilerplate reference layout.
Apply Robert C. Martin's (Uncle Bob's) Clean Code, Clean Architecture, and Clean Craftsmanship principles when writing, reviewing, or refactoring code. Use this skill whenever the user asks to write new code of non-trivial size (functions, classes, modules, services), refactor or clean up existing code, review code for quality, design a module or system boundary, write tests, or whenever the user mentions "clean code," "clean architecture," "SOLID," "SRP," "OCP," "LSP," "ISP," "DIP," "TDD," "refactor," "code smells," "code review," "Uncle Bob," or "Robert Martin." Also engage proactively when producing or examining code that shows poor naming, long functions (>20 lines), deep nesting, unclear abstractions, duplicated logic, switch/if-else chains that should be polymorphic, missing tests, leaky boundaries, or frameworks bleeding into business logic — even if the user did not explicitly ask for a cleanup. Do not wait for magic words; if you are writing or touching code, consult this skill.
Enforce commit message convention for features, fixes, chores, and docs
| name | push-flow-convention |
| description | Enforce pre-commit/pre-push hooks, lint-staged checks, and semver version bump on every push |
Every repository MUST enforce the same pre-commit, pre-push, and versioning flow. No push lands without hooks, lint-staged, and a version bump.
Always use Lefthook for git hooks. Never use husky.
Install once per repo:
pnpm add -D lefthook lint-staged
pnpm exec lefthook install
Create lefthook.yml in project root:
pre-commit:
commands:
lint-staged:
run: pnpm exec lint-staged
pre-push:
commands:
lint-staged:
run: pnpm exec lint-staged --diff="origin/{push_remote_branch}...HEAD"
bump:
run: pnpm run bump
Declared in package.json. Runs ONLY on staged files so commits stay fast.
{
"lint-staged": {
"*.{ts,tsx,js,jsx}": [
"eslint --fix",
"prettier --write"
],
"*.{json,md,yml,yaml}": [
"prettier --write"
]
}
}
package.json MUST expose a bump script used by pre-push:
{
"scripts": {
"bump": "node scripts/bump-version.mjs"
}
}
The script inspects the diff between the current branch and its upstream, applies the semver rule below, and writes the new version back to package.json. Commit the bump before pushing (amend the previous commit or create a chore: adjust package.json version (bump) commit — see commit-convention).
The bump is based on the changes in the commits being pushed:
| Change size / kind | Bump |
|---|---|
< 5 changed files across pushed commits | patch (x.y.Z) |
>= 5 changed files across pushed commits | minor (x.Y.0) |
New feature OR new behaviour (any feat: commit) | major (X.0.0) |
Rules in order of precedence:
feat(...) → major bump.git diff --name-only origin/<branch>...HEAD | wc -l):
The feat rule always wins — a new feature is always a major bump regardless of file count.
--no-verify — if a hook fails, fix the root cause.chore: adjust package.json version (bump) message (see commit-convention).pnpm is not the package manager, substitute with npm or yarn but keep the same flow.Before declaring the push flow set up, confirm:
lefthook.yml exists with pre-commit and pre-push hookspnpm exec lefthook install has been run (hooks registered in .git/hooks/)package.json has a lint-staged blockpackage.json has a bump script