Skip to main content

Module skill_audit

Module skill_audit 

Source
Expand description

Deterministic skill curation audit.

skill_review distills a reusable skill from a single completed session, and the reflector retires skills purely by inactivity age. Neither gives a cross-skill view of the on-disk corpus. This module fills that gap with a read-only, deterministic audit — no LLM, no DB, no mutation — that surfaces the signals a curator (human or, later, an LLM pass) needs:

  • near-duplicate skills (token-Jaccard over name + description) — merge candidates, and a strong retire signal when an agent-created skill shadows a built-in one;
  • stale agent-created skills (no recent updated_at) — retire candidates;
  • thin agent-created skills (near-empty body) — flesh-out or retire;
  • cap headroom against the agent-created ceiling.

Built-in / human-curated skills (source other than agent-created) are immutable, so they are never flagged as stale/thin retire candidates; they still participate in duplicate detection so an agent skill that merely restates a built-in is caught.

Structs§

AuditConfig
Tunable thresholds for the audit.
AuditReport
CapStatus
DuplicatePair
StaleSkill
ThinSkill

Constants§

DEFAULT_MAX_AGENT_SKILLS
The agent-created ceiling enforced by skill_review. Mirrored here so the audit can report headroom against the same number.

Functions§

audit_skills
Audit the skills directory and return a structured report.
run_audit
CLI entry point. Prints the report (text or --json) and returns the process exit code: always 0 unless strict is set and there are findings.