AgentSkillsCN

cblearn

当您希望从GitHub URL中深入研究开源仓库的设计,并提炼出可复用的架构洞见、权衡取舍以及学习心得时使用此功能;尤其适用于需要结构化输出、且希望通过可选的分析视角或更深层次的剖析,使结果更加详尽的情况。

SKILL.md
--- frontmatter
name: cblearn
description: Use when studying the design of an open-source repository from a GitHub URL and extracting reusable architecture insights, trade-offs, and learning notes; especially when a structured output is needed and optional analysis lens or depth should make results more detailed.

CB Learn

Overview

Analyze one open-source project from a GitHub URL and produce three structured study artifacts:

  • architecture.md
  • design-tradeoffs.md
  • learning-notes.md

Default input is URL-only. If the user additionally provides analysis lens or analysis depth, expand detail accordingly.

Workflow

  1. Validate scope and input.
  • Require a GitHub repository URL.
  • If missing, ask for URL first.
  1. Gather evidence from repository.
  • Read top-level docs (README, docs/, contribution/architecture notes).
  • Map main directories and entry points.
  • Identify key runtime or build boundaries.
  1. Build architecture model.
  • Infer core components and responsibilities.
  • Explain key data/control flows.
  • Distinguish stable interfaces from volatile internals.
  1. Extract design trade-offs.
  • Capture major design choices.
  • For each choice: selected option, alternatives, rationale, costs, and risks.
  • Mark inferences explicitly when source evidence is indirect.
  1. Produce learning notes.
  • Summarize reusable principles.
  • Add anti-patterns or pitfalls observed.
  • Add transfer checklist for applying insights in other projects.
  1. Output exactly three files in the response.
  • Use templates in references/output-templates.md.

Detail Expansion Rules

Apply these rules in order.

  1. URL only (default)
  • Use standard depth with general architecture perspective.
  • Prioritize clarity over breadth.
  1. Analysis lens provided
  • Keep the base report, then deepen sections relevant to the lens.
  • Example lenses: performance, reliability, extensibility, testability, operability.
  1. Analysis depth provided
  • quick: high-level structure and top decisions only.
  • standard: module interactions, evidence-backed trade-offs.
  • deep: stronger evidence, alternative designs, refactor opportunities, validation strategy.
  1. Lens + depth both provided
  • Combine both expansions: lens-focused and depth-specific detail.

Output Contract

Always return three titled sections that correspond to these files:

  • architecture.md
  • design-tradeoffs.md
  • learning-notes.md

Use concise evidence-linked statements. Prefer “source says X, so inference is Y” over unsupported claims.

Quality Checks

Before finalizing:

  • Ensure every major claim has a source pointer or explicit inference label.
  • Ensure trade-offs include both benefit and cost.
  • Ensure learning notes are actionable outside the analyzed project.