Vscode

From G1Joshi/Agent-Skills · View interactive version

Vscode is an AI agent skill from the GitHub repository G1Joshi/Agent-Skills. Expert Visual Studio Code assistance covering settings.json, launch.json debugging, tasks.json automation, dev containers, and workspace extensions. Use when configuring VS Code environments, setting up multi-language debuggers, automating tasks, or configuring devcontainer environments.

How to use this skill

Skill file

Visual Studio Code

Visual Studio Code is a versatile, lightweight code editor offering rich language ecosystems, built-in debugging, source control integration, and Dev Container support.

When to Use

Quick Start

// .vscode/settings.json
{
  "editor.formatOnSave": true,
  "editor.defaultFormatter": "esbenp.prettier-vscode",
  "files.autoSave": "onFocusChange"
}

Core Concepts

Enterprise Workspace Settings (`.vscode/settings.json`)

Standardizing format-on-save, linter integrations, and search exclusions:

{
  "editor.formatOnSave": true,
  "editor.defaultFormatter": "esbenp.prettier-vscode",
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": "explicit",
    "source.organizeImports": "explicit"
  },
  "editor.fontFamily": "'JetBrains Mono', 'Fira Code', monospace",
  "editor.fontLigatures": true,
  "editor.tabSize": 2,
  "files.trimTrailingWhitespace": true,
  "files.insertFinalNewline": true,
  "files.exclude": {
    "**/.git": true,
    "**/.svn": true,
    "**/.DS_Store": true,
    "**/node_modules": true
  },
  "search.exclude": {
    "**/dist": true,
    "**/build": true,
    "**/.next": true
  }
}

Full-Stack Debugging Configuration (`.vscode/launch.json`)

Debugging Next.js server and client simultaneously:

{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "Next.js: Node Server",
      "type": "node",
      "request": "launch",
      "command": "npm run dev",
      "serverReadyAction": {
        "pattern": "- Local:.+(https?://.+)",
        "uriFormat": "%s",
        "action": "debugWithEdge"
      }
    },
    {
      "name": "Next.js: Chrome Client",
      "type": "chrome",
      "request": "launch",
      "url": "http://localhost:3000",
      "webRoot": "${workspaceFolder}"
    }
  ],
  "compounds": [
    {
      "name": "Full-Stack Next.js",
      "configurations": ["Next.js: Node Server", "Next.js: Chrome Client"]
    }
  ]
}

Recommended Team Extensions (`.vscode/extensions.json`)

Prompting developers to install essential project plugins:

{
  "recommendations": [
    "esbenp.prettier-vscode",
    "dbaeumer.vscode-eslint",
    "ms-azuretools.vscode-docker",
    "github.copilot",
    "eamodio.gitlens"
  ]
}

Common Patterns

Dev Container Configuration

Problem: Standardize development environment across entire team inside Docker.

Solution: Define .devcontainer/devcontainer.json.

{
  "name": "Node & TypeScript Container",
  "image": "mcr.microsoft.com/devcontainers/typescript-node:20",
  "customizations": {
    "vscode": {
      "extensions": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode"],
      "settings": {
        "editor.formatOnSave": true
      }
    }
  },
  "forwardPorts": [3000]
}

Workspace Tasks Automation (.vscode/tasks.json)

Problem: Run build or test scripts via standard Ctrl + Shift + B build shortcut.

Solution: Configure tasks.json.

{
  "version": "2.0.0",
  "tasks": [
    {
      "type": "npm",
      "script": "build",
      "group": { "kind": "build", "isDefault": true },
      "problemMatcher": ["$tsc"]
    }
  ]
}

Best Practices

Do:

Don't:

Troubleshooting

| Error | Cause | Solution |

| --------------------------------------- | ------------------------------------------------------------------- | -------------------------------------------------------------------------------- |

| Format on save not executing | Multiple formatters installed without default specified | Set "editor.defaultFormatter" explicitly in settings.json. |

| Remote - SSH disconnects frequently | Keepalive packets timing out over unstable connection | Add "ServerAliveInterval 60" to ~/.ssh/config for target host. |

| High CPU usage by Code Helper or rg | Searching or watching ignored folders like node_modules or .git | Add paths to "files.watcherExclude" and "search.exclude" in settings.json. |

References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.