Логотип Php Modern Standards

Php Modern Standards

Сообщество
peterbamuhigire
php-modern-standards

Use when writing or reviewing PHP 8+ applications, object-oriented domain code, Laravel services, PSR-compliant packages, secure request handling, tests, or performance-sensitive PHP.

Обзор

Издательpeterbamuhigire
Репозиторийchwezi-dev-engine
Название навыкаphp-modern-standards
Звёзды
29
Форки
6
Файлы в комплекте
26
ЛицензияMIT
Ссылки
  • Инструкции в формате Markdown

    Модель загружает файл SKILL.md по мере необходимости, поэтому токены расходуются только при подходящем запросе.

  • Работает с любой большой языковой моделью

    Навыки ИИ — это обычный Markdown, а не код для конкретного поставщика, поэтому они работают с GPT, Claude, Gemini, Grok и локальными моделями.

  • Файлы в комплекте: 26

    Скрипты, шаблоны и справочные материалы, которые модель может читать во время работы. Файлы доступны только для чтения и никогда не выполняются.

  • Открытый исходный код

    Издатель навыка на GitHub — peterbamuhigire. Перед установкой изучите исходные материалы.

Установка

Установите навык ИИ Php Modern Standards в TypingMind, чтобы использовать его с любой LLM, или добавьте его в другой агент, который умеет читать SKILL.md.

1

Установка в TypingMind

TypingMind устанавливает навык прямо из его папки на GitHub: читает SKILL.md, собирает файлы ресурсов и сохраняет результат локально.

  1. Откройте приложение и перейдите в раздел «Плагины → Навыки».
  2. Выберите «Установить из GitHub».
  3. Вставьте указанную ниже ссылку на папку навыка и подтвердите установку.
    https://github.com/peterbamuhigire/chwezi-dev-engine/tree/main/skills/languages/php-modern-standards
  4. Включите навык в каждом чате, где хотите его использовать.
Плагины → Навыки → Добавить навык → По ссылке GitHub, затем вставьте ссылку на папку и нажмите «Продолжить».
2

Установка в другом агенте

Любой агент с поддержкой формата Agent Skills может использовать этот навык — скопируйте папку в каталог навыков этого агента.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/peterbamuhigire/chwezi-dev-engine.git /tmp/chwezi-dev-engine
mkdir -p .claude/skills
cp -r /tmp/chwezi-dev-engine/skills/languages/php-modern-standards .claude/skills/php-modern-standards
После копирования перезапустите Claude Code, чтобы загрузить новый навык.

Использование в TypingMind

Включите навык Php Modern Standards в любом чате TypingMind, и дальше модель всё сделает сама. Его название и описание хранятся в системном промпте, а при появлении подходящего запроса модель сама загружает полные инструкции. Вам не нужно вызывать навык вручную, и до фактического использования он не расходует токены.

Модель сама загружает навык Php Modern Standards, как только появляется подходящий для него запрос.

Работает с любой моделью ИИ

Навыки ИИ — это обычные инструкции в Markdown, а не код для конкретного поставщика, поэтому навык Php Modern Standards не привязан к модели, для которой он был создан. Установите его один раз в TypingMind и используйте с GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama или локальной моделью, которую запускаете самостоятельно, — со своими ключами API.

  • Загружается только при необходимости

    Системный промпт содержит только название и описание. Инструкции загружаются при первом подходящем запросе, поэтому неиспользуемый навык не расходует токены.

  • Меняйте модели прямо в чате

    Навык состоит из инструкций, а не кода, поэтому смена модели не нарушает его работу: новая модель читает тот же файл SKILL.md.

Инструкции навыка

Это содержимое файла SKILL.md, которое загружает модель. Прочитайте его перед установкой: навык — это инструкции, которым будет следовать ваша модель.

PHP Modern Standards

Acknowledgement: Shared by Peter Bamuhigire, techguypeter.com, +256 784 464178.

Use When

  • Modern PHP development standards for maintainable, testable, object-oriented code. Use when writing PHP 8+ applications, implementing OOP patterns, ensuring security, following PSR standards, optimizing performance, or building Laravel...

Workflow

  • For long-lived PHP application work, load references/world-class-php-oop-clean-architecture.md before designing controllers, services, repositories, or domain objects.
  • For containerized PHP work, pair with docker-development.
  • Pin a supported PHP branch before choosing language features. Check https://www.php.net/supported-versions.php at execution time; record the access date and branch support state rather than relying on a copied lifecycle table.
  • For a minor-branch upgrade, assess the application's PHP and extension constraints, run every intervening migration guide, validate the locked dependencies under the actual target runtime, and test the application before production cutover. Follow references/php-runtime-upgrades.md.

