lsp-setup
Skill50 starsChanged 16 days agoMITView on GitHub
Set up Language Server Protocol (LSP) servers for Copilot CLI by detecting the repository language stack, selecting trusted servers, and merging user or project configuration. Use when the user asks to install or configure a language server, enable code intelligence, or diagnose missing CLI definitions, references, hover, or rename support, including warnings from .memory/lsp-status.md. Do not use for routine coding, VS Code or other editor language-service configuration, MCP setup, or static-analysis indexing.
We split this skill into the rules it gives an agent
11 rules. 0 are common, 7 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 5 edited versions we read keep these.
7
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 15
Read .memory/lsp-status.md if present.
- Distinctive: line 18
If the required languages already have working servers, report that no changes are needed.
- Distinctive: line 23
If no stack can be established and the user has neither requested setup nor explicitly selected languages, defer setup without installing …
- Distinctive: line 24
If the user explicitly requests setup in a repository with no stack evidence, ask which languages they intend to use.
- Distinctive: line 33
If a server or platform is unsupported or cannot be verified, explain the limitation and leave that language unchanged.
- Very specific: line 44
Prefer the existing project configuration location when updating project settings.
- Distinctive: line 50
Run only approved installation commands.
- Very specific: line 57
Ask the user to run /lsp reload in Copilot CLI to load the updated configuration, then /lsp to inspect effective server status.
- Very specific: line 58
Run /lsp test SERVER-NAME for each configured server, or ask the user to run it and provide the result.
- Distinctive: line 65
Use the following structure as a template, replacing placeholders with verified values:
- Distinctive: line 81
Use server keys containing only alphanumeric characters, underscores, and hyphens.
“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
LSP Setup for Copilot CLI
Configure language servers for the languages actually used in the repository. Keep installation and configuration changes subject to explicit approval.
Workflow
1. Establish client and current state
- Confirm that the target is Copilot CLI. If the request concerns VS Code language services, explain that CLI LSP configuration does not configure the editor and direct the user to the relevant language extension.
- Read
.memory/lsp-status.mdif present. Treat it as a session-start snapshot of configuration file presence, not server health or language coverage. - Inspect
.github/lsp.jsonand~/.copilot/lsp-config.jsonwhen present and access is permitted. Use/lspoutput to identify effective servers, including plugin-provided ones. Ask the user to run interactive slash commands if the current tools cannot execute them. - Resolve configuration precedence by server name: project configuration overrides plugin configuration, which overrides user configuration. Preserve unrelated entries and intentionally disabled servers. Report malformed configuration before attempting a merge.
- If the required languages already have working servers, report that no changes are needed. If an existing server fails, diagnose its configuration or startup error before proposing another installation.
2. Detect and confirm the language stack
- Inspect build/dependency manifests and source file extensions, excluding DevSquad scaffolding, documentation examples, templates, vendored dependencies, generated files, and build output. Do not infer a language from documentation examples alone.
- If no stack can be established and the user has neither requested setup nor explicitly selected languages, defer setup without installing software or creating configuration. Envisioning, specification, and planning can proceed without LSP. Revisit setup when implementation introduces source files or manifests.
- If the user explicitly requests setup in a repository with no stack evidence, ask which languages they intend to use. Do not choose the application stack on their behalf. If they already explicitly chose languages, offer optional setup for those languages with approval.
- For polyglot repositories, identify the languages with meaningful source presence and any subproject roots.
- Present the evidence or explicitly chosen languages and proposed language set. Confirm which languages the user wants supported before making changes.
3. Resolve trusted servers and installation methods
- Determine the host OS, available package managers, existing server binaries, and required language runtimes.
- Select a maintained server for each confirmed language using official server and ecosystem documentation. Resolve the package name, supported runtime versions, installation method, and exact stdio launch command from those sources.
- Reuse an existing compatible installation. Do not assume every server accepts
--stdio, invent package names, or install a new package manager without separate approval. - If a server or platform is unsupported or cannot be verified, explain the limitation and leave that language unchanged. Offer a documented alternative when available.
4. Choose scope and approve the change
Present the available scopes and ask the user to choose:
Scope Location Effect Project .github/lsp.jsonShared with repository contributors; each machine still needs the server installed User ~/.copilot/lsp-config.jsonApplies to this user's projects on this machine - Prefer the existing project configuration location when updating project settings. Check current CLI documentation before changing a legacy root-level
lsp.json; do not create a second competing project configuration silently. - Explain overrides, disabled entries, and portability constraints. Keep machine-specific absolute paths and secrets out of shared configuration. Changing an intentionally disabled server requires explicit approval.
- Show the exact installation commands and proposed configuration changes. Obtain approval before installing software, updating an existing server entry, or writing configuration. Do not modify application dependency manifests merely to install development language servers.
5. Install and merge configuration
- Run only approved installation commands. On failure, report the actual error and request approval for any alternative command; do not silently switch installers or elevate privileges.
- Confirm that the server executable is accessible in the environment that launches Copilot CLI (
command -von POSIX orGet-Commandon PowerShell). - Re-read the destination before writing. Add or update only approved keys under
lspServers, preserving other servers and fields. If the file changed since approval, reconcile the new content before proceeding. - Validate the resulting JSON and required server fields. Use the server's documented arguments and language IDs. For monorepos, set
rootUriwhen the server needs a subproject root.
6. Reload and verify runtime behavior
- Ask the user to run
/lsp reloadin Copilot CLI to load the updated configuration, then/lspto inspect effective server status. Check/lsp helpif the installed CLI does not support reload; restart only when required by that version. - Run
/lsp test SERVER-NAMEfor each configured server, or ask the user to run it and provide the result. Inspect/lsp logswhen startup fails. - Verify a definition or reference lookup on a known symbol in a saved source file of each configured language. If source files do not exist yet, defer this check without creating application code solely for verification. A reachable executable and valid JSON alone do not establish working code intelligence.
- Report configuration validity, server startup results, and code-navigation verification separately. For an explicitly chosen stack without code, state that navigation verification is pending until source files exist; startup may also remain unverified if the server requires project files. Report failures and checks awaiting user execution without claiming fully working code intelligence.
- Explain that
.memory/lsp-status.mdrefreshes at the next session start. Do not treat its older snapshot as the result of/lsp reload.
Configuration Shape
Use the following structure as a template, replacing placeholders with verified values:
{
"lspServers": {
"server-name": {
"command": "server-binary",
"args": ["documented-stdio-argument"],
"fileExtensions": {
".ext": "language-id"
}
}
}
}- Use server keys containing only alphanumeric characters, underscores, and hyphens.
- Map extensions, including the leading dot, to the server's supported language IDs. Omit
argsor use an empty array when no arguments are required. - Preserve optional fields such as
env,rootUri,initializationOptions, and timeouts when merging. Follow current CLI documentation for supported fields. - Preserve entries such as
"server-name": { "disabled": true }unless the user approves enabling or replacing them. - Consult GitHub's LSP setup documentation and LSP configuration precedence for current client behavior.
Other versions6 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 6
- github/awesome-copilot★ 41ksame name
- Cogni-AI-OU/cogni-ai-agent-skills★ 4same name
- wjgoarxiv/litopencode★ 2same name
- ReaperOAK/ForgeOS★ 0same name
- Robbyfree24/ai-dev-pipeline-★ 0same name
- trac3r00/agent-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository26 other files it gives its agents.
- .github/copilot-instructions.mdCopilot instructions
- .github/plugins/devsquad/hooks/templates/.github/copilot-instructions.mdCopilot instructions
- adr-workflowSkill
- board-configSkill
- complexity-analysisSkill
- debugging-recoverySkill
- deep-clarificationSkill
- diagram-designSkill
- documentation-styleSkill
- domain-glossarySkill
- engineering-practicesSkill
- git-branchSkill
- git-commitSkill
- harness-learningsSkill
- init-configSkill
- init-docsSkill
- init-scaffoldSkill
- next-taskSkill
- pull-requestSkill
- quality-gateSkill
- reasoningSkill
- security-reviewSkill
- test-disciplineSkill
- triage-workflowSkill
- work-item-creationSkill
- work-item-workflowSkill
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.

