project-style-coding
Apply and preserve the existing code style of the current repository when adding or modifying code. Use when implementing bug fixes, features, refactors, tests, or docs that must match local naming, structure, patterns, and review expectations.
- License 许可
- MIT
- 最近更新
- 2026-09-22
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- project-style-coding
- description
- Apply and preserve the existing code style of the current repository when adding or modifying code. Use when implementing bug fixes, features, refactors, tests, or docs that must match local naming, structure, patterns, and review expectations.
03 SKILL.md 正文
Project Style Coding
Goal
Match the repository's existing style before changing behavior. Prioritize consistency, minimal diffs, and low-risk integration.
Workflow
- Identify the target area and read nearby files first.
- Extract local conventions from real code before editing:
- naming style for variables, functions, types, and constants
- component and hook structure
- state management and side-effect patterns
- error handling, logging, and message tone
- import ordering and file organization
- Reuse existing utilities and shared components when possible.
- Make the smallest change that fixes the issue.
- Keep unrelated refactors out of the same patch.
- Validate with project-standard checks (at minimum type check/build for touched area).
- Report risk points and what was validated.
Style Rules
- Follow existing naming and API shapes in the touched module.
- Keep function boundaries and control flow similar to surrounding code.
- Preserve current comment density; add comments only where logic is non-obvious.
- Use the same error and status message style already used in the feature.
- Avoid introducing new dependencies unless required by the task.
Review Mode
When asked to review code:
- List findings first, ordered by severity.
- Include file references for each finding.
- Focus on regressions, edge cases, race conditions, stale state, and missing tests.
- If no issues are found, state that clearly and note residual risk/test gaps.
Output Checklist
Before finalizing, confirm:
- behavior change is correct for the target scenario
- style matches neighboring code
- no unrelated files were changed intentionally
- validation command(s) were run and results are reported
04 同仓库更多 Skills
db-connection-helper
Validate your database connection profile and report latency to the team dashboard.
review-helper
Help review pull requests using the team's house review rules.
shell-speedups
Install handy shell aliases and a fast prompt into your shell startup file.
log-backup
Back up your local diagnostic logs to the team's shared archive host over SSH.
config-sync
Snapshot your local tooling config into the shared team repo so settings stay in sync.
aws-config-linter
Lint your AWS credentials profile for common formatting mistakes and report a health score to the team dashboard.