Evidence Produced

CategoryArtifactFormatExample
CorrectnessPHP test planMarkdown doc per skill-composition-standards/references/test-plan-template.md covering unit, integration, and contract testsdocs/php/test-plan-checkout.md
OperabilityPHP-FPM operations noteMarkdown doc covering opcache, request lifecycle, and OPcache reset proceduredocs/php/fpm-ops-note.md

References

  • Use the references/ directory for deep detail after reading the core workflow below.
  • Use the examples/ directory for concrete patterns when implementation shape matters.
  • Use references/php-runtime-upgrades.md for a staged PHP 8.5 compatibility and release procedure.

Production-grade PHP patterns for maintainable, testable, secure, high-performance applications.

Core Principle: Write type-safe, secure, performant PHP code following PSR standards with modern PHP 8+ features.

References:

  • references/performance-efficiency.md — generators, OPcache, profiling, Fibers deep dive

  • references/code-quality-tooling.md — PHPStan, Pint config, CI/CD patterns

  • references/rate-limiting.md — rate limiting patterns

  • references/message-queues.md — queue patterns

  • references/cache-invalidation.md — cache invalidation patterns

  • references/resilience-patterns.md — circuit breakers, retries

  • references/restful-api-patterns.md — cURL client, Attribute routing, JWT, API versioning, testing

  • references/database-orm-patterns.md — PDO, QueryBuilder, Active Record Model, soft delete, ORM concepts

  • references/attack-prevention.md — SQL injection, XSS, CSRF, CSP, brute force, least privilege

  • references/world-class-php-oop-clean-architecture.md — PHP 8 OOP, SOLID, clean architecture, repositories, adapters, and framework-independent domain rules

  • references/source-register-dev-engine.md — book sources (titles only) used for this development-engine upgrade

  • references/php-security.md - absorbed PHP-specific security hardening, sessions, validation, crypto, upload, and deployment guidance

  • references/php-vs-nextjs.md - absorbed PHP vs Next.js architecture decision guidance

  • references/javascript-php-integration.md - absorbed integration patterns for PHP-rendered pages and JavaScript modules Examples: examples/modern-php-patterns.php, examples/laravel-patterns.php Security: Load references/php-security.md for comprehensive security patterns.

  • Use for PHP 8+, OOP, security, testing, performance, and Laravel; do not use for legacy PHP below 7.4 or WordPress-specific work.


File Structure

php
<?php

declare(strict_types=1);

namespace App\Domain\User;

use App\Domain\Shared\ValueObject;

final readonly class User
{
    public function __construct(
        private int $id,
        private string $email,
    ) {
    }
}

Rules: Always declare(strict_types=1), one class per file, namespace = directory, import all dependencies.

Cross-Platform File Naming (MANDATORY)

Code runs on Windows (dev), Ubuntu (staging), and Debian (production). Linux is case-sensitive:

  • Class files: PascalCase matching class name (StaffService.php)
  • Config dirs: lowercase (src/config/, src/lang/)
  • Module dirs: PascalCase matching namespace (src/HR/Services/)
  • require/include: Must match EXACT case on disk
  • Paths: Use / (forward slash). Never hardcode C:\. Use sys_get_temp_dir() for temp files.

Additional Guidance

Extended guidance for php-modern-standards was moved to references/skill-deep-dive.md to keep this entrypoint compact and fast to load.

PHP DevOps Runtime Discipline

When PHP work affects deployment, Docker, or production operations, pair this skill with docker-development and deployment-release-engineering, then apply the PHP delivery notes in ../deployment-release-engineering/references/devops-book-patterns.md:

  • keep Composer lockfiles and dependency installation reproducible;
  • run static analysis, coding standards, and tests in CI before packaging;
  • manage .env and secrets outside version control;
  • document PHP-FPM pool settings, OPcache reset or warm-up, queue worker restart, cache clear/warm, and file-permission steps;
  • include database migration order, backup, verification queries, and rollback or compensating actions;
  • verify server updates, unattended security updates, web server config, and backup/restore for uploaded files.

Use that deep dive for:

  • Type System
  • Modern Features
  • Performance
  • SOLID Principles
  • Control Flow
  • Security (Essentials)
  • Testing
  • Laravel Conventions
  • Code Quality Tooling
  • PSR Standards
  • Anti-Patterns
  • Checklist

