implementer:log

Add LoggableInterface and toLog() method to PHP class files.

Updated Feb 24, 2026
One-click install
npx skills add https://github.com/atournayre/claude-personas --skill implementer-log
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: implementer:log
Source: https://github.com/atournayre/claude-personas/tree/main/implementer/skills/log
Command: npx skills add https://github.com/atournayre/claude-personas --skill implementer-log

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates the process of adding the LoggableInterface and its associated toLog() method to PHP classes, ensuring consistent and structured logging of object data.

Core Features & Use Cases

  • Interface Implementation: Automatically adds LoggableInterface to a specified PHP class.
  • Method Generation: Creates the toLog() method with predefined rules for including and excluding properties.
  • Dependency Analysis: Identifies related objects that also implement LoggableInterface for recursive logging.
  • Use Case: When developing a new feature, you need to log key information about Order objects. This Skill can be used to quickly add the necessary logging capabilities to your Order class, ensuring sensitive data is excluded and related Client objects are logged correctly.

Quick Start

Use the implementer:log skill to add logging to the file '/path/to/your/class.php'.

Frequently Asked Questions about implementer:log

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add structured logging to PHP classes automatically?

You can add structured logging to PHP classes by using this Skill to append a LoggableInterface and generate a toLog() method. It analyzes class properties to determine relevant data for logging, excluding sensitive information and handling nested objects or collections according to defined rules.

How does the toLog() method handle nested objects in PHP?

The toLog() method handles nested objects by performing dependency analysis to identify related objects that also implement LoggableInterface. This enables recursive logging of nested objects or collections according to defined rules.

Can I automatically exclude sensitive data when implementing logging in PHP?

Yes, you can exclude sensitive data when implementing logging in PHP. The Skill analyzes class properties to determine relevant data for logging and excludes sensitive information according to defined rules during the toLog() method generation.

Does the generated logging code support PHPStan type hinting?

Yes, the generated logging code ensures adherence to PHPStan type hinting. The Skill generates the toLog() method while strictly following PHPStan type hinting and best practices for structured object logging.

What is the best way to implement a LoggableInterface across multiple PHP classes?

The best way to implement a LoggableInterface across multiple PHP classes is to automate the process using a code generation Skill. This ensures consistent and structured logging of object data by automatically adding the interface and generating the toLog() method.