dev:log
Ajoute des fonctionnalités de log au fichier en cours
Best use case
dev:log is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Ajoute des fonctionnalités de log au fichier en cours
Teams using dev:log should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/log/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How dev:log Compares
| Feature / Agent | dev:log | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Ajoute des fonctionnalités de log au fichier en cours
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Ajout de logging avec LoggableInterface
## Instructions à Exécuter
**IMPORTANT : Exécute ce workflow étape par étape :**
Fichier cible : $ARGUMENTS
## Workflow
### 1. Lire et analyser le fichier
- Lire le contenu du fichier PHP
- Identifier la classe principale et ses propriétés
- Vérifier si `LoggableInterface` est déjà implémentée
### 2. Chercher les dépendances LoggableInterface
Pour chaque type-hint de propriété ou paramètre :
- Utiliser Grep pour chercher si la classe implémente `LoggableInterface`
- Noter les classes qui l'implémentent pour appeler `->toLog()` dessus
### 3. Ajouter LoggableInterface
Si la classe n'implémente pas encore `LoggableInterface` :
**Ajouter l'import :**
```php
use Atournayre\Contracts\Log\LoggableInterface;
```
**Ajouter l'interface à la déclaration de classe :**
```php
final class NomClasse implements LoggableInterface
```
**Ajouter la méthode toLog() :**
```php
/**
* @return array<string, mixed>
*/
public function toLog(): array
{
return [
// Propriétés clés de l'objet
];
}
```
### 4. Règles pour le contenu de toLog()
**Propriétés à inclure :**
- `id` (si présent)
- Identifiants métier (email, code, référence...)
- États/statuts importants
- Dates clés (createdAt, updatedAt...)
**Propriétés à exclure :**
- Mots de passe, tokens, secrets
- Données personnelles sensibles
- Propriétés volumineuses (blobs, textes longs)
**Pour les objets imbriqués :**
- Si l'objet implémente `LoggableInterface` : `'relation' => $this->relation->toLog()`
- Sinon : `'relationId' => $this->relation->getId()` ou ignorer
**Pour les collections :**
```php
/**
* @return array{count: int, items: array<int, array<string, mixed>>}
*/
public function toLog(): array
{
return [
'count' => $this->count(),
'items' => array_map(fn ($item) => $item->toLog(), $this->items),
];
}
```
### 5. Vérification PHPStan
- Toujours ajouter `@return array<string, mixed>` sur la méthode
- Pour les collections : utiliser le type array shape approprié
## Exemple de résultat
```php
use Atournayre\Contracts\Log\LoggableInterface;
final class Commande implements LoggableInterface
{
private Uuid $id;
private string $reference;
private Client $client;
private \DateTimeImmutable $createdAt;
private string $password; // Sensible, à exclure
/**
* @return array<string, mixed>
*/
public function toLog(): array
{
return [
'id' => $this->id->toRfc4122(),
'reference' => $this->reference,
'client' => $this->client->toLog(),
'createdAt' => $this->createdAt->format('c'),
// password exclu intentionnellement
];
}
}
```Related Skills
fix-grammar
Fix grammar and spelling errors in one or multiple files while preserving formatting
symfony-framework
Comprehensive Symfony 6.4 development skill for web applications, APIs, and microservices.
symfony:make
Cherche si il existe un maker Symfony pour faire la tache demandée et l'utilise si il existe. Si aucun maker n'existe alors utilise la slash command "/prepare"
phpstan-resolver
Résout automatiquement les erreurs PHPStan en analysant et corrigeant les problèmes de types. Boucle jusqu'à zéro erreur ou stagnation.
elegant-objects
Vérifie la conformité du code PHP aux principes Elegant Objects de Yegor Bugayenko. Analyse un fichier spécifique ou tous les fichiers modifiés dans la branche.
prompt:validate
Vérifie la checklist avant exécution et liste les oublis
prompt:transform
Transforme un prompt en prompt exécutable compatible avec le Task Management System (TaskCreate/TaskUpdate/TaskList)
prompt:team
Orchestre une équipe d'agents spécialisés pour les tâches complexes. Auto-détecte le type, compose l'équipe, coordonne les phases analyse → challenge → implémentation → QA.
prompt:start
Démarre un développement avec un starter léger puis active le mode plan
apex
Systematic implementation using APEX methodology (Analyze-Plan-Execute-eXamine) with parallel agents, self-validation, and optional adversarial review. Use when implementing features, fixing bugs, or making code changes that benefit from structured workflow.
fix-errors
Fix all ESLint and TypeScript errors with parallel processing using snipper agents
prompt-creator
Expert prompt engineering for creating effective prompts for Claude, GPT, and other LLMs. Use when writing system prompts, user prompts, few-shot examples, or optimizing existing prompts for better performance.