AgentSkillsCN

daily-skill-log-review

日常维护技能,用于持续提升其他技能的表现。当您需要定期执行(通常每日一次)一项例行任务时使用:读取过去 24 小时的日志,识别重复性任务或常见错误,记录 Codex 对各项技能的使用情况,发现常见的代理失误(包括 PowerShell 语法问题),并针对目标技能目录下的相关 SKILL.md 文件,补充具体且实用的新指令。

SKILL.md
--- frontmatter
name: daily-skill-log-review
description: Daily maintenance skill for continuous improvement of other skills. Use when you need a recurring run (typically once per day) that reads the last 24 hours of logs, detects repetitive tasks/errors, captures how Codex used skills, spots common agent mistakes (including PowerShell syntax issues), and appends concrete new instructions to relevant SKILL.md files under a target skills directory.

Daily Skill Log Review

Use this skill to keep skill instructions fresh by converting repeated friction in logs into explicit SKILL.md guidance.

Daily Workflow

  1. Run in review mode to generate a JSON review artifact.
  2. Run the one-command friendly report for approve/reject guidance.
  3. Review and mark approved items in the review file.
  4. Run apply-review mode to append only approved instructions.
  5. Commit the updated SKILL.md files.

PowerShell example:

powershell
python skills/daily-skill-log-review/scripts/review_logs_and_update_skills.py `
  --logs-root C:/Users/Noah2/.codex/log `
  --logs-root C:/Users/Noah2/.codex/sessions `
  --logs-root ./.agent `
  --skills-root skills `
  --hours 24 `
  --min-occurrences 3 `
  --min-skill-mentions 1 `
  --min-confidence 0.75 `
  --require-path-match-for-skill-usage `
  --emit-review .artifacts/daily-skill-log-review/review-manual.json

Apply approved review:

powershell
python skills/daily-skill-log-review/scripts/review_logs_and_update_skills.py `
  --apply-review .artifacts/daily-skill-log-review/review-manual.json

Friendly report (plain language):

powershell
powershell -ExecutionPolicy Bypass -File scripts/run_daily_skill_log_review.ps1 -FriendlyReport

Log and Skill Routing Rules

  • Parse recent *.log, *.txt, *.md, *.jsonl, and *.ndjson files.
  • Detect recurring patterns when a normalized line appears at least --min-occurrences times.
  • Classify patterns as error or task.
  • Detect skill-usage signals (mentions of skill names/paths in usage context) and emit skill-improvement guidance.
  • Detect repeated common agent errors and add guardrails, including PowerShell compatibility pitfalls (&&/||, parser errors, cmdlet-not-found patterns).
  • Route each pattern to a target skill by:
    • explicit skills/<skill-name>/... references in logs,
    • direct mentions of a skill name,
    • token overlap against discovered skill names/frontmatter.
  • Confidence-score each candidate; only keep entries at or above --min-confidence.
  • Append approved instructions under ## Continuous Improvements in the target SKILL.md.

Recurring Execution

Schedule this command once per day (Task Scheduler, cron, or CI on a daily trigger):

powershell
powershell -ExecutionPolicy Bypass -File scripts/schedule_daily_skill_log_review.ps1 -Time 12:00

Recommended guardrail: keep scheduler runs in --emit-review mode and apply changes only from reviewed artifacts.