Help us improve
Share bugs, ideas, or general feedback.
From acc
Generates Psalm configurations for PHP 8.4+ projects, creating psalm.xml and psalm-baseline.xml with error levels, plugins, taint analysis, and DDD-specific settings for new, existing, or domain-driven projects.
npx claudepluginhub dykyi-roman/awesome-claude-code --plugin accHow this skill is triggered — by the user, by Claude, or both
Slash command
/acc:create-psalm-configThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Generates optimized Psalm configurations for PHP 8.4+ projects.
Generates PHPStan configs (phpstan.neon, baselines) for PHP 8.4+ projects with levels, paths, strict rules, and DDD/Doctrine support. For new, legacy, or domain-driven apps.
Analyzes PHP stacks on composer.json detection: detects Laravel, Symfony, Slim, Hyperf, Laminas, raw PHP; extracts DI, ORM, queues, validation, testing, PSR compliance.
Guides Pylint configuration for Python projects including pylintrc files, message controls, plugins, and scoring systems. Use for linting setup and code quality enforcement.
Share bugs, ideas, or general feedback.
Generates optimized Psalm configurations for PHP 8.4+ projects.
psalm.xml # Main configuration
psalm-baseline.xml # Error baseline (if needed)
<?xml version="1.0"?>
<psalm
errorLevel="2"
resolveFromConfigFile="true"
findUnusedBaselineEntry="true"
findUnusedCode="true"
findUnusedVariablesAndParams="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
>
<projectFiles>
<directory name="src"/>
<ignoreFiles>
<directory name="vendor"/>
</ignoreFiles>
</projectFiles>
<plugins>
<pluginClass class="Psalm\PhpUnitPlugin\Plugin"/>
</plugins>
</psalm>
<?xml version="1.0"?>
<psalm
errorLevel="4"
resolveFromConfigFile="true"
errorBaseline="psalm-baseline.xml"
findUnusedBaselineEntry="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
>
<projectFiles>
<directory name="src"/>
<ignoreFiles>
<directory name="vendor"/>
<directory name="src/Legacy"/>
</ignoreFiles>
</projectFiles>
<issueHandlers>
<!-- Gradually enable -->
<MixedAssignment errorLevel="suppress"/>
<MixedMethodCall errorLevel="suppress"/>
<MixedArgument errorLevel="suppress"/>
</issueHandlers>
</psalm>
<?xml version="1.0"?>
<psalm
errorLevel="1"
resolveFromConfigFile="true"
findUnusedBaselineEntry="true"
findUnusedCode="true"
findUnusedVariablesAndParams="true"
strictBinaryOperands="true"
phpVersion="8.4"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
>
<projectFiles>
<directory name="src"/>
<ignoreFiles>
<directory name="vendor"/>
<directory name="src/Infrastructure/Migrations"/>
</ignoreFiles>
</projectFiles>
<!-- Domain layer - strictest -->
<projectFiles>
<directory name="src/Domain">
<errorLevel type="error">
<MixedAssignment/>
<MixedMethodCall/>
<MixedArgument/>
</errorLevel>
</directory>
</projectFiles>
<plugins>
<pluginClass class="Psalm\PhpUnitPlugin\Plugin"/>
<pluginClass class="Weirdan\DoctrinePsalmPlugin\Plugin"/>
<pluginClass class="Psalm\SymfonyPsalmPlugin\Plugin"/>
</plugins>
<issueHandlers>
<!-- Doctrine entities -->
<PropertyNotSetInConstructor>
<errorLevel type="suppress">
<directory name="src/Infrastructure/Doctrine/Entity"/>
</errorLevel>
</PropertyNotSetInConstructor>
<!-- Value Objects immutability -->
<ImmutablePropertyAssignment>
<errorLevel type="error">
<directory name="src/Domain"/>
</errorLevel>
</ImmutablePropertyAssignment>
<!-- Allow missing return types in interfaces (for contravariance) -->
<MissingReturnType>
<errorLevel type="suppress">
<directory name="src/Domain/Repository"/>
</errorLevel>
</MissingReturnType>
</issueHandlers>
<!-- Stubs for external libraries -->
<stubs>
<file name="stubs/Doctrine.phpstub"/>
</stubs>
</psalm>
<plugins>
<pluginClass class="Psalm\PhpUnitPlugin\Plugin"/>
</plugins>
<plugins>
<pluginClass class="Weirdan\DoctrinePsalmPlugin\Plugin">
<enableObjectManagerGenerator value="true"/>
</pluginClass>
</plugins>
<plugins>
<pluginClass class="Psalm\SymfonyPsalmPlugin\Plugin">
<containerXml>var/cache/dev/App_KernelDevDebugContainer.xml</containerXml>
</pluginClass>
</plugins>
<plugins>
<pluginClass class="Psalm\LaravelPlugin\Plugin"/>
</plugins>
<issueHandlers>
<!-- Allow mixed in legacy code -->
<MixedAssignment>
<errorLevel type="suppress">
<directory name="src/Legacy"/>
</errorLevel>
</MixedAssignment>
<!-- Allow property initialization in setUp() -->
<PropertyNotSetInConstructor>
<errorLevel type="suppress">
<directory name="tests"/>
</errorLevel>
</PropertyNotSetInConstructor>
<!-- Suppress for mocks -->
<UndefinedMagicMethod>
<errorLevel type="suppress">
<directory name="tests"/>
</errorLevel>
</UndefinedMagicMethod>
<!-- Allow unused parameters in event handlers -->
<UnusedParam>
<errorLevel type="suppress">
<file name="src/Application/EventHandler/*.php"/>
</errorLevel>
</UnusedParam>
<!-- Suppress deprecated in migrations -->
<DeprecatedMethod>
<errorLevel type="suppress">
<directory name="src/Infrastructure/Migrations"/>
</errorLevel>
</DeprecatedMethod>
</issueHandlers>
<issueHandlers>
<!-- Enforce strict types in Domain -->
<MixedAssignment>
<errorLevel type="error">
<directory name="src/Domain"/>
</errorLevel>
<errorLevel type="suppress">
<directory name="src/Infrastructure"/>
</errorLevel>
</MixedAssignment>
<!-- Enforce immutability -->
<ImmutablePropertyAssignment>
<errorLevel type="error">
<directory name="src/Domain/ValueObject"/>
</errorLevel>
</ImmutablePropertyAssignment>
</issueHandlers>
<?xml version="1.0"?>
<psalm
errorLevel="2"
runTaintAnalysis="true"
>
<!-- Taint sources -->
<taintAnalysis>
<taintSource name="$_GET"/>
<taintSource name="$_POST"/>
<taintSource name="$_REQUEST"/>
<taintSource name="$_COOKIE"/>
<!-- Custom sources -->
<taintSource name="Request::input"/>
<taintSource name="Request::query"/>
</taintAnalysis>
<!-- Taint sinks -->
<issueHandlers>
<TaintedSql errorLevel="error"/>
<TaintedHtml errorLevel="error"/>
<TaintedShell errorLevel="error"/>
<TaintedFile errorLevel="error"/>
<TaintedHeader errorLevel="error"/>
<TaintedSSRF errorLevel="error"/>
</issueHandlers>
</psalm>
# Generate baseline for all errors
vendor/bin/psalm --set-baseline=psalm-baseline.xml
# Update baseline (remove fixed issues)
vendor/bin/psalm --update-baseline
# Analyze with baseline
vendor/bin/psalm
<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="5.x">
<file src="src/SomeClass.php">
<MixedAssignment>
<code>$variable</code>
</MixedAssignment>
</file>
</files>
| Level | Description | Use Case |
|---|---|---|
| 1 | Strictest | New projects, Domain layer |
| 2 | Very strict | Clean codebases |
| 3 | Strict | Recommended default |
| 4 | Relaxed | Mixed codebases |
| 5-7 | Permissive | Legacy code |
| 8 | Very permissive | Initial analysis only |
<!-- Step 1: Start with baseline -->
<psalm errorLevel="8" errorBaseline="psalm-baseline.xml">
<!-- Step 2: Decrease level, update baseline -->
<psalm errorLevel="7" errorBaseline="psalm-baseline.xml">
<!-- Step 3: Continue until target level -->
<psalm errorLevel="3">
psalm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
- run: composer install
- run: vendor/bin/psalm --output-format=github
psalm:
script:
- vendor/bin/psalm --output-format=checkstyle > psalm-report.xml
artifacts:
paths:
- psalm-report.xml
psalm-taint:
script:
- vendor/bin/psalm --taint-analysis
allow_failure: true
Analyze project:
composer.json for Psalm versionpsalm.xmlDetermine level:
Add plugins:
Configure issue handlers:
Provide:
The generator will: