Token导航 LogoToken导航

Agent Skill · 研究检索

codebase-librarian(代码库管理员)

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

codebase-librarian 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为调用外部服务;许可证为 MIT,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 55,343。

总安装 485周安装 20GitHub Stars 公开资料未说明下载 158核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/baggiponte/skills --skill codebase-librarian

这个 Skill 是做什么的

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

codebase-librarian 以中立档案员视角清点项目资产,仅记录现状而不做任何改进建议。输出包含语言类型、目录结构与关键配置文件位置的详尽清单。适用于建立客观基准、交接审计或迁移评估等需绝对真实性的场景。全程无主观判断,不执行任何修改,仅依赖观察与计数类命令获取信息。

适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

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

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

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

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

    它需要调用外部服务,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

codebase-librarian 怎么安装?

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

codebase-librarian 支持哪些 AI 工具?

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

codebase-librarian 需要什么权限?

权限级别是调用外部服务。该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

codebase-librarian 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

codebase-librarian 用的人多吗?

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

codebase-librarian 安全吗?

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

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

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 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调用外部服务未明确有提醒
codebase-librarian

代码库管理员 · 本页

485—调用外部服务MIT通过

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

SKILL.md 原文

Codebase Librarian

Persona: Senior Software Engineer as Librarian. Observe and catalog, never suggest. Like a skilled archivist mapping a new collection—thorough, neutral, comprehensive. Document what IS, not what SHOULD BE. No opinions, no improvements, no judgments. Pure inventory.

Output

Ask the user for an output path (e.g., ./docs/inventory.md or ./architecture/inventory.md).

Write findings as a single markdown file with all sections below.


1. Project Foundation

Goal: Understand the project's shape, language, and tooling.

Investigate:

  • Root directory structure (top-level folders and their apparent purpose)
  • Language(s) and runtime versions
  • Build system and scripts (Makefile, pyproject.toml scripts, setup.py, etc.)
  • Dependency manifest (pyproject.toml, requirements.txt, setup.py, go.mod, Cargo.toml)
  • Configuration files (.env.example, config/, environment-specific files)
  • Documentation (README.md, docs/, ARCHITECTURE.md, CONTRIBUTING.md)

Search patterns:

README*, ARCHITECTURE*, CONTRIBUTING*
pyproject.toml, requirements.txt, setup.py, go.mod, Cargo.toml
Makefile, Dockerfile, docker-compose*
.env.example, config/, settings/

Record: Language, framework, major dependencies, build commands, config structure.


2. Entry Points Inventory

Goal: Catalog every way execution enters the system.

Investigate:

  • HTTP/REST endpoints (route definitions, controllers, handlers)
  • GraphQL schemas and resolvers
  • CLI commands and their handlers
  • Background workers and job processors
  • Message consumers (Kafka, RabbitMQ, SQS, pub/sub)
  • Scheduled tasks (cron jobs, periodic workers)
  • WebSocket handlers
  • Event listeners and hooks

Search patterns:

routes/, controllers/, handlers/, api/
*_handler.py, *_controller.py, views.py, endpoints.py
cli/, commands/, __main__.py
workers/, jobs/, queues/, consumers/, tasks/
celery*, scheduler*, cron*

Record: For each entry point type, list the files and what triggers them.


3. Services Inventory

Goal: Identify every distinct service, module, or bounded context.

Investigate:

  • Service classes and their responsibilities
  • Module boundaries (how is code grouped?)
  • Internal APIs between modules
  • Shared vs. isolated code
  • Service initialization and lifecycle

Search patterns:

services/, modules/, domains/, features/, packages/
*_service.py, *_manager.py, *_handler.py
internal/, core/, shared/, common/, lib/

For each service, document:

ServiceLocationResponsibilityDependenciesDependents
UserServicesrc/services/user.pyUser CRUD, authDatabase, EmailServiceOrderService, AuthHandler

4. Infrastructure Inventory

Goal: Catalog every external system the codebase talks to.

Categories to investigate:

Databases & Storage:

  • Primary database (Postgres, MySQL, MongoDB, etc.)
  • Caching layer (Redis, Memcached)
  • Search engines (Elasticsearch, Algolia)
  • File storage (S3, GCS, local filesystem)
  • Session storage

Messaging & Queues:

  • Message brokers (Kafka, RabbitMQ, SQS, Redis pub/sub)
  • Event buses
  • Notification systems

External APIs:

  • Payment processors (Stripe, PayPal)
  • Email services (SendGrid, SES, Mailgun)
  • SMS/Push notifications
  • OAuth providers
  • Third-party data services
  • Internal microservices

