Skip to main content

Claude Research

Research documentation for: $ARGUMENTS

System Prompt

⚠️ EXECUTION DIRECTIVE: When the user invokes this command, you MUST:

  1. IMMEDIATELY execute - no questions, no explanations first
  2. ALWAYS show full output from script/tool execution
  3. ALWAYS provide summary after execution completes

DO NOT:

  • Say "I don't need to take action" - you ALWAYS execute when invoked
  • Ask for confirmation unless requires_confirmation: true in frontmatter
  • Skip execution even if it seems redundant - run it anyway

The user invoking the command IS the confirmation.


Arguments

$ARGUMENTS - Research Scope (optional)

Specify what to research:

Default Behavior

If no arguments:

  • Processes files in docs/original-research/NEW/
  • Converts and categorizes content
  • Archives sources to BU/
  • Updates category indexes
  • Commits changes

Overview

Automated research and organization of Claude Code and Anthropic documentation from official sources, community resources, and training materials.

Syntax

/claude-research [options]

Options

Source Selection

--sources <source-type>
official # Anthropic official documentation only
community # Community content (GitHub, Reddit, blogs)
training # Training materials and courses
all # All sources (default)

--url <url> # Process specific URL
--file <path> # Process specific local file
--batch # Process all files in NEW/ directory

Category Targeting

--categories <categories>
api # API reference documentation
tutorials # Step-by-step tutorials
best-practices # Best practice guides
releases # Release notes and updates
blogs # Blog posts and articles
discussions # Community discussions

# Multiple categories (comma-separated)
--categories "api,tutorials,best-practices"

Processing Options

--format <format>
markdown # Output as markdown (default)
pdf # Save as PDF
html # Save as HTML

--duplicate-check # Enable duplicate detection (default: enabled)
--no-duplicate-check # Disable duplicate detection

--quality-check # Enable quality validation (default: enabled)
--no-quality-check # Skip quality validation

Automation Options

--auto-commit       # Automatically git commit processed files
--auto-push # Automatically git push after commit
--watch # Continuous monitoring of NEW/ directory
--notify # Send notification on completion

Output Control

--output-dir <path> # Custom output directory (default: docs/research-library/)
--archive-dir <path> # Custom archive directory (default: docs/original-research/BU/)
--dry-run # Show what would be done without executing
--verbose # Detailed output logging

Usage Examples

Example 1: Process New Files in NEW/ Directory

/claude-research --batch --auto-commit

What it does:

  1. Finds all files in docs/original-research/NEW/
  2. Processes each file (convert, categorize, organize)
  3. Archives sources to BU/
  4. Updates category indexes
  5. Commits with message: docs: Add [count] new research documents

Example 2: Scrape Official Anthropic Documentation

/claude-research --sources official --categories "api,tutorials" --auto-commit

What it does:

  1. Scrapes docs.anthropic.com for API and tutorial documentation
  2. Converts to markdown format
  3. Organizes into docs/research-library/official/api/ and .../tutorials/
  4. Creates/updates category indexes
  5. Commits changes

Example 3: Process Specific URL

/claude-research --url "https://docs.anthropic.com/claude-code/installation" \
--categories tutorials --auto-commit

What it does:

  1. Fetches content from URL
  2. Converts to markdown
  3. Saves to docs/research-library/official/tutorials/installation.md
  4. Archives source HTML
  5. Updates indexes and commits

Example 4: Watch Mode for Continuous Processing

/claude-research --watch --auto-commit --notify

What it does:

  1. Monitors docs/original-research/NEW/ for new files
  2. Auto-processes when files are added
  3. Commits each processed file
  4. Sends notification on completion

Example 5: Dry Run (Preview Only)

/claude-research --batch --dry-run --verbose

What it does:

  1. Scans NEW/ directory
  2. Shows what would be processed
  3. Displays categorization decisions
  4. Shows target paths
  5. Does NOT execute moves or commits

Example 6: Custom Output Directory

/claude-research --file "my-transcript.txt" \
--output-dir "docs/custom-research/" \
--categories tutorials

What it does:

  1. Processes my-transcript.txt
  2. Saves to docs/custom-research/tutorials/
  3. Archives source as usual
  4. Updates custom directory index

Workflow Details

Standard Processing Workflow

1. Discovery
└─ Scan NEW/ or fetch URL

2. Reading
└─ Load file content or web page

3. Processing
├─ Convert transcript to markdown (if .txt)
├─ Extract metadata (title, source, date)
└─ Format with proper structure

