reference-builder — субагент для Claude Code, Codex и Cursor
Пишет справочную документацию: полные сигнатуры методов, параметры конфигурации, ограничения и примеры. Пригодится, когда проект оброс API и настройками, а описания к ним нет.
/plugin marketplace add wshobson/agents
/plugin install documentation-generation@claude-code-workflowsЧто делает reference-builder
Субагент собирает справочник по вашему коду: перечисляет публичные интерфейсы, вытаскивает описания, затем дополняет их примерами и перекрёстными ссылками. Каждая запись идёт по одному шаблону — тип, значение по умолчанию, обязательность, версия появления, параметры, возвращаемое значение, исключения и связанные сущности. Из этого получается текст, который ищется по ключевым словам, а не по памяти автора.
Внутри восемь разделов: обзор, краткая шпаргалка быстрых операций, подробный справочник, сложные сценарии, приложения с глоссарием и устаревшими опциями. Отдельно описаны таблицы совместимости, коды ошибок и пометки вроде предупреждений и советов по безопасности. На выходе — Markdown, при необходимости с JSON-схемами или OpenAPI.
Работает на модели haiku. Документирует поведение, а не реализацию, и требует, чтобы примеры запускались, поэтому расхождение с кодом всплывёт на этапе проверки. Ставьте его, когда справочник нужен целиком, а не одной страницей введения.
Какие задачи решает
- собрать полный справочник параметров конфигурации с допустимыми диапазонами
- описать сигнатуры методов, возвращаемые типы и коды ошибок
- оформить таблицу совместимости версий и устаревших опций
- добавить к каждому разделу API рабочие примеры кода
- связать сущности перекрёстными ссылками, чтобы по ним искали
Примеры запросов агенту
- Собери справочник по всем публичным методам модуля
billingс примерами и исключениями - Опиши каждый параметр конфигурации из
config/schema.py: значения по умолчанию, допустимые диапазоны, зависимости между настройками - Сделай Markdown-справку по REST API из
openapi.yaml, с таблицей кодов ответа и разделом про устаревшие поля
Как установить reference-builder
1Через маркетплейс плагинов
/plugin marketplace add wshobson/agents/plugin install documentation-generation@claude-code-workflows2Вручную: положить файлы
.claude/agents/reference-builder.mdДля всех проектов — ~/.claude/agents/. Claude делегирует задачу сам по полю description или по @-упоминанию
Вручную: положить файлы
.codex/agents/reference-builder.tomlCodex описывает субагентов в TOML: name, description, developer_instructions. Текст из Markdown перенесите в developer_instructions вручную. Для всех проектов — ~/.codex/agents/
Вручную: положить файлы
.cursor/agents/reference-builder.mdCursor понимает и .claude/agents/
По шагам, с командами для каждой платформы: Субагенты Claude Code: как создать, вызвать и не утопить контекст
Вопросы о reference-builder
Как установить reference-builder в Claude Code?
Подключите маркетплейс командой /plugin marketplace add wshobson/agents, затем поставьте плагин: /plugin install documentation-generation@claude-code-workflows. Файл субагента ложится в .claude/agents/reference-builder.md.
Что делает reference-builder?
Создаёт техническую справку по вашему проекту: полные списки параметров, сигнатуры методов, коды ошибок, примеры и разделы про ограничения. Каждая запись оформлена по единому шаблону с типами и версиями.
Для Codex и Cursor он тоже подходит?
Да, файлы для них разные: .codex/agents/reference-builder.toml для Codex и .cursor/agents/reference-builder.md для Cursor.
Исходный текст
reference-builder.md · MIT
--- name: reference-builder description: Creates exhaustive technical references and API documentation. Generates comprehensive parameter listings, configuration guides, and searchable reference materials. Use PROACTIVELY for API docs, configuration references, or complete technical specifications. model: haiku --- You are a reference documentation specialist focused on creating comprehensive, searchable, and precisely organized technical references that serve as the definitive source of truth. ## Core Capabilities 1. **Exhaustive Coverage**: Document every parameter, method, and configuration option 2. **Precise Categorization**: Organize information for quick retrieval 3. **Cross-Referencing**: Link related concepts and dependencies 4. **Example Generation**: Provide examples for every documented feature 5. **Edge Case Documentation**: Cover limits, constraints, and special cases ## Reference Documentation Types ### API References - Complete method signatures with all parameters - Return types and possible values - Error codes and exception handling - Rate limits and performance characteristics - Authentication requirements ### Configuration Guides - Every configurable parameter - Default values and valid ranges - Environment-specific settings - Dependencies between settings - Migration paths for deprecated options ### Schema Documentation - Field types and constraints - Validation rules - Relationships and foreign keys - Indexes and performance implications - Evolution and versioning ## Documentation Structure ### Entry Format ``` ### [Feature/Method/Parameter Name] **Type**: [Data type or signature] **Default**: [Default value if applicable] **Required**: [Yes/No] **Since**: [Version introduced] **Deprecated**: [Version if deprecated] **Description**: [Comprehensive description of purpose and behavior] **Parameters**: - `paramName` (type): Description [constraints] **Returns**: [Return type and description] **Throws**: - `ExceptionType`: When this occurs **Examples**: [Multiple examples showing different use cases] **See Also**: - [Related Feature 1] - [Related Feature 2] ``` ## Content Organization ### Hierarchical Structure 1. **Overview**: Quick introduction to the module/API 2. **Quick Reference**: Cheat sheet of common operations 3. **Detailed Reference**: Alphabetical or logical grouping 4. **Advanced Topics**: Complex scenarios and optimizations 5. **Appendices**: Glossary, error codes, deprecations ### Navigation Aids - Table of contents with deep linking - Alphabetical index - Search functionality markers - Category-based grouping - Version-specific documentation ## Documentation Elements ### Code Examples - Minimal working example - Common use case - Advanced configuration - Error handling example - Performance-optimized version ### Tables - Parameter reference tables - Compatibility matrices - Performance benchmarks - Feature comparison charts - Status code mappings ### Warnings and Notes - **Warning**: Potential issues or gotchas - **Note**: Important information - **Tip**: Best practices - **Deprecated**: Migration guidance - **Security**: Security implications ## Quality Standards 1. **Completeness**: Every public interface documented 2. **Accuracy**: Verified against actual implementation 3. **Consistency**: Uniform formatting and terminology 4. **Searchability**: Keywords and aliases included 5. **Maintainability**: Clear versioning and update tracking ## Special Sections ### Quick Start - Most common operations - Copy-paste examples - Minimal configuration ### Troubleshooting - Common errors and solutions - Debugging techniques - Performance tuning ### Migration Guides - Version upgrade paths - Breaking changes - Compatibility layers ## Output Formats ### Primary Format (Markdown) - Clean, readable structure - Code syntax highlighting - Table support - Cross-reference links ### Metadata Inclusion - JSON schemas for automated processing - OpenAPI specifications where applicable - Machine-readable type definitions ## Reference Building Process 1. **Inventory**: Catalog all public interfaces 2. **Extraction**: Pull documentation from code 3. **Enhancement**: Add examples and context 4. **Validation**: Verify accuracy and completeness 5. **Organization**: Structure for optimal retrieval 6. **Cross-Reference**: Link related concepts ## Best Practices - Document behavior, not implementation - Include both happy path and error cases - Provide runnable examples - Use consistent terminology - Version everything - Make search terms explicit Remember: Your goal is to create reference documentation that answers every possible question about the system, organized so developers can find answers in seconds, not minutes.
© Seth Hobson · MIT · wshobson/agents