Skip to content
Back to skills

Lens Php

ASecurity

Stack lens para PHP. Use durante Discovery quando composer.json for detectado. Cobre Laravel, Symfony, Slim, Hyperf, Laminas, raw PHP. Identifica PSR compliance, ORM, padrões de fila.

  • 4 stars
  • 0 votes
  • 0 copies
  • 5 views
  • Added September 12, 2026
databasesgophpsqltestingapidatabase

Works with

  • api

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned September 12, 2026

npx -y skills add aibot88/sec_skill_store --skill lens-php --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Lens Php?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Lens Php
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/aibot88-lens-php/badge)](https://www.skillsdirectory.com/skills/aibot88-lens-php)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: first-plan-lens-php
description: Stack lens para PHP. Use durante Discovery quando composer.json for detectado. Cobre Laravel, Symfony, Slim, Hyperf, Laminas, raw PHP. Identifica PSR compliance, ORM, padrões de fila.
version: 0.1.0
---

# Lens PHP

## Detecção fina

| Sinal | Variante |
|-------|----------|
| `artisan` na raiz | Laravel |
| `bin/console` + `symfony/framework-bundle` em deps | Symfony |
| `slim/slim` em deps | Slim |
| `hyperf/hyperf` em deps | Hyperf |
| `laminas/laminas-mvc` em deps | Laminas (Zend) |
| `index.php` em `public/` sem framework | Legacy / vanilla |
| `wp-config.php` | WordPress |

## Extração de padrões

### Composer

- PSR-4 autoload mappings (qual namespace -> qual pasta)
- Versão min de PHP (`require.php`)
- Dev dependencies relevantes (phpunit, phpstan, psalm, php-cs-fixer, rector)

### Estrutura

Laravel:
- `app/Http/Controllers`, `app/Models`, `app/Services`, `app/Repositories`
- `routes/{web,api,console,channels}.php`
- `database/migrations`, `database/seeders`, `database/factories`
- `config/`, `resources/`, `bootstrap/`

Symfony:
- `src/Controller`, `src/Entity`, `src/Repository`, `src/Service`
- `config/services.yaml`, `config/routes.yaml`
- `migrations/`

### Dependency Injection

- Laravel: container service, providers em `app/Providers/`, binding em `register()`
- Symfony: services.yaml, autowire, autoconfigure
- Manual em vanilla

### Errors

- Exceptions customizadas (extends Exception ou DomainException)
- Handler global (Laravel: `app/Exceptions/Handler.php`; Symfony: ExceptionListener)
- HTTP error mapping

### Validação

- Laravel: Form Requests em `app/Http/Requests/`, rules
- Symfony: Validator constraints / annotations
- Manual via if's

### ORM

- Eloquent (Laravel)
- Doctrine (Symfony)
- Query Builder direto
- PDO raw

### Testing

- PHPUnit (mais comum)
- Pest (alternativa moderna)
- Pasta `tests/` com `Unit`, `Feature`, `Integration`
- Factories Laravel / fixtures Doctrine
- Mocks com Mockery

### Filas / Mensageria

- Laravel: Horizon, jobs em `app/Jobs/`
- Symfony: Messenger
- Hyperf: AMQP, Kafka

### Static analysis

- PHPStan level configurado (8 = strict)
- Psalm
- PHP-CS-Fixer rules
- Rector rules

### PSR compliance

- PSR-12 (style) - verificar via php-cs-fixer config
- PSR-7 (HTTP messages) - check em libs como `slim/psr7`, `nyholm/psr7`
- PSR-15 (HTTP middleware)
- PSR-3 (logger interface)

### Logging

- Laravel: `Log` facade (Monolog underneath)
- Symfony: Monolog
- Configuração de canais

## Output em `.first-plan/`

Igual estrutura padrão. Atenção especial:
- `02-conventions/di.md` - container vs autowire vs manual
- `01-topology/boundaries.md` - rotas, jobs, comandos artisan/console

## Confidence rules

Aumentar:
- Configuração estática (phpstan.neon, .php-cs-fixer.dist.php) presente e respeitada
- PSR autoload bem formado em composer.json

Reduzir:
- Mistura de namespaces antigos (`include` direto) e PSR-4
- Migrations órfãs vs models que existem mas não têm migration

## Anti-padrões comuns

- `include`/`require` em vez de autoload
- `$_GET`, `$_POST` direto em handler
- SQL concatenado (em vez de prepared statement / ORM)
- Lógica em controller (Laravel - sinal de service ausente)
- God models (Eloquent model com 50+ métodos)

Files in this skill

  • SKILL.md3.2 KB
  • source.json682 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.