Check Code Style logo

Check Code Style

Community
dykyi-roman
check-code-style

Analyzes PHP code for style issues. Checks PSR-12 compliance, formatting consistency, whitespace usage, line length.

Overview

Publisherdykyi-roman
Repositoryawesome-claude-code
Skill namecheck-code-style
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 Code Style 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-code-style .claude/skills/check-code-style
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Check Code Style 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 Code Style 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 Code Style 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.

Code Style Check

Analyze PHP code for style consistency and PSR-12 compliance.

Detection Patterns

1. PSR-12 Violations

php
// BAD: Opening brace on same line for class
class User {
}

// GOOD: Opening brace on new line
class User
{
}

// BAD: Opening brace on new line for methods
public function getName()
{
}

// GOOD: Opening brace on same line for control structures
if ($condition) {
}

// BAD: No space after keywords
if($condition) {}
foreach($items as $item) {}

// GOOD: Space after keywords
if ($condition) {}
foreach ($items as $item) {}

2. Line Length

php
// BAD: Exceeds 120 characters
$result = $this->veryLongServiceName->processWithManyParameters($parameter1, $parameter2, $parameter3, $parameter4, $parameter5);

// GOOD: Broken into multiple lines
$result = $this->veryLongServiceName->processWithManyParameters(
    $parameter1,
    $parameter2,
    $parameter3,
    $parameter4,
    $parameter5
);

3. Indentation

php
// BAD: Mixed tabs and spaces
class User
{
	private string $name;  // Tab
    private int $age;      // Spaces
}

// GOOD: Consistent 4 spaces
class User
{
    private string $name;
    private int $age;
}

4. Blank Lines

php
// BAD: No blank line after namespace
namespace App\Service;
use App\Repository;

// GOOD: Blank line after namespace
namespace App\Service;

use App\Repository;

// BAD: No blank line between methods
public function getName(): string
{
    return $this->name;
}
public function setName(string $name): void
{
    $this->name = $name;
}

// GOOD: Blank line between methods
public function getName(): string
{
    return $this->name;
}

public function setName(string $name): void
{
    $this->name = $name;
}

5. Trailing Whitespace

php
// BAD: Trailing spaces at end of line
$name = 'John';
$age = 25;

// GOOD: No trailing whitespace
$name = 'John';
$age = 25;

6. Use Statement Ordering

php
// BAD: Unordered use statements
use App\Service\OrderService;
use App\Entity\User;
use Symfony\Component\HttpFoundation\Request;
use App\Repository\UserRepository;

// GOOD: Grouped and alphabetized
use App\Entity\User;
use App\Repository\UserRepository;
use App\Service\OrderService;
use Symfony\Component\HttpFoundation\Request;

7. Array Syntax

php
// BAD: Long array syntax
$items = array(1, 2, 3);
$config = array(
    'key' => 'value',
);

// GOOD: Short array syntax
$items = [1, 2, 3];
$config = [
    'key' => 'value',
];

8. Operator Spacing

php
// BAD: Inconsistent spacing
$sum=$a+$b;
$name = $first.$last;
$condition = $a>$b;

// GOOD: Consistent spacing
$sum = $a + $b;
$name = $first . $last;
$condition = $a > $b;

9. Comma Spacing

php
// BAD: No space after comma
$result = calculate($a,$b,$c);
$array = [1,2,3];

// GOOD: Space after comma
$result = calculate($a, $b, $c);
$array = [1, 2, 3];

10. Return Type Declaration

php
// BAD: Space before colon
public function getName() : string {}

// GOOD: No space before colon
public function getName(): string {}

// BAD: No space after colon
public function getName():string {}

// GOOD: Space after colon
public function getName(): string {}

Grep Patterns

bash
# Opening brace on same line for class
Grep: "class\s+\w+\s*\{" --glob "**/*.php"

# No space after if/foreach/while
Grep: "(if|foreach|while|for|switch)\(" --glob "**/*.php"

# Lines over 120 chars (needs manual check)
Grep: "^.{121,}$" --glob "**/*.php"

# array() instead of []
Grep: "array\s*\(" --glob "**/*.php"

# Missing space around operators
Grep: "[^ ]==[^ ]|[^ ]!=[^ ]" --glob "**/*.php"

Severity Classification

PatternSeverity
Mixed tabs/spaces🟠 Major
PSR-12 brace placement🟡 Minor
Line length > 120🟡 Minor
Operator spacing🟢 Suggestion
Use statement order🟢 Suggestion

Automated Fixing

Most style issues can be automatically fixed:

bash
# PHP-CS-Fixer
php-cs-fixer fix --rules=@PSR12

# PHP_CodeSniffer
phpcbf --standard=PSR12 src/

Output Format

markdown
### Style Issue: [Description]

**Severity:** 🟠/🟡/🟢
**Location:** `file.php:line`
**Rule:** PSR-12 / Project Standard

**Issue:**
[Description of the style violation]

**Current:**
```php
if($condition){

Suggested:

php
if ($condition) {

Auto-fix: Run php-cs-fixer fix --rules=@PSR12

Frequently asked questions

What does the Check Code Style AI skill do?

Analyzes PHP code for style issues. Checks PSR-12 compliance, formatting consistency, whitespace usage, line length.

Why use Check Code Style on TypingMind?

Because you install it once and use it with any model. Check Code Style 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 Code Style in TypingMind?

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

Which AI models can use Check Code Style?

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 Code Style?

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

Is the Check Code Style 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 👇