Skill log

From SimHacker/moollm · View interactive version

Skill log is an AI agent skill from the GitHub repository SimHacker/moollm. Any skill can log structured events into its own directory under `.moollm/skills/<skill-name>/logs/`. Filenames are **time-big-endian** so directory sort is chronological. One file per entry; body is

How to use this skill

Skill file

skill-log: Protocol for skill logging

Any skill can log structured events into its own directory under .moollm/skills/<skill-name>/logs/. Filenames are time-big-endian so directory sort is chronological. One file per entry; body is YAML.


Contract


Body schema (minimal)

timestamp: "2026-02-17T14:30:00"   # ISO or YYYYMMDD-HHMMSS
description: "run started"          # human-readable
# optional: any key-value; nested OK
payload: {}
# or top-level keys: event, result, duration, ...

Usage

Python (script or from another skill)

From repo root or any dir under MOOLLM:

# Option A: run the script
# python skills/skill-log/scripts/skill_log.py <skill_name> <description_slug> [key=value ...]

# Option B: import and call (if skill_log is on path)
from skill_log import log_entry
log_entry("cursor-mirror", "export-done", {"format": "json", "count": 42})

CLI

# One entry; payload as key=value pairs (optional)
python skills/skill-log/scripts/skill_log.py cursor-mirror export-done format=json count=42

# Or set MOOLLM_ROOT and run from anywhere
MOOLLM_ROOT=/path/to/moollm python skills/skill-log/scripts/skill_log.py skill-snitch scan-done skill=cursor-mirror

From another skill

All use the same convention so snitch/test/mirror can read each other’s logs or aggregate under .moollm/logs/ later if desired.


TAIL (read recent entries)

The script can support tail subcommand: list or cat recent files from a skill’s log dir (sort by filename = time order). Implement in same script or a separate one; protocol is “same dir, same filename format.”


Relation to session-log


Future

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.