Check Comments logo

Check Comments

Community
dykyi-roman
check-comments

Analyzes PHP code for comment quality issues. Detects missing PHPDoc, outdated comments, commented-out code, opportunities for self-documenting code.

Overview

Publisherdykyi-roman
Repositoryawesome-claude-code
Skill namecheck-comments
Stars
98
Forks
25
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by dykyi-roman on GitHub. Read the source before you install it.

Installation

Install the Check Comments AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/dykyi-roman/awesome-claude-code.git /tmp/awesome-claude-code
mkdir -p .claude/skills
cp -r /tmp/awesome-claude-code/skills/check-comments .claude/skills/check-comments
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Check Comments in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Check Comments on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Check Comments is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Comment Quality Check

Analyze PHP code for documentation and comment issues.

Detection Patterns

1. Missing PHPDoc

php
// BAD: No documentation on public method
public function process(array $items, bool $force = false): Result
{
}

// GOOD: Documented public method
/**
 * Process items with optional force flag.
 *
 * @param array<Item> $items Items to process
 * @param bool $force Force processing even if already processed
 * @return Result Processing result with status and errors
 *
 * @throws ProcessingException When processing fails
 */
public function process(array $items, bool $force = false): Result
{
}

2. Outdated Comments

php
// BAD: Comment doesn't match code
// Calculates the discount percentage
public function calculateTax(Money $amount): Money
{
    return $amount->multiply(0.21);
}

// BAD: TODO that's been done or is stale
// TODO: Add validation (added 3 years ago)
$this->validate($data);

// BAD: Incorrect parameter documentation
/**
 * @param string $userId The user ID  // Actually int
 */
public function findUser(int $userId): User {}

3. Commented-Out Code

php
// BAD: Dead code cluttering the file
public function process(Order $order): void
{
    // $this->legacyProcessor->process($order);
    // if ($order->needsSpecialHandling()) {
    //     $this->specialHandler->handle($order);
    // }

    $this->newProcessor->process($order);
}

// Remove commented code - use version control instead
public function process(Order $order): void
{
    $this->newProcessor->process($order);
}

4. Obvious Comments

php
// BAD: Comments stating the obvious
// Get the user
$user = $this->getUser();

// Increment counter
$counter++;

// Loop through items
foreach ($items as $item) {}

// GOOD: Comments explaining WHY
// Fetch fresh user to ensure permissions are current
$user = $this->getUser();

5. Self-Documenting Code Opportunities

php
// BAD: Comment needed due to unclear code
// Check if user can access premium features
if ($user->level >= 3 && $user->subscription !== null && $user->subscription->isActive()) {}

// GOOD: Self-documenting
if ($user->canAccessPremiumFeatures()) {}

// BAD: Magic number with comment
// 86400 seconds in a day
$expiry = time() + 86400;

// GOOD: Named constant
$expiry = time() + self::SECONDS_PER_DAY;

6. Missing Exception Documentation

php
// BAD: Throws not documented
public function divide(int $a, int $b): float
{
    if ($b === 0) {
        throw new DivisionByZeroException();
    }
    return $a / $b;
}

// GOOD: Throws documented
/**
 * @throws DivisionByZeroException When divisor is zero
 */
public function divide(int $a, int $b): float {}

7. Noise Comments

php
// BAD: File header noise
/***********************************
 * UserService.php
 * Created: 2024-01-01
 * Author: John Doe
 * Last Modified: 2024-06-15
 ***********************************/

// BAD: Section dividers
//////////////////////////////////
// GETTERS AND SETTERS
//////////////////////////////////

// BAD: Closing brace comments
} // end if
} // end foreach
} // end class

8. Inline Comment Placement

php
// BAD: Comment on same line as code
$total = $price * $quantity; // Calculate total

// GOOD: Comment on line before
// Calculate order total including quantity discount
$total = $this->calculateTotal($price, $quantity);

PHPDoc Best Practices

Required Documentation

php
/**
 * Classes: Brief description of purpose
 */
final class OrderProcessor
{
    /**
     * Public methods: What it does, params, returns, throws
     */
    public function process(Order $order): Result {}

    /**
     * Complex private methods: When non-obvious
     */
    private function calculateComplexDiscount(): Money {}
}

Type Annotations

php
/**
 * @param array<string, mixed> $config Configuration options
 * @param list<int> $ids List of integer IDs
 * @param Collection<int, User> $users User collection
 * @return array{success: bool, errors: list<string>}
 */

When NOT to Comment

  • Getters and setters (self-explanatory)
  • Simple private methods
  • Code that is self-documenting
  • Obvious logic

Grep Patterns

bash
# Commented out code
Grep: "^\s*//\s*\\\$|^\s*//\s*if\s*\(|^\s*//\s*foreach" --glob "**/*.php"

# TODO/FIXME
Grep: "TODO|FIXME|HACK|XXX" --glob "**/*.php"

# Missing PHPDoc on public method
Grep: "^\s*public\s+function" --glob "**/*.php"
# Compare with lines having /** before them

# Old-style type hints in comments
Grep: "@param\s+\w+\s+\\\$\w+.*\bint\b|\bstring\b" --glob "**/*.php"

Severity Classification

PatternSeverity
Outdated/misleading comments🟠 Major
Commented-out code🟡 Minor
Missing PHPDoc on public API🟡 Minor
Obvious comments🟢 Suggestion
Missing @throws🟢 Suggestion

Output Format

markdown
### Comment Issue: [Description]

**Severity:** 🟠/🟡/🟢
**Location:** `file.php:line`
**Type:** [Missing PHPDoc|Outdated|Commented Code|...]

**Issue:**
[Description of the comment problem]

**Current:**
```php
// Calculate discount
public function calculateTax(): Money {}

Suggested:

php
/**
 * Calculate applicable tax for the order.
 *
 * @return Money Tax amount in order currency
 */
public function calculateTax(): Money {}

Frequently asked questions

What does the Check Comments AI skill do?

Analyzes PHP code for comment quality issues. Detects missing PHPDoc, outdated comments, commented-out code, opportunities for self-documenting code.

Why use Check Comments on TypingMind?

Because you install it once and use it with any model. Check Comments is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Check Comments in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/dykyi-roman/awesome-claude-code/tree/master/skills/check-comments. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Check Comments?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Check Comments?

As many as you like. As long as a model supports skills, you can use Check Comments with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Check Comments AI skill free?

Yes. It is published on GitHub by dykyi-roman under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