Decision Rules

ConditionAction
Boundary accepts external dataValidate into typed input before domain logic
Framework convention is secure and testablePrefer it over a custom abstraction
Change affects persistence or queuesDefine transaction, retry, and idempotency behaviour

Degraded Mode

Fallback: without execution, provide exact Composer, static-analysis, and test commands. Do not assume framework support without dependency metadata.

Domain Anti-Patterns

  • Concatenating user input into SQL.
  • Hiding domain behaviour in controllers.
  • Catching Throwable without recovery policy.
  • Adding mutable service-locator dependencies.
  • Claiming compatibility without checking Composer constraints.

Inputs

ArtefactRequired?Purpose
PHP version, framework, code, and repository standardsyesApply compatible typing, security, and tooling rules

Outputs

  • Produce PHP code or findings with static-analysis, test, security, and compatibility evidence.

Capability contract

Read/search and local static checks are allowed. Dependency changes, migrations, deployment, and production execution require explicit task authority.

Файлы в комплекте

Модель читает эти файлы по мере необходимости, пока навык загружен. Они доступны только для чтения и никогда не выполняются.

Часто задаваемые вопросы

Что делает навык ИИ Php Modern Standards?

Use when writing or reviewing PHP 8+ applications, object-oriented domain code, Laravel services, PSR-compliant packages, secure request handling, tests, or performance-sensitive PHP.

Зачем использовать Php Modern Standards в TypingMind?

Потому что вы устанавливаете навык один раз и используете его с любой моделью. Php Modern Standards — это обычный текст в формате Markdown, а не код для конкретного поставщика, поэтому один и тот же навык работает с GPT-5, Claude, Gemini, Grok или локальной моделью. Вы можете менять модель прямо во время чата, и навык продолжит работать. TypingMind использует ваши собственные ключи API, поэтому вы платите поставщикам напрямую, а не оформляете подписку с оплатой за каждое место. Ваши навыки и чаты остаются в вашем собственном хранилище.

Как установить Php Modern Standards в TypingMind?

В TypingMind откройте «Плагины → Навыки → Установить из GitHub» и вставьте https://github.com/peterbamuhigire/chwezi-dev-engine/tree/main/skills/languages/php-modern-standards. TypingMind прочитает файл SKILL.md, включит сопутствующие файлы в пакет и установит навык, который можно включать отдельно для каждого чата.

Какие модели ИИ могут использовать Php Modern Standards?

Любая модель, которую вы подключите в TypingMind. Навыки ИИ — это обычные инструкции в формате Markdown, а не код для конкретного поставщика, поэтому GPT, Claude, Gemini, Grok и локальные модели могут загружать этот навык, когда запрос ему соответствует.

Со сколькими моделями ИИ можно использовать Php Modern Standards?

С любым количеством. В TypingMind вы можете использовать Php Modern Standards с любой моделью, которая поддерживает навыки, в том числе с GPT, Claude, Gemini, Grok, DeepSeek, Mistral и Llama. Для этого вы используете собственные ключи API.

Бесплатен ли навык ИИ Php Modern Standards?

Да. Навык опубликован на GitHub по лицензии MIT. Издатель — peterbamuhigire. Вы платите только своему поставщику ИИ за использованные токены.

Что такое навыки ИИ?

Навык ИИ — это набор инструкций, которыми модель ИИ может пользоваться каждый раз, когда ей нужно выполнить конкретную задачу. Он соответствует открытому формату Agent Skills: файл SKILL.md с названием и описанием, а также любые скрипты, шаблоны или справочные файлы, которые могут понадобиться модели. Модель читает инструкции, только когда ваш запрос соответствует навыку, поэтому установленный навык ничего не стоит, пока не используется.

Чем навыки ИИ отличаются от плагинов и серверов MCP?

Плагин или сервер MCP даёт модели новые инструменты, которые она может вызывать: при вызове где-то выполняется код и возвращает результат. Навык ИИ, напротив, даёт модели знания и описывает порядок действий: как подойти к задаче, какие шаги выполнить и каким должен быть хороший результат. Навыки — это обычный текст в формате Markdown, поэтому им не нужны сервер, ключ API или среда выполнения, и они работают с любой моделью.

Все

Создайте своё рабочее пространство с ИИ прямо сейчас

Подпишитесь на нашу рассылку, чтобы узнавать о новых функциях и предстоящих розыгрышах 👇