Token导航 LogoToken导航

Agent Skill · 研究检索

code-analyzer(代码分析器)

code-analyzer 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

code-analyzer 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 37,977。

总安装 1,639周安装 69GitHub Stars 6下载 574核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:code-analyzer(代码分析器)
来源仓库:https://github.com/synapsync/synapse_registry
仓库路径:skills/code-analyzer
安装命令:
npx skills add https://github.com/synapsync/synapse_registry --skill code-analyzer
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/synapsync/synapse_registry --skill code-analyzer

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

code-analyzer 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词快速定位候选结果时使用。适用于代码质量检测、性能瓶颈识别或架构合规性检查等研究检索类任务场景。通过关键词、任务描述或来源线索触发检索,返回结构化候选信息供进一步核验。

安装命令为 npx skills add https://github.com/synapsync/synapse_registry --skill code-analyzer。使用前建议确认权限范围、维护状态,以及是否会触发联网或文件读写操作。

来源仓库内路径:skills/code-analyzer

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/synapsync/synapse_registry --skill code-analyz…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

code-analyzer 怎么安装?

在终端执行 npx skills add https://github.com/synapsync/synapse_registry --skill code-analyzer。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

code-analyzer 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

code-analyzer 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

code-analyzer 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

code-analyzer 用的人多吗?

公开数据是累计安装 1,639 次,近一周安装 69 次,下载 574 次,GitHub 6 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

code-analyzer 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
code-analyzer

代码分析器 · 本页

1,6396需要联网未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Purpose

Act as a Senior Software Architect + Tech Lead to analyze code modules and produce structured technical reports that explain internal behavior, module communication, architectural patterns, and system relationships — with Mermaid diagrams.

CRITICAL RULES 1. Never assume context that doesn't exist. Only report what the code explicitly shows. 2. Never invent dependencies. If a dependency isn't visible in imports, configs, or code, don't add it. 3. If information is missing, say so explicitly. Document unknowns as unknowns, not guesses. 4. Never copy full source code into the report. Explain how the code works — don't reproduce it.

When to Use This Skill

  • Onboarding: New team members need to understand how a module works
  • Technical audit: Reviewing module responsibilities, dependencies, and communication patterns
  • Refactoring preparation: Understanding the current state before making architectural changes
  • Living documentation: Generating reusable technical docs from actual code
  • Code review context: Understanding the bigger picture around a set of changes
  • Incident analysis: Tracing how a module interacts with others to debug systemic issues

Capabilities

Code Analysis

  • Internal module behavior and execution flow
  • Function/class responsibility mapping
  • State management and error handling patterns
  • Dependency identification (internal and external)

Architecture Assessment

  • Architectural pattern detection (MVC, Clean Architecture, Hexagonal, etc.)
  • Module boundary and responsibility analysis
  • Coupling and cohesion evaluation
  • Design principle adherence (SOLID, DRY, etc.)

Communication Mapping

  • Inter-module communication (sync/async)
  • API surface analysis (what a module exposes and consumes)
  • Event-driven patterns (pub/sub, event emitters, message queues)
  • Shared state and data flow analysis

Technical Documentation

  • Structured markdown reports
  • Mermaid diagrams (flowcharts, sequence, class, C4)
  • Executive summaries for non-technical stakeholders
  • Detailed technical breakdowns for engineers

Input Expected

The user provides:

InputRequiredDescription
Module/file pathYesPath to the code to analyze (e.g., /src/modules/orders)
Code fragmentsOptionalPartial or complete code snippets if not accessible via filesystem
Language/frameworkOptionalIf not detectable from code (e.g., "NestJS", "Next.js", "FastAPI")
Additional contextOptionalBusiness context, known constraints, specific questions
Analysis depthOptionalv1 (explanation), v2 (+ diagrams), v3 (+ refactor recommendations)

Example prompts:

  • "Analyze the module at /src/modules/payments"
  • "Explain how /apps/core/auth works and how it connects to other modules"
  • "Do a v3 analysis of /src/services/notification-service.ts"

Configuration Resolution

{output_dir} is the directory where code-analyzer stores generated reports. Resolve it once at the start:

  1. User message context — If the user's message contains file paths, extract {output_dir} from those paths
  2. Auto-discover — Scan for .agents/code-analyzer/ in {cwd}
  3. Ask the user — If nothing found, ask where to save reports. Default suggestion: .agents/code-analyzer/{scope}/ (where {scope} is the topic, e.g., auth-module, api-layer)

No AGENTS.md. No branded blocks. The output directory is resolved at runtime.

Obsidian Output Standard

All documents generated by this skill MUST follow these Obsidian output rules:

  1. Frontmatter: Every .md file includes the universal frontmatter schema (title, date, updated, project, type, status, version, tags, changelog, related)
  2. Types: Use technical-report for REPORT.md, refactor-plan for REFACTOR.md
  3. Wiki-links: When both REPORT.md and REFACTOR.md exist, cross-reference with [[REPORT]] / [[REFACTOR]]
  4. Referencias: Every document ends with ## Referencias listing related analysis documents
  5. Metrics: Use | Metric | Before | After | Delta | Status | format for code quality metrics, complexity scores, and coverage data
  6. IDs: Use D- for debt items in refactor plans
  7. Bidirectional: If REFACTOR.md references REPORT.md, REPORT.md must reference REFACTOR.md

