Skip to content
Back to skills

Inline Comments

ASecurity

Adds inline comments to complex or non-obvious code sections

  • 10 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added June 1, 2026
ai-agentsgoapiperformance

Works with

  • api

Security analysis

A100/100

Scanned June 1, 2026

npx -y skills add berkcangumusisik/claude-code-practices --skill inline-comments --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Inline Comments?

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

Security grade badge for Inline Comments
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/berkcangumusisik-inline-comments/badge)](https://www.skillsdirectory.com/skills/berkcangumusisik-inline-comments)

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: inline-comments
description: Adds inline comments to complex or non-obvious code sections
argument-hint: <file-path>
user-invocable: true
allowed-tools: Read Edit
effort: low
---

## Add Inline Comments

File: **$1**

1. Read the file. Identify sections that are non-obvious:
   - Complex algorithms or math
   - Regex patterns
   - Bitwise operations
   - Non-intuitive business logic
   - Workarounds or known limitations
   - Performance-sensitive sections

2. Write comments that explain the **why**, not the **what**:
   ```ts
   // ❌ Bad: increment counter
   count++

   // ✅ Good: offset by 1 because API uses 1-based page numbering
   page = requestedPage + 1
   ```

3. For workarounds, use this format:
   ```ts
   // HACK: Safari doesn't support X, so we Y instead
   // TODO: remove when Safari 18 becomes baseline
   ```

4. Don't comment obvious code. If code needs a comment to be understood, also consider if it should be refactored instead.

5. Apply comments. Show before/after diff.

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.

Comments

Loading comments…

Newsletter

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