Token导航 LogoToken导航

Agent Skill · 前端设计

codebase-teach(代码库教学)

codebase-teach 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

codebase-teach 是前端设计类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描有未通过项,按安装量在前端设计类的 10,216 个 Skill 里排第 6,651。

总安装 474周安装 19GitHub Stars 公开资料未说明下载 154核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/fearovex/claude-config --skill codebase-teach

这个 Skill 是做什么的

前端设计类 Skill 关注页面结构、视觉规范和组件写法,输出通常是可运行的界面代码。

检测到、记录的上下文、覆盖率 % 覆盖范围 百分比和比例 差距 在代码中找到但未记录的上下文(或“无”) 文件读取 采样和跳过的文件的每个上下文列表 编写/更新的部分 每个功能文件:创建或更新,哪些部分 ai-context/features/<context>.md (每个有界上下文一个) 在步骤 3 中编写或更新。

六个部分[自动更新] 所有人工智能生成的内容上的标记。每周安装量 19 存储库 fearovex/克劳德配置 第一次看到 今天 安全审计 Gen Agent Trust Hub 通行证 套接字通行证 斯尼克失败

来源仓库内路径:skills/codebase-teach

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/fearovex/claude-config --skill codebase-teach;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

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

常见问题

6 条

codebase-teach 怎么安装?

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

codebase-teach 支持哪些 AI 工具?

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

codebase-teach 需要什么权限?

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

codebase-teach 是免费的吗?

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

codebase-teach 用的人多吗?

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

codebase-teach 安全吗?

第三方扫描有未通过项,风险较高。除非你确认过源码,否则不建议直接安装到常用环境。

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

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

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

不太适合

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

前端设计类 Skill 对比

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

前端设计 · Codex、Claude

8,823,360126,072只读MIT通过
vercel-composition-patterns

Vercel 组合模式 · Codex、Claude

3,858,81625,893需要联网MIT通过
vercel-react-native-skills

Vercel React native skills 前端 · Codex、Claude

2,468,66425,878只读MIT通过
adapt

adapt 搜索 · Codex、Claude

2,027,04023,125操作浏览器未明确通过
bolder

bolder 分析 · Codex、Claude

2,004,28823,130只读未明确通过
codebase-teach

代码库教学 · 本页

474—需要联网未明确未通过

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

SKILL.md 原文

codebase-teach

Analyzes bounded contexts from the project's source tree, extracts domain knowledge per context, writes ai-context/features/<context>.md files, and produces teach-report.md with coverage metrics.

Triggers: /codebase-teach, teach codebase, extract domain knowledge, update feature docs, analyze bounded contexts


Purpose

codebase-teach fills the ai-context/features/ layer with structured domain knowledge derived from reading source code. It is the deep-read complement to memory-update (which records session decisions) and memory-init (which scaffolds empty stubs). It MUST only be invoked manually by the user.


Process

Step 0 — Load project context (non-blocking)

This step is non-blocking: any failure (missing file, unreadable file) MUST produce at most an INFO-level note. This step MUST NOT produce status: blocked or status: failed.

  1. Read ai-context/stack.md — tech stack, versions, key tools.
  2. Read ai-context/architecture.md — architectural decisions and rationale.
  3. Read ai-context/conventions.md — naming patterns, code conventions.
  4. Read the project's CLAUDE.md (at project root) and extract the ## Skills Registry section.

For each file:

  • If absent: log INFO: [filename] not found — proceeding without it.
  • If present: extract Last updated: or Last analyzed: date. If date is older than 30 days: log NOTE: [filename] last updated [date] — context may be stale. Consider running /memory-update or /project-analyze.

Also read project config file (config.yaml at project root) if it exists, and extract teach_max_files_per_context if present:

  • If present: max_files = teach_max_files_per_context
  • If absent: max_files = 10 (default)

Log: "File cap per context: [max_files] (source: config.yaml)" or "File cap per context: 10 (default)"


Step 1 — Scan bounded contexts