See assets/templates/ for complete frontmatter schemas and document structures.

Workflow

Step 1: Discovery

Read and explore the target module/file to understand its structure.

Actions:

  1. Read the target path — identify all files, directories, and entry points
  2. Detect the language and framework from file extensions, imports, and config files
  3. Identify the module boundary (what's inside vs. outside the module)
  4. List all files that belong to the module

Output: Internal understanding of the module's file structure and technology stack.

Step 2: Deep Analysis

Analyze the code to understand internal behavior.

Actions:

  1. Identify the module's main responsibilities — what does it do?
  2. Map key functions/classes and their roles
  3. Trace the primary execution flow — entry point to output
  4. Analyze state management — how data flows and transforms
  5. Analyze error handling — how failures are managed
  6. List internal dependencies (other modules in the same project)
  7. List external dependencies (third-party libraries, APIs, services)

Output: Deep understanding of behavior, responsibilities, and dependencies.

Step 3: Communication Mapping

Understand how the module talks to the rest of the system.

Actions:

  1. Identify what the module consumes (imports, API calls, events listened to)
  2. Identify what the module exposes (exports, API endpoints, events emitted)
  3. Classify communication types: synchronous (function calls, HTTP) vs. asynchronous (events, queues, WebSockets)
  4. Identify shared state (global stores, shared databases, caches)

Output: Clear map of module boundaries and communication channels.

Step 4: Report Generation

Produce the structured technical report with all findings.

Actions:

  1. Write the report following the Output Structure (see below)
  2. Generate Mermaid diagrams for visual understanding
  3. Save the report to {output_dir}/technical/module-analysis/{module-name}/
  4. Add ## Referencias section at the end of the report (link to REFACTOR.md if v3, link to any other analysis documents for the same module)

Output: Complete markdown report with diagrams.

Step 5: Refactor Recommendations (v3 only)

If the user requests a v3 analysis, add improvement suggestions.

Actions:

  1. Identify code smells and architectural issues
  2. Suggest specific, actionable improvements
  3. Rate each recommendation by impact and effort
  4. Prioritize recommendations
  5. Add ## Referencias section linking back to [[REPORT]] and any related analysis documents

Output: Actionable refactoring roadmap appended to the report.

Output Location

All reports are saved to a central technical documentation directory:

{output_dir}/technical/module-analysis/
└── {module-name}/
    ├── REPORT.md              # Main technical report
    └── REFACTOR.md            # Refactoring recommendations (v3 only)

Naming convention: Use the module's folder name in kebab-case.

  • /src/modules/OrderService → {output_dir}/technical/module-analysis/order-service/
  • /apps/core/payments → {output_dir}/technical/module-analysis/payments/
  • /src/services/notification-service.ts → {output_dir}/technical/module-analysis/notification-service/

Output Structure

See assets/templates/ for complete document structures:

  • REPORT.md — Technical analysis report template with Executive Summary, Technical Analysis, Module Communication, Technical Diagrams, Metrics, and Referencias sections
  • REFACTOR.md — Refactoring recommendations template (v3 only) with Code Smells, Recommendations, Priority Matrix, Implementation Plan, Impact Analysis, Testing Strategy, and Referencias sections

Key Sections Overview

REPORT.md includes:

  1. Executive Summary (module overview, purpose, criticality, technology)
  2. Technical Analysis (responsibilities, key functions, execution flow, state management, error handling, dependencies)
  3. Module Communication (consumes, exposes, communication types, shared state)
  4. Technical Diagrams (Mermaid diagrams based on complexity)
  5. Metrics (code quality metrics using standard format)
  6. Referencias (bidirectional links to related documents)

REFACTOR.md (v3 only) includes:

  1. Code Smells (issues with severity ratings)
  2. Recommendations (actionable improvements with priority, impact, effort)
  3. Priority Matrix (visual representation of recommendations)
  4. Implementation Plan (phased refactoring roadmap)
  5. Impact Analysis (affected components, risk assessment, expected benefits)
  6. Testing Strategy (validation approach)
  7. Referencias (link back to REPORT.md)

Analysis Depth Levels

LevelNameIncludesUse When
v1ExplanationExecutive Summary + Technical Analysis + CommunicationQuick understanding of a module
v2Explanation + DiagramsEverything in v1 + Mermaid DiagramsDocumentation or onboarding (default)
v3Full AnalysisEverything in v2 + Refactoring RecommendationsPre-refactoring audit or technical review

Default: If the user doesn't specify a level, use v2.

Critical Patterns

Pattern 1: Read Before You Write

Always read the actual code before generating any analysis. Never produce a report based on file names, folder structure, or assumptions alone. If a file can't be read, document it as "inaccessible" rather than guessing its contents.

Pattern 2: Explain, Don't Copy

The report explains how code works — it does not reproduce it. Use short inline snippets (1-3 lines) only when necessary to illustrate a specific pattern or behavior. Never paste full functions, classes, or files.

Bad: Pasting a 50-line function into the report Good: "The processPayment() function validates the input, calls the payment gateway via gateway.charge(), and emits a payment.completed event on success."

Pattern 3: Explicit Unknowns

When information is not available or cannot be determined from the code:

Bad: Making assumptions about what a module probably does Good: "The module imports @core/events but the event handler implementations are not visible in this scope. The specific events consumed could not be determined."

Pattern 4: Dependency Honesty

Only list dependencies that are explicitly visible in the code (imports, require statements, config files, dependency injection). If a dependency is suspected but not confirmed, mark it as "suspected" with reasoning.

Pattern 5: Context-Appropriate Diagrams

See assets/helpers/diagram-guidelines.md for detailed Mermaid diagram selection criteria, syntax examples, and best practices. Match diagram complexity to module complexity (simple = flowchart only, medium = flowchart + sequence, complex = flowchart + sequence + class/C4).

Pattern 6: Technology-Agnostic Analysis

The analysis framework works for any language or framework. Adapt terminology to match the technology:

ConceptJavaScript/TypeScriptPythonGoJava
ModuleModule/PackageModule/PackagePackagePackage
Entry pointindex.ts / export__init__.pymain.goApplication.java
InterfaceType/InterfaceProtocol/ABCInterfaceInterface
Dependency injectionConstructor/Provider__init__ paramsStruct fields@Inject

Best Practices

Before Analysis

  1. Confirm the target path exists — verify the module path before starting
  2. Identify the project type — monorepo, single app, microservice, library
  3. Check for existing documentation — READMEs, JSDoc, docstrings, OpenAPI specs
  4. Ask for context if needed — don't guess business requirements

During Analysis

  1. Start from entry points — find the main export, router, or handler first
  2. Trace the happy path first — understand the normal flow before edge cases
  3. Map dependencies as you go — build the dependency graph incrementally
  4. Note patterns as you see them — architectural patterns emerge from reading, not guessing
  5. Check test files — tests reveal intended behavior and edge cases

After Analysis

  1. Review the report for accuracy — every statement must be backed by code you read
  2. Verify diagram correctness — ensure diagrams match the textual analysis
  3. Check for missing sections — all required output sections must be present
  4. Save to the correct location — {output_dir}/technical/module-analysis/{module-name}/

Integration with Other Skills

With universal-planner

Use code-analyzer during the Analysis Phase (Step 1) of universal-planner to understand the current state of modules that will be affected by the planned work.

With universal-planner (EXECUTE mode)

Before executing a sprint that modifies a module, run code-analyzer to document the "before" state for comparison.

Limitations

  1. Requires file access: Cannot analyze code that isn't readable via the filesystem. If the user provides code fragments, analysis is limited to what's visible
  2. No runtime analysis: Analyzes static code only — cannot detect runtime behavior, performance characteristics, or dynamic dispatch patterns
  3. Single module focus: Analyzes one module at a time. Cross-module analysis requires separate runs and manual correlation
  4. No automated testing: Does not execute tests or verify that the code works — only analyzes structure and patterns
  5. Framework detection: May not recognize custom or obscure frameworks. The user can provide framework context to compensate

Post-Production Delivery

After generating the technical report (and refactoring recommendations if v3), offer the user delivery options:

  1. Sync to Obsidian vault — invoke the obsidian skill in SYNC mode (see invocation below)
  2. Move to custom path — user specifies a destination and files are moved there
  3. Keep in staging — leave files in {output_dir} for later use

Ask the user which option they prefer.

Obsidian invocation (option 1):

  • Preferred: Skill("obsidian"), then say "sync the files in {output_dir} to the vault"
  • Alternative: Say "sync the output to obsidian" (triggers auto_invoke)
  • Subagent fallback: Read the obsidian SKILL.md and follow SYNC mode workflow

Troubleshooting

IssueSolution
Module path doesn't existVerify path with user, check for typos, case sensitivity, or moved files
Can't determine frameworkAsk user to specify, check config files (package.json, requirements.txt, etc.)
Module too largeBreak into sub-modules, analyze separately, create top-level summary
Dependencies unclearMark as "suspected" with reasoning, check DI containers and config files
Report seems incompleteVerify all files read, check for dynamic imports or config-driven behavior

Example Output

See assets/templates/REPORT.md and assets/templates/REFACTOR.md for complete examples including Executive Summary, Communication Maps, Mermaid diagrams, and all other sections.

Future Enhancements

Multi-module analysis, dependency graph visualization, automated change detection, test coverage integration, and export to Confluence/Notion.

平台分布

Codex

38.02%
按下载量换算218

Claude

27.87%
按下载量换算160

Cursor

17.91%
按下载量换算103

Gemini CLI

9.89%
按下载量换算57

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills