返回 Skill 列表
extension
分类: 开发与工程无需 API Key

libanalysis

libanalysis - 代码分析和格式化工具。formatForAnalysis 函数使用 Prettier 格式化并添加行号来准备用于LLM代码审查任务的markdown文档。用于文档准备、代码分析以及为AI处理创建带编号的参考文档。

person作者: jakexiaohubgithub

libanalysis Skill

When to Use

  • Preparing documents for LLM-based code review
  • Formatting markdown with line numbers for reference
  • Creating numbered documents for analysis tasks
  • Pre-processing content before sending to AI

Key Concepts

formatForAnalysis: Formats markdown content using Prettier and prepends line numbers, making it easy for LLMs to reference specific lines in their responses.

Usage Patterns

Pattern 1: Format document for analysis

import { formatForAnalysis } from "@copilot-ld/libanalysis";

const document = `# README
This is a code sample.`;

const formatted = await formatForAnalysis(document);
// Returns:
// 1: # README
// 2: This is a code sample.

Integration

Standalone utility used in analysis scripts and evaluation pipelines.