Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wisdom",
"version": "3.0.0",
"version": "3.0.1",
"owner": {
"name": "cmj",
"url": "https://github.com/cmj0121"
Expand All @@ -9,7 +9,7 @@
{
"name": "wisdom",
"description": "Single-purpose skills to plan, build, review and ship software, led by smith.",
"version": "3.0.0",
"version": "3.0.1",
"source": "./plugins/wisdom"
}
]
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ other skills in turn. Every skill also works on its own.
| `audit` | Audit dependencies for known vulnerabilities and staleness | `audit deps` |
| `ops` | Review operational readiness before a release | `ops review` |
| `challenge` | Argue against a plan and name its blind spots | `tenth man` |
| `lsp` | Say whether the repo needs a language server, and which | `need lsp` |

### Output

Expand Down
1 change: 1 addition & 0 deletions README.zh-TW.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ v3 從零重寫,圍繞三條規則。
| `audit` | 稽核相依套件的已知漏洞與過期版本 | `audit deps` |
| `ops` | 發佈前審查維運就緒程度 | `ops review` |
| `challenge` | 反對一項計畫,點出其盲點 | `tenth man` |
| `lsp` | 判斷專案是否需要 language server | `need lsp` |

### 輸出

Expand Down
2 changes: 1 addition & 1 deletion plugins/wisdom/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "wisdom",
"description": "Single-purpose skills to plan, build, review and ship software, led by smith.",
"version": "3.0.0",
"version": "3.0.1",
"license": "MIT",
"author": {
"name": "cmj",
Expand Down
67 changes: 67 additions & 0 deletions plugins/wisdom/skills/lsp/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
---
name: lsp
description: Checks whether a repo is large and typed enough for a language server to pay off, and names the official LSP plugin to enable. Use before heavy code work.
license: MIT
metadata:
shortcut: "need lsp"
---

# LSP

Decide whether enabling a language server is worth it for this repo. A language server gives
the agent go-to-definition, find-references and post-edit diagnostics: fewer broad greps and
whole-file reads, and type errors caught before a build. It only pays off where there is
enough typed code to navigate. Report — never install a plugin, a binary or a setting.

## Steps

1. **Count source files** per language with `git ls-files`, so vendored and ignored files
stay out. Map extensions with the table below; anything else is not a candidate.

| Language | Extensions | Plugin | Binary |
| -------- | --------------------- | ------------------- | ---------------------------- |
| TS / JS | `.ts .tsx .js .jsx` | `typescript-lsp` | `typescript-language-server` |
| Python | `.py .pyi` | `pyright-lsp` | `pyright-langserver` |
| Go | `.go` | `gopls-lsp` | `gopls` |
| Rust | `.rs` | `rust-analyzer-lsp` | `rust-analyzer` |
| C / C++ | `.c .h .cpp .cc .hpp` | `clangd-lsp` | `clangd` |
| C# | `.cs` | `csharp-lsp` | `csharp-ls` |
| Java | `.java` | `jdtls-lsp` | `jdtls` |
| Kotlin | `.kt .kts` | `kotlin-lsp` | `kotlin-lsp` |
| Swift | `.swift` | `swift-lsp` | `sourcekit-lsp` |
| Ruby | `.rb .rake .erb` | `ruby-lsp` | `ruby-lsp` |
| PHP | `.php` | `php-lsp` | `intelephense` |
| Lua | `.lua` | `lua-lsp` | `lua-language-server` |

Plugins come from the `claude-plugins-official` marketplace. If its catalogue is cached
locally, check it for the current names before trusting this table.

2. **Judge each language.** Worth it when the language has **100 or more** files, or fewer
but one package with deep cross-file calls (a monorepo of small files counts). Not worth
it for a repo that is mostly Markdown, YAML or shell, or for a language under 20 files.
The numbers are a rule of thumb; say so when a language sits near them.

3. **Check what is already on.** For each worth-it language:
- **Plugin enabled:** `<plugin>@claude-plugins-official` is `true` under `enabledPlugins`
in `~/.claude/settings.json`, `.claude/settings.json` or `.claude/settings.local.json`.
An `LSP` tool in this session means at least one server is loaded.
- **Binary installed:** `command -v <binary>`. The plugin does not ship it; without it
the plugin loads and reports "Executable not found in $PATH" under `/plugin` → Errors.

## Output

One row per language that has any files, largest first:

| Language | Files | Worth it? | Plugin | Enabled | Binary |
| -------- | ----- | --------- | ------ | ------- | ------ |

Then, for each worth-it language not fully on, the missing steps only:

```text
/plugin install <plugin>@claude-plugins-official
```

and that `<binary>` must be installed on `PATH` with the language's own toolchain — see the
plugin's README. Restart the session after enabling so the server loads.

End with one sentence: enable LSP for which languages, or not needed and why.
Loading