Logo vun Php Documentation Standards

Php Documentation Standards

Communautéit
c-kick
php-documentation-standards

Enforces PHP documentation standards for PHPStorm IDE support. Apply when writing or reviewing PHP classes, methods, docblocks, type hints, or magic property annotations.

Iwwersiicht

Editeurc-kick
Repositoryhnl-agent-skills
Skill-Nummphp-documentation-standards
Stären
56
Forks
4
Matgeliwwert Fichieren
Nëmmen Instruktiounen
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • Alles an den Instruktiounen

    Alles, wat de Modell brauch, steet an den Instruktiounen — keng zousätzlech Dateien ze synchroniséieren.

  • Open Source

    Vum c-kick op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Php Documentation Standards an TypingMind, fir e mat all LLM ze benotzen, oder füügt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vun GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier hei drënner an a bestätegt.
    https://github.com/c-kick/hnl-agent-skills/tree/master/php-documentation-standards
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill afügen → Vu GitHub-URL, pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an de Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/c-kick/hnl-agent-skills.git /tmp/hnl-agent-skills
mkdir -p .claude/skills
cp -r /tmp/hnl-agent-skills/php-documentation-standards .claude/skills/php-documentation-standards
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Php Documentation Standards an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Php Documentation Standards automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Php Documentation Standards net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Keys.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

PHP Documentation Standards

Apply these standards when writing or reviewing PHP code in this project.

Quick Reference

Class Documentation

php
/**
 * ClassName - Brief one-line description (< 80 chars)
 *
 * - What the class does
 * - Key responsibilities
 *
 * @example Real usage pattern
 * $instance = new ClassName($param);
 * $result = $instance->method();
 *
 * @property-read Type $property For magic properties
 * @package YourNamespace
 */

Method Documentation

php
/**
 * Brief description of what method does
 *
 * @param Type $param Description
 * @param Type|null $optional Optional parameter
 * @return Type Description of return value
 */
public function methodName(Type $param, ?Type $optional = null): Type {

Type Hints

Always use type hints:

  • Parameters: string $name, ?int $id
  • Return types: function(): array, function(): ?User
  • Union types: string|int|null

Magic Properties

php
/**
 * @property-read FieldValue $title
 * @property-read FieldValue $content
 */

Type Safety Guidelines

Strict Types

Add to new PHP files:

php
<?php
declare(strict_types=1);

Type Hints

Always use native PHP type hints:

php
// Parameters
public function process(int $id, ?string $name = null): void

// Return types - be specific
public function getCount(): int
public function findUser(int $id): ?User

// Union types (PHP 8+)
public function setValue(string|int $value): void

Type Coercion

Explicitly cast untrusted input:

php
// User input from $_GET, $_POST, REST params
$id = (int) $request->get_param('id');
$limit = absint($params['limit'] ?? 10);

// Array access with defaults
$value = (string) ($data['key'] ?? '');

PHPDoc for Complex Types

When native types aren't enough:

php
/**
 * @param array<string, mixed> $options
 * @param callable(int): bool $filter
 * @return array<int, User>
 */

Static Analysis

Consider adding PHPStan at level 5+ for automated type checking:

bash
composer require --dev phpstan/phpstan
./vendor/bin/phpstan analyse inc/ --level=5

Checklist

Before committing:

  • Class has docblock with description and @package
  • Public methods have @param and @return
  • Type hints on all parameters and return values
  • Magic properties documented with @property-read
  • At least one @example showing real usage
  • Complex logic has inline comments explaining "why"
  • User input is explicitly cast to expected types
  • New files have declare(strict_types=1) where appropriate

Complete Standards

If the project has extended documentation standards, check for a dedicated docs file (e.g., docs/php_documentation_standards.md) for full examples and project-specific conventions.

Heefeg gestallte Froen

Wat mécht de KI-Skill Php Documentation Standards?

Enforces PHP documentation standards for PHPStorm IDE support. Apply when writing or reviewing PHP classes, methods, docblocks, type hints, or magic property annotations.

Firwat Php Documentation Standards op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Php Documentation Standards besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt amplaz vun engem Abonnement pro Benotzerplaz. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Php Documentation Standards an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/c-kick/hnl-agent-skills/tree/master/php-documentation-standards an. TypingMind liest d'Datei SKILL.md an installéiert de Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Php Documentation Standards benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Php Documentation Standards benotzen?

Esou vill Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Php Documentation Standards domat benotzen – GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama a méi – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Php Documentation Standards gratis?

De Skill gëtt vum c-kick op GitHub publizéiert. Kuckt am Repository no de Lizenzbedéngungen. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbaart Pak vun Instruktiounen, dat engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt en nokënnt a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a keng Lafzäitëmfeld a funktionéiere mat all Modell.

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