Skip to content
Back to skills

Clean Naming And Logging

ASecurity

Use when writing or refactoring functions, variables, or logs. Enforces short descriptive names, readable beginner-friendly flow, and useful logs without decorative noise.

  • 4 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 1, 2026
ai-agentsgorefactoringapi

Works with

  • api

Security analysis

A100/100

Scanned December 1, 2026

npx -y skills add Ganesh-Dark/ai-coding-agent-skills --skill clean-naming-and-logging --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Clean Naming And Logging?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Clean Naming And Logging
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ganesh-dark-clean-naming-and-logging/badge)](https://www.skillsdirectory.com/skills/ganesh-dark-clean-naming-and-logging)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: clean-naming-and-logging
description: Use when writing or refactoring functions, variables, or logs. Enforces short descriptive names, readable beginner-friendly flow, and useful logs without decorative noise.
---

# Clean Naming and Logging

Agents often write cryptic single-letter variables (`d`, `x2`) or 40-character names, nest logic too deeply, and either log nothing on failures or print noisy star/dash banners.

## Rules

- Use short, crisp, descriptive variable and function names that clearly show what data they hold. Avoid single-letter names (outside simple loop indexes) and overly long names.
- Keep logic shallow and readable. Use early returns and small helper functions instead of deeply nested `if`/`for` blocks or clever one-liners.
- Explain what each function does and what its parameters expect in a concise comment or docstring.
- Add clear logs at key steps (startup, API calls, important calculations, and error paths) so failures are easy to trace.
- Never print noisy decorative banner lines (like `print("--- Starting ---")` or `======`).
- Never use emojis in code, logs, comments, or UI text unless the user explicitly asks for them (use an icon library like Lucide for UI icons).

## Example

Bad:
Using `def proc(d, f):` with four nested `if` blocks, no parameter comments, and `print("***** DONE *****")`.

Good:
Using `def filter_active_users(users, min_days):` with a short parameter comment, an early return for empty input, and `print(f"Filtered {len(active)} active users")`.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.