Agent skill

skill-usage-logger

All skill MUST use this logger to record usage events in NDJSON format.Log Codex skill usage events to NDJSON with safe concurrent appends.

Stars 0
Forks 0

Install this agent skill to your Project

npx add-skill https://github.com/shaowei-g/codex-skills/tree/main/skills/skill-usage-logger

SKILL.md

Skill Usage Logger

Overview

Provide a single logger script that any skill can call to append an NDJSON event to ~/.codex/skill-usage.ndjson, with concurrency-safe writes.

Quick Start

  1. Add a small logging note at the very top of a skill's SKILL.md so it is executed whenever that skill runs.
  2. Call the logger once after successful completion, or immediately before aborting on error.

Use this snippet (edit <skill_name> and optional <meta_json>):

bash
# Usage logging (call on success or error as appropriate)
~/.codex/skills/skill-usage-logger/scripts/log_skill_usage.sh \
  --skill "<skill_name>" \
  --status "success" \
  --meta '<meta_json>'

If an error prevents completion, call with --status error and include useful --meta (e.g., reason or failing step).

Logger Script

  • Path: ~/.codex/skills/skill-usage-logger/scripts/log_skill_usage.sh
  • Required args:
    • --skill <skill_name>
    • --status <success|error>
  • Optional args:
    • --meta <json_string> (must be valid JSON; included as meta in the event)

Output format (NDJSON)

Each call appends one line with at least:

json
{ "ts": "<ISO8601>", "skill": "<skill_name>", "status": "success|error" }

When --meta is provided and valid JSON, it is included as "meta": <json_value>.

Concurrency Notes

The script uses flock on ~/.codex/skill-usage.ndjson.lock to prevent interleaving when multiple skills log at the same time.

Example

bash
~/.codex/skills/skill-usage-logger/scripts/log_skill_usage.sh \
  --skill "frontend-design" \
  --status "success" \
  --meta '{"project":"landing-page","durationMs":1842}'

Resources

scripts/

  • log_skill_usage.sh: NDJSON logger with required parameters and concurrency-safe appends.

Expand your agent's capabilities with these related and highly-rated skills.

shaowei-g/codex-skills

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.

0 0
Explore
shaowei-g/codex-skills

ekoen-frontend-code-review

Production-grade code review for the eKoEN frontend codebase. Use when asked to review, audit, inspect, or harden eKoEN React/Next.js frontend code, pages, components, hooks, API clients, or state layers for bugs, performance bottlenecks, TypeScript safety issues, request inefficiency, state-management risks, memory leaks, rendering regressions, error-handling gaps, duplication, or maintainability problems, especially when a structured severity-ranked report with code locations, root causes, suggested fixes, and example refactors is required.

0 0
Explore
shaowei-g/codex-skills

ekoen-backend.doc.route-error

Add HttpErrorRes responses to eKoEN backend routes when controllers can throw errors from app/util/errors/index.ts

0 0
Explore
shaowei-g/codex-skills

conventional-commit-helper

Generate and validate Conventional Commit messages for semantic-release workflows. Use when a user asks to write a commit message, asks to commit changes, asks for commit type/scope selection, or asks to enforce Conventional Commits consistency.

0 0
Explore
shaowei-g/codex-skills

codex-cli-subagent-transport

Use only when native subagent execution is unavailable and the caller needs one deterministic Codex CLI run with repo-local artifacts and a manifest-based result contract.

0 0
Explore
shaowei-g/codex-skills

nodejs-package-json

Patch a Node.js project's package.json for standard build automation. Use when asked to add/standardize package.json scripts like prebuild/postbuild for TypeScript builds (rimraf dist + tsc-alias), adjust prebuild for Next.js (rimraf dist .next), or ensure an existing package.json pkg config includes required scripts/assets/targets/outputPath.

0 0
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results