Agentic.Skill.Analyzer (agentic v0.2.2)

Copy Markdown

Analyzes skill content to determine model tier requirements.

Uses static analysis of the skill body and metadata to determine what model capabilities are needed. This runs at install time and when agents create new skills, injecting model_tier into the frontmatter if not already set.

Model Tiers

  • :primary — Needs a capable model: tool use, complex reasoning, multi-step workflows
  • :lightweight — Can run on a fast/cheap model: simple lookups, mechanical processes
  • :any — No strong preference, works with either

Analysis Signals

Signals that push toward :primary:

  • Tool calls referenced in the body (e.g., tool names, use_tool, function calls)
  • Multi-step workflows (numbered steps, decision trees)
  • Complex reasoning language (analyze, evaluate, decompose, synthesize)
  • Delegation/coordination patterns (send_message, marketplace, sub-agent)
  • SOP type with many steps

Signals that push toward :lightweight:

  • Pure reference/documentation content
  • Simple lookup or formatting tasks
  • No tool usage mentioned
  • Short body with no conditional logic

Summary

Functions

Analyze a parsed skill and return the recommended model tier.

Analyze a skill and return the tier along with the reasoning signals found.

Inject model_tier into a SKILL.md raw content string if not already present.

Functions

analyze(map)

Analyze a parsed skill and return the recommended model tier.

If the skill already has a non-default model_tier set in frontmatter, returns that value unchanged. Otherwise, runs static analysis.

analyze_with_reasons(map)

Analyze a skill and return the tier along with the reasoning signals found.

Useful for debugging and for the skill-creator to understand why a tier was chosen.

inject_model_tier(raw_content)

@spec inject_model_tier(String.t()) :: {:ok, String.t()} | {:error, String.t()}

Inject model_tier into a SKILL.md raw content string if not already present.

Parses the content, analyzes it, and rewrites the frontmatter with the model_tier field added. Returns the modified raw content.