4. Categorization
├─ Analyze content
├─ Determine category (official/community/training/releases)
└─ Select subdirectory (api/tutorials/blogs/etc.)

5. Duplicate Detection
├─ Search existing content
├─ Compare similarity
└─ Flag duplicates or skip

6. Organization
├─ Move to target directory: docs/research-library/{category}/
├─ Archive source to: docs/original-research/BU/
└─ Update category README.md index

7. Version Control
├─ git add processed files
├─ git commit -m "docs: Add [filename] to [category]"
└─ git push (if --auto-push)

8. Reporting
└─ Generate processing summary

Watch Mode Workflow

while monitoring:
on file_added to NEW/:
process_file(file)
archive_source(file)
git_commit()
notify_completion()

Output Structure

Processed files are organized into:

docs/research-library/
├── README.md # Master index
├── official/
│ ├── README.md
│ ├── api/
│ │ ├── README.md
│ │ └── [processed-docs].md
│ ├── tutorials/
│ │ ├── README.md
│ │ └── [processed-docs].md
│ └── best-practices/
│ ├── README.md
│ └── [processed-docs].md
├── community/
│ ├── README.md
│ ├── blogs/
│ │ ├── README.md
│ │ └── [processed-docs].md
│ └── discussions/
│ ├── README.md
│ └── [processed-docs].md
├── training/
│ ├── README.md
│ └── courses/
│ ├── README.md
│ └── [processed-docs].md
└── releases/
├── README.md
└── version-2.0/
├── README.md
└── [processed-docs].md

Category Index Format

Each category directory contains a README.md index:

# [Category Name]

**Last Updated:** 2025-11-29
**Total Documents:** 15

## Documents

### API Reference
- [Claude Code API](api-reference.md) - Complete API documentation
- [Authentication](authentication.md) - Auth patterns and examples

### Tutorials
- [Getting Started](getting-started.md) - Beginner guide
- [Advanced Workflows](advanced-workflows.md) - Expert techniques

## Recent Additions
- 2025-11-29: [Authentication](authentication.md)
- 2025-11-28: [Getting Started](getting-started.md)

Master Index Format

docs/research-library/README.md provides complete inventory:

# Claude Code Research Plan

**Last Updated:** 2025-11-29
**Total Documents:** 47
**Categories:** 7

## Quick Navigation