Infrastructure Services:

  • Logging (Datadog, Splunk, CloudWatch)
  • Monitoring/APM
  • Feature flags (LaunchDarkly, etc.)
  • Secrets management

Search patterns:

database/, db/, repositories/, models/
cache/, redis/, memcache/
queue/, messaging/, events/, pubsub/
clients/, integrations/, external/, adapters/
*_client.py, *_adapter.py, *_gateway.py, *_provider.py

For each infrastructure component, document:

ComponentTypeLocationHow AccessedUsed By
PostgreSQLDatabasesrc/db/SQLAlchemy ORMUserRepo, OrderRepo
StripePayment APIsrc/clients/stripe.pyDirect SDKPaymentService
RedisCachesrc/cache/redis.pyredis-py clientSessionService, RateLimiter

5. Domain Model Inventory

Goal: Map the core business entities and their relationships.

Investigate:

  • Entity/model definitions
  • Value objects
  • Aggregates and aggregate roots
  • Domain events
  • Business rules and validation logic
  • Enums and constants representing domain concepts

Search patterns:

models/, entities/, domain/, core/
types/, schemas/, dataclasses/
*_entity.py, *_model.py, *_aggregate.py
events/, domain_events/

For each domain concept, document:

EntityLocationKey FieldsRelationshipsBusiness Rules
Ordersrc/models/order.pyid, status, total, user_idhas_many LineItems, belongs_to UserStatus transitions, pricing

6. Data Flow Tracing

Goal: Understand how requests move through the system end-to-end.

Pick 2-3 representative flows and trace them:

  1. A read operation (e.g., "get user profile")
  2. A write operation (e.g., "create order")
  3. A complex operation (e.g., "checkout with payment")

For each flow, document:

Flow: Create Order
1. POST /orders → create_order (api/orders.py:24)
2. → OrderService.create_order (services/order.py:45)
3. → validates input (services/order.py:52)
4. → OrderRepository.save (repositories/order.py:30)
5. → SQLAlchemy INSERT (models/order.py)
6. → emit OrderCreated event (services/order.py:78)
7. → EmailService.send_confirmation (services/email.py:15)
8. ← return order DTO

7. Patterns & Conventions

Goal: Document the architectural patterns already in use.

Look for:

  • Layering (controllers → services → repositories → models?)
  • Dependency injection (how are dependencies wired?)
  • Error handling patterns
  • Logging conventions
  • Testing patterns (unit vs. integration, mocking strategy)
  • Code organization (by feature? by layer? hybrid?)

Questions to answer:

  • Is there a consistent pattern or is it a patchwork?
  • Are there patterns used in some places but not others?
  • What abstractions exist? (interfaces, base classes, factories)

Output Template

Write the final inventory document:

# Codebase Inventory: [Project Name]

**Generated**: [Date]
**Scope**: [Full codebase / specific module]

## Project Overview
- **Language/Framework**:
- **Build System**:
- **Key Dependencies**:

## Entry Points

| Type | Location | Count | Notes |
|------|----------|-------|-------|
| HTTP Routes | `api/*.py` | 24 | FastAPI router |
| Background Workers | `workers/*.py` | 3 | Celery tasks |
| CLI Commands | `cli/` | 5 | Click/Typer |

## Services

| Service | Location | Responsibility | Dependencies | Dependents |
|---------|----------|----------------|--------------|------------|

## Infrastructure

| Component | Type | Location | Access Pattern | Used By |
|-----------|------|----------|----------------|---------|

## Domain Model

| Entity | Location | Key Fields | Relationships |
|--------|----------|------------|---------------|

## Data Flows

### Flow 1: [Name]
[Step-by-step trace with file:line references]

### Flow 2: [Name]
[Step-by-step trace with file:line references]

## Observed Patterns

- **Layering**:
- **Dependency Management**:
- **Error Handling**:
- **Testing Strategy**:

## Key File References

| Area | Key Files |
|------|-----------|
| Entry points | |
| Core services | |
| Data access | |
| External integrations | |

Remember: This is pure documentation. No "should", no "could be better", no recommendations. Just facts about what exists and where.

平台分布

Gemini CLI

29.37%
按下载量换算46

Antigravity

26.37%
按下载量换算42

Claude Code

16.97%
按下载量换算27

Codex

12.1%
按下载量换算19

OpenCode

8.97%
按下载量换算14

windsurf

3.5%
按下载量换算6

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

调用外部服务

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

继续浏览同类 Skills