JetBrains logo

Skill

php-project-guide

manage PHP project development environments

Covers PHP Local Development Engineering

Description

Foundational PHP project knowledge for AI agents. Use when working on a PHP project, setting up a PHP development environment, understanding PHP project structure, following PHP coding standards, running PHP tests, using Composer, or when guidance on PHP-specific tools and workflows in PhpStorm is needed.

SKILL.md

PHP Project Guide

Foundational knowledge for working effectively on any PHP project in PhpStorm. Provides project detection, coding standards, testing patterns, framework guidance, and MCP tool usage.

Quick Start: First Interaction with a PHP Project

Run these steps when encountering a new PHP project for the first time.

1. Detect PHP environment

get_php_project_config()

Returns the configured PHP language level, interpreter details (name, path, local/remote), and runtime information (exact PHP version, loaded extensions, php.ini path, debuggers). Use this to understand the PHP environment before generating code.

2. Identify dependencies and framework

get_composer_dependencies()

This returns all installed packages with exact versions from composer.lock. Use it to determine:

  • Framework: laravel/framework, symfony/framework-bundle, or neither
  • Test framework: phpunit/phpunit, pestphp/pest, codeception/codeception
  • Static analysis: phpstan/phpstan, vimeo/psalm
  • Code style: friendsofphp/php-cs-fixer, squizlabs/php_codesniffer

Use the optional nameFilter glob parameter to search for specific packages (e.g., nameFilter: "laravel/*").

3. Route to framework-specific guidance

DependencyProject TypeReference
laravel/frameworkLaravelSee references/framework-laravel.md
symfony/framework-bundleSymfonySee references/framework-symfony.md
NeitherGeneric PHPSee references/php-standards.md

PhpStorm MCP Tools Quick Reference

Code Analysis

ToolWhen to Use
get_inspectionsAfter edits, for code review, to find problems with available quick fixes
apply_quick_fixTo resolve inspection problems automatically
get_file_problemsQuick error/warning check on any file type (no quick fixes returned)
build_projectTrigger project build and get compilation errors
ToolWhen to Use
search_structuralTo find code patterns semantically using SSR (requires fileType: "PHP")
get_structural_patternsTo discover predefined PHP search patterns by category
search_textFast text substring search across project files
search_regexRegex search across project files with match coordinates
search_symbolSemantic symbol lookup (classes, methods, fields)
search_fileFind files by glob pattern
find_files_by_name_keywordFast file search by name substring (uses indexes)
find_files_by_globFind files matching glob pattern recursively

Code Intelligence

ToolWhen to Use
get_symbol_infoGet Quick Documentation for a symbol at a specific position
rename_refactoringSafely rename a symbol across the entire project
get_php_project_configGet PHP language level, interpreter, extensions, runtime info
get_composer_dependenciesUnderstand project dependencies, framework, and versions

File Operations

ToolWhen to Use
read_fileRead file with advanced modes (slice, lines, offsets, indentation)
get_file_text_by_pathRead full file text by project-relative path
replace_text_in_fileTargeted find-and-replace in files
create_new_fileCreate new files with content
reformat_fileApply IDE code formatting rules

Execution

ToolWhen to Use
get_run_configurationsList available run/test configurations
execute_run_configurationRun a specific configuration and get results
execute_terminal_commandRun shell commands in IDE terminal

See references/mcp-tools-reference.md for detailed parameters and usage patterns.

Documentation Lookup

When you need documentation beyond what these references provide:

Reference Documents

ReferenceContent
references/project-detection.mdcomposer.json anatomy, PSR-4 autoloading, directory layouts
references/php-standards.mdPER/PSR coding standards, PHP version features, anti-patterns
references/testing-guide.mdPHPUnit, Pest, running tests, common mistakes
references/framework-laravel.mdLaravel directory structure, Eloquent, artisan, routes
references/framework-symfony.mdSymfony directory structure, Doctrine, console, services
references/static-analysis.mdPHPStan, Psalm, PHP CS Fixer, PHP CodeSniffer
references/composer-guide.mdComposer commands, version constraints, autoloading
references/mcp-tools-reference.mdDetailed PhpStorm MCP tool parameters and workflows

© 2026 YourAI.tools. Every skill from an identity-verified publisher.

Independent catalog. Not affiliated with, endorsed by, or sponsored by Anthropic or any listed publisher. All trademarks belong to their respective owners.