GitHub
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
作者による説明(英語の原文)
Scan any codebase, generate CONVENTIONS.md, expose conventions as MCP tools for AI agents.
この3つを1つのスコアにまとめることはしません。意見、測定、人気はそれぞれ別のものだからです。
このサーバーのやさしい解説はまだ書いていません。以下はレジストリから読み取った事実です。
使っているAIアプリを選んで、設定をコピーしてください。
必要なもの
どのアプリを使っていますか?
上でアプリを選んでください。選んだアプリを覚えておくので、次からはボタンに「…にインストール」と表示されます。
Claude Desktop → Settings → Developer → Edit Config を開き、claude_desktop_config.json にこれを貼り付けます
{
"mcpServers": {
"patchwork": {
"command": "uvx",
"args": [
"patchwork-conventions"
]
}
}
}ターミナルでこれを実行します
claude mcp add patchwork -- uvx patchwork-conventionsプロジェクトの .cursor/mcp.json、または ~/.cursor/mcp.json に貼り付けます
{
"mcpServers": {
"patchwork": {
"command": "uvx",
"args": [
"patchwork-conventions"
]
}
}
}ブラウザがアプリを開いてよいか確認し、そのあとアプリが設定を表示して確認を求めます。キーの値は空欄のままなので、自分で入力してください。
プロジェクトの .vscode/mcp.json に貼り付けます
{
"servers": {
"patchwork": {
"type": "stdio",
"command": "uvx",
"args": [
"patchwork-conventions"
]
}
}
}ブラウザがアプリを開いてよいか確認し、そのあとアプリが設定を表示して確認を求めます。キーの値は空欄のままなので、自分で入力してください。
これはパソコンで動くサーバーですが、ChatGPTがつなげるのはインターネット上のサーバーだけです。ほかのアプリを選んでください。
選んだアプリは、この端末のCookieに保存されます。アカウントは不要です。
この設定は、作者のレジストリ登録情報から作成しています。READMEと違う場合は、READMEに従ってください。
パソコンで動くサーバーです。インストールすると、ツール一覧がAIアプリに表示されます。
誰でも見られる情報をチェックしており、コードは読んでいません。当てはまらない項目は数に入れていません。 · 2026年11月6日にチェック
レジストリ名は、リポジトリを所有するGitHubアカウント SaiNarayana-B で確認済みです
このリポジトリはまだGitHubから読み取っていません
このリポジトリはまだGitHubから読み取っていません
これはパソコンで動くため、インターネット上のエンドポイントはありません
パソコンで動き、代わりにローカルの設定を使います
パソコンで動くサーバーです。ツール一覧を読み取れるのは、インターネット上のエンドポイントがある場合だけです
レジストリでこのカテゴリにある有効なすべてのサーバーと比較しています。スターは、公開者がリポジトリの所有者である場合だけ数えます。
当てはまる基本チェック1項目のうち1項目に合格しました。コードは読んでいません。キーやトークンを追加する前に、サーバーがどんなアクセスを求めているかを確認し、必要な権限だけを持つキーを使ってください。
レジストリには必須のキーは載っていません。ただし、最初に使うときにサインインを求めるサーバーもあります。
あなたのパソコンで動きます。必要なときにAIアプリが起動し、データは作者のサーバーを通りません(サーバー自体がオンラインサービスを呼び出す場合を除きます)。
GitHubリポジトリの最終更新は–、最新バージョン(0.1.7)がレジストリに届いたのは4 か月前です。
Claude Desktop、Claude Code、Cursor、VS CodeなどのMCP対応アプリで使えます。パソコンにPython (uv)も必要です。
同じカテゴリには:GitHub, Desktop Commander, Cloudflare MCP
同じカテゴリで、ほかの作者が作ったサーバー。スターの多い順。
カードの見方:★ GitHubスターi3つの柱:レビュー · チェック · 利用状況i更新=最新バージョンをレジストリに公開した日i
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
MCP server for terminal commands, file operations, and process management
Cloudflare MCP servers
作者のリポジトリから書かれたとおりにコピーしたものです。PopNx MCPは内容を確認・推奨していません。HTML、画像、スクリプトは取り除いています。リンクはこのサイトの外へ移動します。
Mine your codebase. Generate CONVENTIONS.md. Stop AI agents from making up your style.
Every team that uses AI coding assistants hits the same wall: Claude writes `getUserById` in a codebase that uses `get_user_by_id`. Cursor creates `components/userCard.tsx` in a project that uses `user-card.tsx`. The agent invented a response shape that doesn't match the rest of the API.
You write a CLAUDE.md manually. It goes stale in two weeks. You write it again.
patchwork automates this. It scans your actual source code using AST analysis and detects what your team really does — not what you think you do.
| Category | What's mined |
|---|---|
| Naming | Functions, classes, variables, constants, files — with confidence score and real examples |
| Imports | Absolute vs relative, path aliases (@/, src/), barrel files, destructuring style |
| Structure | Source root, test layout, feature vs layer organisation, monorepo detection |
| Error Handling | try/except vs Result types, logging framework, custom exception naming, propagation style |
| Testing | Framework, assertion style, mocking library, coverage tool, fixture patterns |
| API Patterns | Response shape, route param style, ORM, async pattern, GraphQL/gRPC presence |
| Git Workflow | Commit message style, branch naming, co-change file pairs |
| Tech Stack | Frameworks, package manager, linters, formatters, type checker, build tool, scripts |
pip install patchwork-conventions
cd your-project patchwork scan
That's it. You'll get a CONVENTIONS.md like this:
# CONVENTIONS.md
Auto-generated by patchwork on 2026-06-25
Language: python Runtime: Python >=3.11 Package Manager: uv Frameworks: fastapi, sqlalchemy Linters: ruff Formatters: ruff, black
snake_case (97% consistent)get_user, parse_response, create_sessionPascalCase (100% consistent)UserService, AuthHandler, DatabaseClientSCREAMING_SNAKEMAX_RETRIES, API_BASE_URLsnake_case_test_Source root: src/ Organisation: layer-based Tests: separate (tests/)
Key directories:
src/ — source roottests/ — test suitemigrations/ — database migrationsstructlogValidationError, AuthError, NotFoundErrorassert(...)pytest-covfeat(auth): add JWT refresh, fix(api): handle null user
| Feature | patchwork | argus | sourcebook |
|---|---|---|---|
| AST-based naming analysis | ✅ tree-sitter | ❌ filesystem only | ❌ not done |
| Confidence scores | ✅ per-category | ❌ | ❌ |
| Real examples from your code | ✅ | ❌ | ❌ |
| Counter-examples (inconsistencies) | ✅ | ❌ | ❌ |
| Error handling pattern mining | ✅ | ❌ | ❌ |
| API response shape detection | ✅ | ❌ | ❌ |
| Co-change file pairs | ✅ | ❌ | ✅ |
Convention checking (check cmd) | ✅ | ❌ | ❌ |
| MCP server with 8 tools | ✅ | ❌ | ✅ (4 tools) |
| Watch mode | ✅ | ✅ (sync) | ✅ |
| Zero LLM required | ✅ | ✅ | ✅ (layer A) |
| Open source / MIT | ✅ | ✅ | ❌ BSL |
# Generate CONVENTIONS.md
patchwork scan
patchwork scan /path/to/project
patchwork scan --agents-md
patchwork scan --claude-md
patchwork scan --json
patchwork scan --stdout
patchwork scan --lang python --lang typescript
patchwork update
patchwork diff
patchwork show
patchwork watch
patchwork serve --stdio # for Claude Code patchwork serve --port 3742 # HTTP mode
patchwork scan # run once
patchwork scan --claude-md
Claude Code — add to ~/.claude.json (or run claude mcp add interactively):
{
"mcpServers": { "patchwork": { "command": "patchwork", "args": ["serve", "/path/to/your/project", "--stdio"] } } }
Claude Desktop — add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": { "patchwork": { "command": "patchwork", "args": ["serve", "/path/to/your/project", "--stdio"] } } }
Cursor — add to .cursor/mcp.json in your project root:
{
"mcpServers": { "patchwork": { "command": "patchwork", "args": ["serve", ".", "--stdio"] } } }
Then your AI agent can use 8 on-demand tools:
| Tool | When to use |
|---|---|
patchwork_scan | Get complete conventions overview |
patchwork_naming | Before writing new identifiers |
patchwork_structure | Before creating new files/directories |
patchwork_stack | When choosing libraries or commands |
patchwork_errors | Before writing error handling |
patchwork_testing | Before writing test files |
patchwork_git | Before writing commit messages |
patchwork_check | Validate a proposed name |
Copy SKILL.md from this repo to ~/.claude/skills/patchwork/SKILL.md to get /patchwork slash commands.
# Keep CONVENTIONS.md updated as you code
patchwork watch &
patchwork diff || (patchwork update && git add CONVENTIONS.md && git commit -m "chore: update conventions")
from patchwork import scan
from patchwork.scanner import ScanOptions from pathlib import Path
report = scan(ScanOptions(root=Path(".")))
print(report.to_markdown())
import json data = json.loads(report.to_json())
naming = report.naming.get("python") print(f"Functions: {naming.functions.style} ({naming.functions.confidence:.0%})") print(f"Examples: {naming.functions.examples}")
structure = report.structure print(f"Source root: {structure.source_root}") print(f"Organisation: {structure.organisation}")
| Language | AST (tree-sitter) | Fallback regex |
|---|---|---|
| Python | ✅ full | ✅ |
| TypeScript | ✅ full | ✅ |
| JavaScript | ✅ full | ✅ |
| Go | ✅ (with full extra) | ✅ |
| Rust | ✅ (with full extra) | ✅ |
| Java | ✅ (with full extra) | ✅ |
| Ruby, PHP, C#, C++ | ❌ | ✅ regex only |
Install full language support:
pip install 'patchwork-conventions[full]'
your codebase
│ ▼ ConfigDetector ← reads package.json, pyproject.toml, go.mod, Cargo.toml │ ▼ File discovery ← respects .gitignore, skips node_modules etc. │ ▼ Per-language AST ← tree-sitter parses every file into a syntax tree │ ├── NamingMiner → extracts function/class/variable names, classifies style ├── ImportMiner → detects import patterns, aliases, barrel files ├── StructureMiner → analyses directory layout, test co-location ├── ErrorHandlingMiner → detects try/catch patterns, logging, custom exceptions ├── TestingMiner → identifies framework, assertion style, mocking ├── APIPatternMiner → finds response shapes, ORMs, route styles └── GitPatternMiner → mines commit history, branches, co-change pairs │ ▼ ConventionReport │ ├── CONVENTIONS.md (default) ├── AGENTS.md (--agents-md) ├── CLAUDE.md (--claude-md, appends) └── JSON (--json)
All analysis is 100% local — no API calls, no telemetry, no data leaves your machine.
On a 1,000-file TypeScript monorepo:
On a 500-file Python project:
Results are deterministic — same codebase always produces the same output.
git clone https://github.com/yourusername/patchwork
cd patchwork pip install -e '.[dev]' pytest
Pull requests welcome. See CONTRIBUTING.md.
MIT — free for personal and commercial use.
claude-code · agent-skills · mcp · context-engineering · hallucination-detection · code-conventions · static-analysis · tree-sitter · developer-tools · ai-coding