AgentSkillsCN

context

在编辑代码前,获取代码复杂度与技术债务指标

SKILL.md
--- frontmatter
name: context
description: Get complexity and debt metrics before editing code
usage: /context <file-or-symbol>
arguments:
  - name: focus
    description: File path or symbol name
    required: true

Context Skill

Get metrics before modifying: {{.focus}}

Quick Start

bash
omen -f json context --symbol "{{.focus}}"

What You Get

  • Complexity: Cyclomatic and cognitive scores per function
  • Debt: TODO/FIXME/HACK markers with severity
  • Risk: Combined assessment for the target

Thresholds

MetricSafeWarningDanger
Cyclomatic<1010-20>20
Cognitive<1515-30>30

Next Actions

  1. High complexity: Consider refactoring before changes
  2. Critical debt: Address security/bug markers first
  3. Clean: Proceed with your modification