inline-comments

Generate rationale-focused inline comments with before/after diffs for JavaScript, TypeScript, and Python code.

11|Updated Apr 16, 2026
One-click install
npx skills add https://github.com/berkcangumusisik/claude-code-practices --skill inline-comments
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: inline-comments
Source: https://github.com/berkcangumusisik/claude-code-practices/tree/main/skills/inline-comments
Command: npx skills add https://github.com/berkcangumusisik/claude-code-practices --skill inline-comments

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Non-obvious code sections often hide intent, making maintenance and reviews harder. This skill adds inline comments that explain the rationale behind complex logic, not just what the code does, and shows before/after changes for clarity.

Core Features & Use Cases

  • Rationale-focused comments: Explain the why behind complex algorithms, regex patterns, and non-obvious decisions.
  • Diff-based updates: Apply comments and present before/after diffs to aid reviews.
  • Comment hygiene: Avoid commenting obvious code and mark workarounds with HACK/TODO tags.
  • Targeted guidance: Suitable for languages with inline comments in JavaScript, TypeScript, Python, and similar languages.

Quick Start

Run the inline-comments process on a source file to generate rationale-focused inline comments with a before/after diff.

Frequently Asked Questions about inline-comments

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add inline comments that explain the why behind complex code logic?

To add rationale-focused inline comments, identify non-obvious code sections like complex algorithms or regex patterns and generate comments explaining the reasoning behind decisions. This skill produces before/after diff blocks showing the annotated changes for easier code review.

When should I use inline comments versus leaving code self-documenting?

Use inline comments for non-obvious code sections where intent is hidden, such as complex algorithms, regex patterns, or workarounds marked with HACK/TODO tags. Avoid commenting obvious code where the logic is already clear from reading the implementation.

Can I generate rationale-focused inline comments for Python and TypeScript source files?

Yes, you can generate rationale-focused inline comments for JavaScript, TypeScript, Python, and similar languages that support inline comment syntax. The skill annotates complex logic and patterns across these languages while avoiding commentary on obvious code.

What is the best way to annotate complex algorithms for code review without cluttering the source?

The best way to annotate complex algorithms is to apply rationale-focused comments only to non-obvious sections and present changes as before/after diff blocks. This approach maintains comment hygiene by avoiding obvious code commentary and highlighting intent for reviewers.

Does this inline commenting approach work with existing codebases or only new code?

This inline commenting approach works with existing source files by identifying non-obvious sections in the current code and generating rationale-focused comments. It produces before/after diff blocks so you can review exactly what changes were made and why.

How do I mark workarounds and technical debt when adding inline comments to source files?

To mark workarounds and technical debt, use HACK and TODO tags within your inline comments to flag non-obvious decisions and temporary solutions. This practice maintains comment hygiene by clearly distinguishing workarounds from permanent rationale-focused explanations.