- [Official Documentation](#official-documentation) (25 docs)
- [Community Content](#community-content) (12 docs)
- [Training Materials](#training-materials) (5 docs)
- [Release Notes](#release-notes) (5 docs)

## Official Documentation

### API Reference (8 docs)
- See [official/api/README.md](official/api/README.md)

### Tutorials (12 docs)
- See [official/tutorials/README.md](official/tutorials/README.md)

### Best Practices (5 docs)
- See [official/best-practices/README.md](official/best-practices/README.md)

## Community Content

### Blogs (7 docs)
- See [community/blogs/README.md](community/blogs/README.md)

### Discussions (5 docs)
- See [community/discussions/README.md](community/discussions/README.md)

## Training Materials

### Courses (5 docs)
- See [training/courses/README.md](training/courses/README.md)

## Release Notes

### Version 2.0 (5 docs)
- See [releases/version-2.0/README.md](releases/version-2.0/README.md)

## Statistics

- Most active category: Official/Tutorials (12 docs)
- Most recent addition: 2025-11-29
- Growth rate: +3 docs/week (average)

Commit Message Format

Uses conventional commit format:

docs: Add [filename] to [category]

- Source: [URL or file path]
- Category: [category/subdirectory]
- Type: [API/Tutorial/Blog/etc.]
- Date: [YYYY-MM-DD]

Processed by claude-research-agent

Examples:

docs: Add Claude Code installation guide to official/tutorials

- Source: https://docs.anthropic.com/claude-code/installation
- Category: official/tutorials
- Type: Tutorial
- Date: 2025-11-29

Processed by claude-research-agent
docs: Add 3 new community blog posts

- community/blogs/advanced-prompting.md
- community/blogs/multi-instance-workflows.md
- community/blogs/mcp-integration-guide.md

Batch processed by claude-research-agent

Error Handling

Duplicate Content:

⚠️  Duplicate detected: installation-guide.md
Existing: docs/research-library/official/tutorials/installation-guide.md
Action: Skipped processing
Recommendation: Review content differences manually

Invalid Format:

❌ Format error: corrupt-file.txt
Issue: Unable to parse markdown structure
Action: Saved to docs/research-library/manual-review/
Recommendation: Manual processing required

Category Ambiguity:

⚠️  Category unclear: hybrid-content.md
Confidence: official/tutorials (65%), community/blogs (35%)
Action: Defaulted to official/tutorials
Recommendation: Review categorization

Git Commit Failure:

❌ Git commit failed
Error: Unable to push to remote
Action: Changes committed locally
Command: cd /path/to/repo && git push

Performance Metrics

Command provides performance report:

📊 Processing Summary

Files Processed: 5
Time Elapsed: 47 seconds
Average Speed: 9.4 seconds/file

Categorization:
├─ official/tutorials: 3 files
├─ community/blogs: 1 file
└─ training/courses: 1 file

Quality Checks:
├─ Passed: 5 files (100%)
├─ Warnings: 1 file (20%)
└─ Failed: 0 files (0%)

Duplicates:
├─ Detected: 2 files
└─ Skipped: 2 files

Git Operations:
├─ Commits: 1
├─ Files staged: 7
└─ Push: Success

Configuration

Settings stored in .coditect/settings.json:

{
"commands": {
"claude-research": {
"default_sources": "all",
"default_categories": ["api", "tutorials", "best-practices"],
"output_directory": "docs/research-library/",
"archive_directory": "docs/original-research/BU/",
"auto_commit": true,
"auto_push": false,
"duplicate_check": true,
"quality_check": true,
"watch_mode_interval": 5,
"notification": {
"enabled": false,
"method": "slack",
"webhook_url": ""
}
}
}
}

Integration with Other Commands

Complementary Commands:

# Process research, then export for deduplication
/claude-research --batch --auto-commit
/export-dedup

# Research official docs, then analyze patterns
/claude-research --sources official --categories api
/analyze-session

# Batch process and create git workflow
/claude-research --batch
/git-sync --target all

Dependencies

Required Components:

  • claude-research-agent (this command's backend)
  • codi-documentation-writer (for markdown formatting)
  • web-search-researcher (for web scraping)

Optional Enhancements:

  • git-workflow-orchestrator (for advanced git automation)
  • project-organizer (for directory maintenance)

Activation Instructions

Status: NOT ACTIVATED

To activate this command:

cd /Users/halcasteel/Downloads/CLAUDE-CODE-HOWTOs/.coditect
python3 scripts/update-component-activation.py activate command claude-research \
--reason "Automated Claude/Anthropic documentation research and organization"

git add commands/claude-research.md .coditect/component-activation-status.json
git commit -m "feat(command): Add /claude-research slash command"
git push

Verify activation:

python3 scripts/update-component-activation.py status command claude-research

Troubleshooting

Command not recognized:

  • Verify component activation status
  • Check .coditect/component-activation-status.json
  • Restart Claude Code session

Files not processing:

  • Check NEW/ directory permissions
  • Verify file format (.txt or .md)
  • Review error logs in verbose mode

Categorization incorrect:

  • Review categorization logic in agent
  • Manually move files to correct category
  • Update category index manually

Git commit fails:

  • Check git repository status
  • Verify remote connection
  • Commit manually and report issue

See Also

Success Output

When research processing completes:

✅ COMMAND COMPLETE: /claude-research
Files Processed: N
Categories: <list>
Archive: docs/original-research/BU/
Output: docs/research-library/
Commits: N

Completion Checklist

Before marking complete:

  • Files discovered
  • Content processed
  • Categories assigned
  • Archives created
  • Indexes updated

Failure Indicators

This command has FAILED if:

  • ❌ Source files not found
  • ❌ Category unknown
  • ❌ Processing failed
  • ❌ No output generated

When NOT to Use

Do NOT use when:

  • Manual organization needed
  • Non-Claude documentation
  • Already categorized content

Anti-Patterns (Avoid)

Anti-PatternProblemSolution
Skip categorizationDisorganized contentAlways categorize
No duplicate checkRedundant contentEnable --duplicate-check
Ignore errorsLost contentReview error logs

Principles

This command embodies:

  • #2 Search Before Create - Find existing content
  • #3 Complete Execution - Full processing workflow
  • #6 Clear, Understandable - Organized output

Full Standard: CODITECT-STANDARD-AUTOMATION.md


Command Version: 1.0.0 Agent Framework: Universal Agent Framework v2.0 Compliance: CODITECT Component Standards v1.0 Last Updated: 2025-11-29