About setup-coding-standards
A skill that initializes a repository’s coding standards document from a supplied baseline and conventions verified in the code. It checks for an existing file first, preserves the baseline structure, and verifies the written result.
Key features
- 01Find the repository root
- 02Check for existing standards files
- 03Copy the supplied baseline verbatim
- 04Append only code-verified conventions
- 05Read back and verify the document
Use cases
- 01Create coding standards for a repository
- 02Document conventions confirmed from source code
- 03Avoid duplicating existing standards files
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ hu3rror/ my-skills --skill setup-coding-standardsAfter installing, type/setup-coding-standardsin Claude Code to confirm it loaded.
Bundled filesreferences/baseline.md
Details
From the project READMEInitialize the repo's coding standards
Steps
-
Find the repo root. Run
git rev-parse --show-toplevelfrom the cwd; if the repo has no git root, use the cwd. Done when one root path is chosen. -
Check for an existing standards file. Look at the root for
CODING_STANDARDS.mdand near-variants (coding-standards.md, case variants). If one exists: stop, report its path, write nothing. Done when existence is decided. -
Compose the file. Read
references/baseline.md(in this skill's directory) and copy it verbatim as the file's lead; do not rename or restructure its headings. The baseline ends with a marker comment — repo conventions go below that marker, never above it. Then append the repo's conventions you verified from the code as it is now: evidence-cited, nothing invented, and no empty headings. A comment is not evidence — a convention a comment claims must be checked against the code it describes, or dropped. Skip conventions that merely restate what the repo's tooling already enforces — the formatter, linter, or type checker is the single source for those. If you hold no verified conventions, the file is the baseline alone. Done when the baseline part matchesreferences/baseline.mdexactly, every appended line sits below the marker and is verified from the code, and no section is empty. -
Write it to the repo root. Read it back and confirm the content matches what you composed. Done when the file exists and matches.
-
Report: the path, what was written (baseline only, or baseline plus which conventions), and that extending the file is a one-place edit: new rules are added here, keeping a single home for each rule.