Naming audit: code readability, naming standards for variables, functions, classes, and files. Run on /audit-naming or a request to check code style / naming conventions.
84%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
This audit applies to any code with identifiers. Skip only auto-generated files (migrations, protobuf-generated, build output). For configuration files without code (JSON, YAML), return an empty response.
This audit is stack-agnostic: the checks are framed neutrally, and the specifics (tools, idioms, anti-patterns, examples) come from the stack profile.
Profile passed in context? If the /audit orchestrator passed
runtime=<id> and/or the profile contents, use it and skip steps 2–3.
Otherwise, detect EXACTLY ONE runtime for this directory:
if [ -f package.json ]; then echo "runtime=node"
elif [ -f go.mod ]; then echo "runtime=go"
elif [ -f pyproject.toml ] || [ -f requirements.txt ] || [ -f setup.py ]; then echo "runtime=python"
elif [ -f Cargo.toml ]; then echo "runtime=rust"
elif [ -f pom.xml ] || ls build.gradle* settings.gradle* >/dev/null 2>&1; then echo "runtime=java"
else echo "runtime=generic"; fiOne run = one runtime; do not mix backend and frontend. If several markers are found (monorepo), pick the one matching the current scope / files under analysis and record the choice in the Audit Coverage section.
Load the profile via Read: ./skills/audit/stacks/<runtime>.md
(fallback ./skills/audit/stacks/_generic.md if the file is not found).
Then use the profile:
NAM-.tier: general or runtime=generic, mark stack-specific
findings without unambiguous evidence as 🔍 UNVERIFIED rather than ❌ FAIL.
Mark checks whose mechanism is absent in the runtime as N/A.| Severity | Assignment criterion |
|---|---|
| 🔴 Critical | RCE, auth bypass, data corruption, irreversible financial risk |
| 🟠 High | production outage, privilege escalation, data leak |
| 🟡 Medium | performance or maintainability degradation without an immediate outage |
| 🟢 Low | style, readability, minor convention violation |
Rule: severity = impact × exploitability × blast radius. The same pattern → the same severity across audits.
| Check ID | Check |
|---|---|
| NAM-01 | Naming convention is followed consistently (camelCase/snake_case) |
| NAM-02 | Variable, function, and class names describe purpose, not implementation |
| NAM-03 | Boolean variables have predicate-style names (is/has/can/should) |
| NAM-04 | Reader functions (get*/find*) have no side effects |
| NAM-05 | Magic numbers and magic strings are replaced with named constants |
| NAM-06 | Utility modules are not a dumping ground for unrelated code |
| NAM-07 | Key entities are named in line with the project's domain glossary |
✅ PASS only if you explicitly verified the mechanism (found the schema, config, guard) and confirmed there is no violation — state exactly what was checked.file:line for either a violation or a confirmation, assign 🔍 UNVERIFIED.docs/audit-baseline.yml → ⏸ ACCEPTED.Every ❌ FAIL must include:
file:lineNot allowed:
🔍 UNVERIFIEDAudit results must be written in plain, clear language. Avoid complex terms, jargon, and abstract concepts unless necessary. Common technical terms (Docker, HTTP, API, JSON, URL) are fine. Describe problems so they are understandable to a developer of any level, not only a narrow specialist in the area.
Before analysis:
if [ ! -f ./docs/audit-baseline.yml ]; then
mkdir -p ./docs
cp ./skills/audit/audit-baseline-template.yml ./docs/audit-baseline.yml 2>/dev/null || \
printf "accepted: []\n" > ./docs/audit-baseline.yml
fi
cat ./docs/audit-baseline.ymlNAM-01 — Naming convention consistency:
userId vs user_id vs uid)NAM-02 — Names describe purpose:
d, x, tmp)mgr, proc, srv, usr)data, info, manager, handler, util)arrayOfUsers instead of users)NAM-03 — Booleans with predicate-style names:
enabled, valid, error)isNotValid, notDisabled) — double negation in conditionsNAM-04 — Reader functions without side effects:
getUser function mutates data or has side effectsfind*/fetch* methods perform writes/updatesNAM-05 — Named constants instead of magic values:
timeout = 86400, limit = 100)status === 'active' without an enum/constant)NAM-06 — Utility modules are not a dumping ground:
utils.ts, helpers.ts as a dumping ground for unrelated codeindex.ts exporting unrelated entitiesUbiquitous Language:
GLOSSARY.md, SPEC.md, or README.md with business terms, check for consistencyclient in the code while the domain uses customer — a ubiquitous language mismatchUser / Account / Member) without explicit justification🔍 UNVERIFIEDFor NAM-06, use the unused-code category tool from the stack profile
("Tooling by category" section): it finds unused exports and dead code in
utility modules (a dumping ground for unrelated code). Use the output as a hint
and verify each finding manually (file:line) before recording it as a FAIL. If
the cell is empty (tier general/generic), check manually and mark findings
🔍 UNVERIFIED.
| Check ID | Check | Status | Confidence | Evidence | Solution | Fixed |
|---|---|---|---|---|---|---|
| NAM-01 | Naming convention is followed consistently (camelCase/snake_case) | ✅ PASS | High | src/ — camelCase style is consistent | — | — |
| NAM-05 | Magic numbers and magic strings are replaced with named constants | ❌ FAIL 🟡 | High | utils/date.ts:18 | 1. Extract into const MAX_RETRY_ATTEMPTS = 3 \ 2. Add an explanation in a comment nearby \ 3. Move to config | No |
| NAM-06 | Utility modules are not a dumping ground for unrelated code | ⏸ ACCEPTED | Medium | src/utils.ts | In baseline: refactor planned | — |
| NAM-07 | Key entities are named in line with the project's domain glossary | 🔍 UNVERIFIED | Low | — | — | — |
Statuses: ✅ PASS / ❌ FAIL 🔴 / ❌ FAIL 🟠 / ❌ FAIL 🟡 / ❌ FAIL 🟢 / ⏸ ACCEPTED / 🔍 UNVERIFIED
Confidence: High — checked several key files, the pattern is obvious / Medium — checked selectively, the pattern is likely / Low — limited context, full certainty is impossible
For ❌ FAIL: exactly 3 solution options, separated by \\, with option 1 in bold.
Fixed: FAIL → No (the developer changes it to ✅ Yes manually after the fix). PASS / ACCEPTED / UNVERIFIED → —.
Solution requirements:
At the end of the report, add a coverage section:
## Audit Coverage
Checked: src/module1/**, src/module2/**
Skipped: scripts/**, migrations/**, tests/**
Files checked: N | Skipped: NIf everything is PASS, output: ✅ Naming standards are followed.
ls -dt ./docs/audits/[0-9]*/ 2>/dev/null | head -1 | sed 's|/$||'mkdir -p ./docs/audits/$(date +"%Y-%m-%d_%H-%M")<AUDIT_DIR>/audit-naming.md# Audit Report: Naming — <YYYY-MM-DD HH:MM>
<table>uxname/kodu
db733be
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.