repo-research
CLAUDE.md0 starsChanged 6 months agoApache-2.0View on GitHub
Guidance for Claude Code when working in this repository. A GitHub analysis tool built with LangGraph and a configurable LLM provider (Ollama / Anthropic / HuggingFace). It exposes a set of CLI commands that run predefined analyses over GitHub data, with full conversation persistence via SQLite checkpointing. This project strongly emphasizes type safety. When writing code here you MUST: User prompt → LangGraph orchestrates LLM reasoning + tool calls → GitHub tools execute → results fed back to LLM for…
- Reads credentials
In this repository2 other files it gives its agents.
- hotspot-analysisSkill
- llm-provider-setupSkill
The file
We split this CLAUDE.md into the rules it gives an agent
3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 18
This project strongly emphasizes type safety: When writing code here you MUST:
- Distinctive: line 20
Use explicit type hints on all functions, methods, and variables.
- Distinctive: line 52
Threads: every run gets a unique thread ID.
≈ “Common” is an estimate: at least 1 in 5 of the 29,248 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md
Guidance for Claude Code when working in this repository.
Project
A GitHub analysis tool built with LangGraph and a configurable LLM provider (Ollama / Anthropic / HuggingFace). It exposes a set of CLI commands that run predefined analyses over GitHub data, with full conversation persistence via SQLite checkpointing.
Environment
- Install:
uv sync(add--devfor dev tools) - Required env:
GITHUB_TOKEN. Provider config (LLM_PROVIDER,ANTHROPIC_API_KEY, etc.) — see thellm-provider-setupskill. - CLI:
uv run repo-research --helplists all commands and flags. Don't duplicate that surface here. - Conversations persist to
~/.repo-research/conversations.db; each run prints a thread ID usable withresume/show.
Code Style and Type Safety
This project strongly emphasizes type safety. When writing code here you MUST:
- Use explicit type hints on all functions, methods, and variables.
- Model data with
pydantic.BaseModel(orTypedDict) — not rawdict. This applies to API I/O, tool params/results, config, and internal DTOs. - Stay compatible with
mypy --strict. - Validate at system boundaries (external APIs, user input, file I/O) using Pydantic.
from pydantic import BaseModel, Field
class RepositoryAnalysis(BaseModel):
repo_name: str = Field(..., description="Full repository name (owner/repo)")
stars: int = Field(ge=0)
topics: list[str] = Field(default_factory=list)Core Components
src/repo_research/main.py— Typer CLI entry point; builds the LangGraph, defines analysis prompts, streams responses, manages thread IDs.src/storage/conversations.py—ConversationStore, SQLite-backed conversation history with thread management.src/integrations/github/— GitHub integration:github_client.py— custom HTTP client (not PyGithub) for type safety and reduced deps.tools.py—GitHubToolsclass wrapping the client.adapter.py— LangGraph integration layer with Pydantic schemas.agent.py— LangGraph state machine config.models.py— Pydantic input models.churn_strategies.py,hotspot_tracker.py— hotspot analysis (seehotspot-analysisskill).
src/core/—models.py(Prompt types),prompts.py(command prompts:starred_pulse,topic_prompt,hotspot_analysis,run_diagnostic),config.py,llm.py.src/ui/— Gradio web UI (app.py,components.py,handlers.py).
Key Design Patterns
- Tool lifecycle:
@with_github_toolsdecorator ensures cleanup. - State: LangGraph manages conversation/tool state with SQLite checkpointing.
- Threads: every run gets a unique thread ID; resumable via CLI.
- Strategy pattern: pluggable churn calculations for hotspot analysis.
- Rate limiting: GitHub client handles backoff on rate limit responses.
Request flow
User prompt → LangGraph orchestrates LLM reasoning + tool calls → GitHub tools execute → results fed back to LLM for synthesis → streamed to user and persisted. Thread IDs let users resume multi-session investigations.
Tests
Live under tests/, mirroring src/ layout. Run with uv run pytest.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

