Skip to content
Back to skills

1493 Lsp Diagnostics D41b49a4

BSecurity

TunaCode provides automatic LSP diagnostics feedback when files are written or updated.

  • 9 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 11, 2026
developmentjavascripttypescriptpythonrustgojavadebugging

Works with

  • cli

Security analysis

B84/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro shows the line behind each finding and how to fix it

Scanned October 11, 2026

npx -y skills add tools-only/X-Skills --skill 1493-lsp-diagnostics_d41b49a4 --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 1493 Lsp Diagnostics D41b49a4?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for 1493 Lsp Diagnostics D41b49a4
[![Security: B — Skills Directory](https://www.skillsdirectory.com/api/skills/tools-only-1493-lsp-diagnostics-d41b49a4/badge)](https://www.skillsdirectory.com/skills/tools-only-1493-lsp-diagnostics-d41b49a4)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

SKILL.md
---
summary: |
  LSP diagnostics provide automatic feedback when files are written or updated.
  Language servers (ruff, tsserver, etc.) check code and report errors/warnings
  as part of the tool result. The agent receives this context and decides how
  to respond.
when_to_read: |
  - When you want to enable or configure LSP diagnostics
  - When adding support for a new language
  - When debugging why diagnostics are not appearing
  - When understanding the architecture of LSP integration
---

# LSP Diagnostics

TunaCode provides automatic LSP diagnostics feedback when files are written or updated.

## File Map

```
tools/
├── lsp/                          # LSP implementation (tools layer)
│   ├── __init__.py               # get_diagnostics(), format_diagnostics()
│   ├── client.py                 # LSPClient - JSON-RPC over stdio
│   └── servers.py                # Server command mapping by extension
├── write_file.py                 # Calls tools.lsp after writing
└── update_file.py                # Calls tools.lsp after updating
```

## How It Works

When `write_file` or `update_file` tools are called:
1. File operation completes
2. Language server spawns (ruff, tsserver, gopls, etc.)
3. Diagnostics fetched for the file
4. Results appended to tool output

## Configuration

Enable/disable in `~/.tunacode/config.yaml`:

```yaml
settings:
  lsp:
    enabled: true
    timeout: 5.0
```

## Requirements

Install language servers for your languages:

- **Python**: `pip install ruff`
- **TypeScript/JavaScript**: `npm install -g typescript-language-server`
- **Go**: `go install golang.org/x/tools/gopls@latest`
- **Rust**: `rustup component add rust-analyzer`

## Output Format

```
<file_diagnostics>
ACTION REQUIRED: 2 error(s) found - fix before continuing
Error (line 15): undefined name 'x'
Error (line 23): missing return statement
</file_diagnostics>
```

The agent receives this as contextual feedback and decides how to respond.

## Architecture

LSP lives in `tools/lsp/` as a tool-layer concern:
- `tools.lsp.get_diagnostics()` - fetch diagnostics
- `tools.lsp.format_diagnostics()` - format for output
- `tools.write_file` and `tools.update_file` call these automatically

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.