AgentSkillsCN

llm-repo-analysis

深度剖析 LLM 代理/插件仓库,提炼架构、模式与核心洞见。 适用场景: - “分析这个 LLM 仓库” - “从[仓库]中提取模式” - “像‘oh-my-opencode-analysis’那样创建文档” - “深入探索仓库” - “理解这个 AI 代理的代码库” 不适用场景: - 通用代码审查(非 LLM 特定) - 简单的文件浏览 - 非 LLM 仓库

SKILL.md
--- frontmatter
name: llm-repo-analysis
description: |
  Deep analysis of LLM agent/plugin repositories to extract architecture, patterns, and insights.
  
  USE WHEN:
  - "analyze this LLM repo"
  - "extract patterns from [repo]"
  - "create documentation like oh-my-opencode-analysis"
  - "repository deep dive"
  - "understand this AI agent codebase"
  
  DO NOT USE WHEN:
  - General code review (not LLM-specific)
  - Simple file exploration
  - Non-LLM repositories

LLM Repository Analysis

Deep analysis framework for LLM agent/plugin repositories. Produces structured documentation covering philosophy, architecture, patterns, and practical implementation guides.

Output Structure

Analysis produces docs/NN-topic-name/ with:

#DocumentRoleKey Question
00core-philosophy.mdWHYWhat beliefs drive the system?
01architecture.mdWHATHow is it structured?
02design-patterns.mdHOWWhat patterns can I reuse?
03anti-patterns.mdAVOIDWhat should I NOT do?
04prompt-engineering.mdCRAFTWhat prompt techniques are used?
05eval-methodology.mdVERIFYHow does it verify completion?
06agents-skills-reference/REFERENCEConcrete implementation examples
-PRACTICAL-GUIDE.mdAPPLYStep-by-step adoption path
-PRACTICAL-GUIDE.patterns/IMPLEMENTDetailed pattern guides

Workflow Routing

IntentWorkflow
Analyze a repositoryworkflows/analyze-repository.md
Generate documentationworkflows/generate-documentation.md

Core Resources

ResourcePurpose
Analysis DimensionsWhat to look for in each dimension
Pattern RecognitionLLM-specific patterns to identify
Output TemplatesDocument structure templates

Quick Reference: What to Look For

Primary Analysis Targets

CategoryFiles to FindWhat to Extract
Main Agent*-prompt.md, system.md, agent.mdCore behavior, philosophy, constraints
Skillsskills/*/SKILL.md, *.skillDomain knowledge patterns
Commandscommands/*.mdUser-triggered procedures
Hooks/Verificationhooks/, *-enforcer.tsCompletion verification systems
Delegationdelegate*.ts, task*.tsMulti-agent orchestration
Configuration*.json, *.yaml, config/Model selection, tool configs

Philosophy Extraction Signals

Look for statements that reveal beliefs:

SignalExampleDimension
"never", "always", "must""never trust self-reported completion"Core belief
"human intervention""human intervention is a failure signal"Design philosophy
Anti-pattern blocks"MUST NOT", "BLOCKING"Quality constraints
Failure conditions"IF... THEN FAIL"Verification standards

Architecture Pattern Signals

PatternSignalIndicator
Multi-agentMultiple agent configsOrchestration system
HierarchicalAGENTS.md at multiple levelsProgressive disclosure
Category+SkillCategory selection + skill loadingDynamic expertise injection
Session Continuitysession_id usageStateful conversations

Analysis Depth Levels

DepthEffortOutput
Quick1-2 hoursREADME + 00-core-philosophy only
Standard4-6 hoursREADME + 00-03 documents
Deep1-2 daysFull 00-06 + PRACTICAL-GUIDE

Document Metadata Rules

  • README.md only: **Analyzed:** [date] + **Repository:** [repo] (version) + **Depth Level:**
  • Sub-documents (01-architecture.md, etc.): **Document:** + **Part of:** + **Source:**
  • No Updated: field anywhere. No Previously: notes. No changelog sections.
  • When re-analyzing a newer version, overwrite in-place with the new version/date.
  • Version history belongs in git, not in document metadata.

Key Principle

Extract the "WHY" before the "WHAT".

Most repositories document what they do. Your job is to extract:

  1. The beliefs that drive the design
  2. The patterns that make it work
  3. The anti-patterns they explicitly avoid
  4. The verification mechanisms that ensure quality

Focus on what's UNIQUE and REUSABLE, not obvious implementation details.