agentleFS
RandomNestRandomNest/aivideo-production-skills/skills/run-logger/SKILL.md

run-logger

Skill15 starsChanged 9 months agoMITView on GitHub

Use when recording every skill invocation, model routing decision, cost impact, QC result, and regeneration attempt. Trigger on every agent execution in the pipeline.

The file

We split this skill into the rules it gives an agent

11 rules. About 0 are common, 11 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈11

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    After every skill execution.

    line 40
  2. Distinctive:

    After every model routing decision.

    line 41
  3. Distinctive:

    After every generation attempt.

    line 42
  4. Distinctive:

    After every QC pass/fail.

    line 43
  5. Distinctive:

    After every budget-gate check.

    line 44
  6. Distinctive:

    No skill execution without log entry.

    line 106
  7. Distinctive:

    No model routing without log entry.

    line 107
  8. Distinctive:

    No QC result without log entry.

    line 108
  9. Distinctive:

    No budget decision without log entry.

    line 109
  10. Distinctive:

    No overwrite of prior logs.

    line 110
  11. Distinctive:

    Not tracking regen count.

    line 181

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Role

You are the system historian.

Your responsibility is to create an auditable, structured log of:

  • Skill invocations
  • Model routing decisions
  • Cost estimates
  • QC outcomes
  • Regen attempts
  • Budget status changes

You ensure:

  • Reproducibility
  • Accountability
  • Performance analysis
  • Cost transparency
  • Postmortem capability

You do not interpret. You record.


When To Use

Use this skill:

  • After every skill execution.
  • After every model routing decision.
  • After every generation attempt.
  • After every QC pass/fail.
  • After every budget-gate check.

This skill should run automatically.


Context Requirements

Before proceeding:

  1. Identify skill executed.
  2. Identify model tier used.
  3. Identify cost impact.
  4. Identify result (PASS / FAIL / FIX).
  5. Identify artifact version created.
  6. Identify timestamp.

Required Inputs

  • run_id
  • scene_id (if applicable)
  • shot_id (if applicable)
  • skill_name
  • model_used
  • tier
  • duration_s (if generation)
  • cost_estimate
  • outcome (PASS / FAIL / FIX)
  • artifact_created
  • regen_count (if applicable)
  • timestamp

Required Artifacts

RUN_LOG_v###.csv

Each row must include:

  • run_id
  • parent_run_id (if applicable)
  • timestamp
  • skill_name
  • scene_id
  • shot_id
  • model_used
  • tier
  • estimated_cost
  • actual_cost (if available)
  • duration_s
  • outcome
  • regen_count
  • artifact_output
  • notes

Logging Rules

  • No skill execution without log entry.
  • No model routing without log entry.
  • No QC result without log entry.
  • No budget decision without log entry.
  • No overwrite of prior logs.
  • Logs are append-only.

Observability Metrics (Derived)

From logs, system can compute:

  • Average regen per shot
  • Drift frequency by category
  • Cost per scene
  • Tier usage distribution
  • Failure rate per model
  • Most common QC violations
  • High-risk shot types

Evaluation Checklist

  • All fields populated.
  • No missing timestamps.
  • Tier recorded.
  • Cost documented.
  • Artifact version recorded.
  • Regen count tracked.
  • Outcome recorded consistently.

Gate Behavior

FAIL if:

  • Missing log entry for skill execution.
  • Cost not recorded.
  • Model tier undocumented.
  • Artifact version not recorded.
  • Regen attempts untracked.

PASS when:

  • Complete record created.
  • Data structured.
  • Append-only integrity maintained.
  • Downstream analytics possible.

Escalation Policy

Escalate to human review if:

  • Repeated missing logs.
  • Cost discrepancies detected.
  • Model misuse patterns detected.
  • QC failure rate spikes.

Escalate to cost-optimizer if:

  • Drift correlated with specific tier.

Escalate to model-router if:

  • Certain models underperform.

Common Failure Modes

  • Skipping log for small tasks.
  • Logging inconsistently across tiers.
  • Not tracking regen count.
  • Overwriting previous entries.
  • Ignoring cost field.
  • Missing parent-child relationships in runs.

Related Skills

  • model-router
  • cost-optimizer
  • budget-gates
  • regen-analyzer
  • qc-grader

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.