360 Secure SkillHub
360 安全技能中心

cx

核心功能是通过`cx overview`/`symbols`/`definition`/`references`等命令实现语义化代码导航,先了解代码结构再按需查看完整文件。典型场景包括读文件前理清结构、查找符号定义、重构前追踪引用、探索大型代码库。输入为带参数的cx命令,输出语义化的代码结构、符号信息等。仅支持指定源码语言与Markdown,需在git仓库或指定根目录,且安装对应语言语法。

wei840222
wei840222
热度 48.63
最近更新 2026-08-15 22:12:42
分类:开发依赖:代码执行应用场景:调试排错 / 代码审查

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add cx-cli
Metadata
name
cx
description
Semantic code navigation with `cx` CLI. Use when you need to understand code structure before reading files, find symbol definitions, trace references before refactoring, or explore large codebases efficiently. Triggers: 'cx overview', 'cx symbols', 'cx definition', 'cx references', 'code structure', 'find function', 'where is X defined', 'who calls X', 'semantic navigation'.

cx

Use cx for semantic code navigation before reading whole files. Start narrow and only expand context when the task requires it.

Core Workflow

Follow this escalation order:

  1. cx overview <path> to understand a file or directory.
  2. cx symbols to discover named symbols.
  3. cx definition or cx references to inspect a symbol or its semantic usages.
  4. Read a full file only when semantic navigation cannot answer the question.

Use cx before exploring code, editing a named symbol, refactoring, or resuming work after context compression. For ambiguous names, find candidates with cx symbols --name "*partial*", then narrow definition with --from.

Before Running cx

  • Use supported source languages or Markdown; do not use cx for YAML, JSON, TOML, binary files, anonymous functions, dynamic dispatch, or non-symbol regions.
  • Work inside a git repository, or provide --root <path>.
  • Ensure the required language grammar is installed. Run cx overview . for a first-use probe; its missing-grammar output includes the install command.

cx is read-only. Use normal read and edit tools for changes or for full-file context.

Optional References

Run cx skill references to list expanded guidance, then run cx skill references <name> to print one reference on demand.