Identify bounded context candidates by scanning the project directory tree at depth ≤ 2 under these root directories (in order):

  1. src/ — subdirectories at depth 1 (e.g., src/auth/, src/payments/)
  2. app/ — subdirectories at depth 1
  3. features/ — subdirectories at depth 1
  4. domain/ — subdirectories at depth 1
  5. ai-context/features/ — existing feature file names (each file stem is treated as a context name)

Exclusion rules — skip directories named: shared, utils, common, lib, types, hooks, components, __tests__, test, tests, node_modules, .git

Cross-reference with existing feature files: Read the ai-context/features/ directory (if it exists) and list all .md files, excluding files whose names begin with _ (e.g., _template.md).

For each detected context candidate, build a record:

{ slug: kebab-case of directory name, dir_path, existing_feature_file: bool }

Slug convention: lowercase the directory name; replace spaces and underscores with hyphens. Example: UserProfile → user-profile, auth_service → auth-service.

If no context candidates are found:

  • Log: "No bounded context directories detected."
  • Write teach-report.md with a Summary noting "No bounded context directories detected" and a recommendation to run /memory-init first.
  • Stop here.

If ai-context/features/ does not exist:

  • Log: "INFO: ai-context/features/ not found — feature files will be created if possible."
  • Note in teach-report.md: "ai-context/features/ was absent at run time. Recommend running /memory-init to scaffold the directory before re-running /codebase-teach."
  • Continue processing (the skill creates the directory and files as needed).

Output: context_list = [{slug, dir_path, existing_feature_file: bool},...]

Log each context found: "Detected context: [slug] — [dir_path] (feature file: [exists|absent])"


Step 2 — Read key files per context (sequential)

Process contexts one at a time. For each context in context_list:

  1. Enumerate implementation files in dir_path (recursive), filtering for file extensions: .ts, .tsx, .js, .jsx, .py, .java, .kt, .rb, .go, .ex, .exs, .cs, .rs, .php, .swift

- Prioritize files by recency (most recently modified first) - Exclude files matching: *.test.*, *.spec.*, test_*, *_test.*, *.d.ts, *.min.*

  1. Apply file cap: read at most max_files files. If total enumerated > max_files, log: "[slug]: [total] files found — sampling [max_files] (cap applied)"
  2. For each file to read:

- Attempt to read the file - If the file is binary or unreadable: skip it; record in skipped_files with reason - If readable: extract the following signals: - Business rules: explicit conditional constraints (if/when/unless logic that enforces domain rules) - Invariants: assertions or validation guards that are always enforced - Data model entities: class/struct/interface/type names with their key fields - Integration points: imports of external services, APIs, or infrastructure adapters

  1. Accumulate: context_knowledge = {slug, rules[], invariants[], entities[], integrations[], files_read[], skipped[]}

Step 3 — Write ai-context/features/<slug>.md

For each context processed in Step 2:

If ai-context/features/<slug>.md does not exist (or ai-context/features/ is absent):

  • Create the directory if needed
  • Write a new file using the six-section structure below
  • All AI-generated sections receive [auto-updated] markers

If ai-context/features/<slug>.md already exists:

  • Read the entire file
  • Identify <!-- [auto-updated]: codebase-teach... -->... <!-- [/auto-updated] --> blocks
  • Overwrite content only inside [auto-updated] blocks
  • Preserve byte-for-byte all content outside any [auto-updated] block
  • If no [auto-updated] block exists for a section, append the section at the end of the file inside a new [auto-updated] block

Six-section feature file structure:

# [Context Name] — Domain Knowledge

Last updated by: codebase-teach
Last run: YYYY-MM-DD

---

## Domain Overview

<!-- [auto-updated]: codebase-teach — last run: YYYY-MM-DD -->
[AI-extracted 2–4 sentence summary of what this bounded context does and its primary responsibilities]
<!-- [/auto-updated] -->

---

## Business Rules and Invariants

<!-- [auto-updated]: codebase-teach — last run: YYYY-MM-DD -->
[AI-extracted explicit conditional constraints and always-true invariants from the source]

- Rule: [description]
- Invariant: [description]
<!-- [/auto-updated] -->

---

## Data Model Summary

<!-- [auto-updated]: codebase-teach — last run: YYYY-MM-DD -->
Key entities detected:

