.claude/skills/use-ioutput-in-cli-commands/SKILL.md
This skill should be used when writing or migrating CLI commands in apps/cli/ that currently use consoleLogger.ts functions (logConsole, logErrorConsole, logSuccessConsole, etc.) and need to be updated to use the IOutput abstraction via packmindCliHexa.output instead.
npx skillsauth add PackmindHub/packmind use-ioutput-in-cli-commandsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
CLI commands in apps/cli/ must use the IOutput interface (apps/cli/src/domain/repositories/IOutput.ts) for all user-facing output instead of the legacy consoleLogger.ts utilities. IOutput is accessed via packmindCliHexa.output and provides structured methods for notifications, loaders, and artefact listings that are testable and consistent.
Load references/migration-guide.md for the full function mapping table, interface definition, and before/after code examples.
Apply this skill whenever:
../utils/consoleLogger or ../../utils/consoleLoggerTo identify what needs replacing, search for consoleLogger imports in the command file:
grep -n "consoleLogger" <file>
Use the mapping table in references/migration-guide.md. The most common substitutions:
logConsole(msg) / logInfoConsole(msg) → output.notifyInfo(msg)logErrorConsole(msg) → output.notifyError(msg)logSuccessConsole(msg) → output.notifySuccess(msg)logWarningConsole(msg) → output.notifyWarning(msg)await → output.withLoader(label, asyncFn)output.listArtefacts(title, items)output.listScopedArtefacts(title, groups)When the old code logs a primary message followed by a secondary hint or example command, consolidate into a single IOutput call using the optional HelpMessage argument:
// BEFORE
logErrorConsole('Command removed.');
logConsole(`Use ${formatCommand('packmind-cli playbook add <path>')} instead.`);
// AFTER
output.notifyError('Command removed.', {
content: 'Use the "playbook add" command instead:',
exampleCommand: 'packmind-cli playbook add .packmind/commands/my-command.md',
});
Replace manual "Fetching…" log calls before await with withLoader:
// BEFORE
logConsole('Fetching commands...\n');
const commands = await packmindCliHexa.listCommands({});
// AFTER
const commands = await packmindCliHexa.output.withLoader(
'Fetching commands',
() => packmindCliHexa.listCommands({}),
);
After replacing all usages, remove the import line:
// DELETE this line
import { logConsole, logErrorConsole, ... } from '../utils/consoleLogger';
Also remove any formatCommand, formatHeader, formatSlug, etc. imports that are no longer needed after the migration.
Replace direct console spy assertions with mock output assertions. Use createMockOutput() from apps/cli/src/mocks/createMockRepositories.ts and inject it via packmindCliHexa.output. See references/migration-guide.md for a full test example.
When calling listArtefacts or listScopedArtefacts, map domain objects to the Artefact type:
{
title: string; // display name shown to user
slug: string; // identifier shown below title
description?: string;
url?: string | null; // link shown if present
}
references/migration-guide.md — full function mapping, interface definition, before/after examples, and testing patternstools
Record polished UI demo videos and screenshots of a running web app using Playwright MCP — for client deliverables, release notes, feature walkthroughs, or bug repros. Produces an HD WebM video with chapter markers, a mandatory animated cursor overlay, and a mandatory subtitle bar that narrates each step (positioned deliberately so it never masks the UI being demonstrated), plus full-page screenshots at each step. Use this whenever the user asks to "record a demo", "create a screencast", "make a UI walkthrough video", "document this feature with video", "show the client how X works", "capture screenshots of the app", or anything similar — even when the user only says "make a video" or "take screenshots" in the context of a running frontend. Also use it when the user wants to demonstrate a workflow, generate marketing-quality footage of an app, or produce repeatable visual documentation.
tools
The canonical recipe for starting, checking, and stopping the Packmind local dev stack with Docker Compose — the single source of truth other skills and the Michel agent defer to. Covers bringing the full stack (PostgreSQL, Redis, NestJS API, React/Vite frontend on :4200, MCP server, nginx) up in the background, the init services (dependency install + TypeORM migrations) you must wait on, the critical host-port trap that the API on container port 3000 is NOT exposed to the host and must be reached via the frontend Vite proxy at localhost:4200/api/v0, confirming the API and frontend are actually serving before you depend on them, the persistent-volume gotcha that leaves stale Postgres schema and node_modules behind between runs, building the CLI, and tearing everything down so no container is left blocking the run. Use this whenever you need Packmind running locally — to verify a change, record a UI or CLI demo, hit the API, seed data, or reproduce a bug — and whenever you are about to start or stop `docker compose`. If you are an autonomous agent (e.g. Michel) that started the stack, you MUST use the teardown half before finishing. Prefer this over running `nx serve` on the host for anything that needs the real, containerized stack.
tools
Best practices for creating GitHub pull requests that include inline images — CLI terminal screenshots (from cli-demo-recorder), UI screenshots/videos (from ui-demo-recorder), or any other visual artifact. Use this skill whenever opening or updating a PR that has visual artifacts to embed, or when images aren't rendering in a PR description. Also use it when asked "how do I add screenshots to a PR", "why isn't my image showing", or "embed a demo in the PR".
tools
--- name: michel-create-packmind-dataset description: Seed a local Packmind instance with a realistic dataset — one organization populated with standards, commands, and skills — so an autonomous agent can exercise its own changes against lifelike data instead of an empty app. Use this whenever you need populated Packmind data to verify a change end-to-end: reproducing a bug that only shows with existing artifacts, recording a UI/CLI demo that needs content on screen, smoke-testing a new endpoint