| Entity | Key Fields |
|--------|-----------|
| [Name] | [field1, field2, ...] |
<!-- [/auto-updated] -->

---

## Integration Points

<!-- [auto-updated]: codebase-teach — last run: YYYY-MM-DD -->
External dependencies and integration touchpoints:

- [service/API name]: [what it is used for]
<!-- [/auto-updated] -->

---

## Decision Log

<!-- [auto-updated]: codebase-teach — last run: YYYY-MM-DD -->
<!-- Append new AI-detected decisions below. Human entries above this marker are preserved. -->
<!-- [/auto-updated] -->

---

## Known Gotchas

<!-- [auto-updated]: codebase-teach — last run: YYYY-MM-DD -->
<!-- Append new AI-detected gotchas below. Human entries above this marker are preserved. -->
<!-- [/auto-updated] -->

_template.md guard: never read, write, or treat any file whose name begins with _ as a feature context. Skip entirely.


Step 4 — Evaluate coverage and write teach-report.md

Coverage calculation:

documented_contexts = count of contexts that have an ai-context/features/<slug>.md file after Step 3
total_contexts      = count of contexts in context_list
coverage_pct        = (documented_contexts / total_contexts) * 100   (0 if total_contexts == 0)
gap_list            = contexts in context_list where existing_feature_file was false before Step 3
                      AND no file was created in Step 3

Write teach-report.md in the project working directory root (same level as analysis-report.md). Overwrite if it exists.

# Teach Report — [Project Name]

Last run: YYYY-MM-DD
Skill: codebase-teach

## Summary

Contexts detected: [total_contexts]
Contexts documented: [documented_contexts]
Coverage: [coverage_pct]%

## Coverage

[coverage_pct]% — [documented_contexts] of [total_contexts] contexts documented.

## Gaps

Contexts detected in code but not documented in ai-context/features/:

- [context-slug] — [dir_path]

[If no gaps: "None — all detected contexts are documented."]

## Files Read

### [context-slug]
- [file path] — sampled
- [file path] — sampled
- [file path] — SKIPPED: [reason]

[Repeat for each context]

## Sections Written / Updated

- ai-context/features/[context].md — [created|updated] — sections: [list of sections written]

If ai-context/features/ was absent at run time, append to the Summary section:

Note: ai-context/features/ was absent at run time. Recommend running /memory-init to scaffold the directory before re-running /codebase-teach.

Rules

  • MUST NOT modify ai-context/stack.md, ai-context/architecture.md, ai-context/conventions.md, ai-context/known-issues.md, or ai-context/changelog-ai.md
  • MUST NOT modify any file under docs/
  • MUST NOT be invoked automatically by any other skill — user-initiated only
  • MUST skip any file or directory whose name begins with _ in ai-context/features/
  • MUST preserve all human-authored content outside [auto-updated] markers when updating existing feature files
  • MUST process contexts sequentially — never in parallel
  • MUST apply the teach_max_files_per_context cap (default 10) to every context
  • MUST list skipped files in teach-report.md under the "Files Read" section for the relevant context
  • MUST complete without error even when no bounded context directories are detected
  • MUST write teach-report.md on every successful run
  • [auto-updated] marker format: <!-- [auto-updated]: codebase-teach — last run: YYYY-MM-DD -->... <!-- [/auto-updated] --> — consistent with project-analyze convention

Output

teach-report.md (mandatory — written to project root on every run)

Required sections:

SectionContent
SummaryContexts detected, documented, coverage %
CoveragePercentage and ratio
GapsContexts found in code but undocumented (or "None")
Files ReadPer-context list of files sampled and skipped
Sections Written / UpdatedPer-feature-file: created or updated, which sections

ai-context/features/<context>.md (one per bounded context)

Written or updated during Step 3. Six sections with [auto-updated] markers on all AI-generated content.

平台分布

Codex

33.6%
按下载量换算52

Claude

28.57%
按下载量换算44

Cursor

21.28%
按下载量换算33

Gemini CLI

9.69%
按下载量换算15

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

未通过

权限和风险

需要联网

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

安装前确认

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

继续浏览同类 Skills