Перейти к основному содержимому

Lang Cpp

Navigate, build, and test C/C++ via CMake tooling.

Skill metadata​

SourceBundled (installed by default)
Pathskills/software-development/lang-cpp
Version1.1.0
AuthorVibeOS
LicenseMIT
Platformslinux, macos, windows

Reference: full SKILL.md​

к сведению

The following is the complete skill definition that VibeOS loads when this skill is triggered. This is what the agent sees as instructions when the skill is active.

C / C++ Language Pack Skill

Drive C / C++ work with the project index and standard CLI recipes. LSP hint: clangd (editor-side when applicable). Zero new core tools.

What this language is (beginner)​

Низкоуровневые языки систем и производительности. C — основа ОС/embedded; C++ — игры, движки, high-perf.

Лучше всего для:

  • embedded / драйверы / ОС-близкий код
  • игровые движки и realtime
  • высокопроизводительные библиотеки
  • интеграция с существующим C/C++ кодом

When to Use​

Выбирай этот pack, если:

  • есть CMakeLists.txt / compile_commands.json
  • нужен максимальный контроль памяти и скорости
  • пользователь явно просит C/C++

Manifests (автодетект репозитория): CMakeLists.txt, compile_commands.json

Обычно рядом: Часто FFI в Python/Rust/Go; clangd нужен compile_commands.json.

См. также skill choose-language-pack, если цель ещё не ясна.

When NOT to use​

  • безопасный системный код с современным tooling → Rust / Zig
  • обычный веб/API → Go / TypeScript / Python
  • мобильные приложения → Kotlin / Swift / Flutter

Prerequisites​

vibeos pack apply lang-cpp --apply
vibeos pack apply project-intelligence --apply

How to Run​

vibeos project index build
cmake -S . -B build -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
cmake --build build
ctest --test-dir build

Quick Reference​

GoalCommand
Apply packvibeos pack apply lang-cpp --apply
Doctorvibeos language doctor cpp
Primary testctest --test-dir build
Choose guideskill choose-language-pack

Procedure​

  1. Если язык ещё не выбран для нового проекта — сначала choose-language-pack.
  2. Work from the project root that matches pack manifests.
  3. Index query → read_file → edit → path-scoped tests when iterating.
  4. Prefer the package manager / toolchain already locked in the repo.
  5. Explain non-obvious toolchain choices in plain language for the user.

Pitfalls​

  • Makefile alone is not a pack match (too many false positives).
  • Generate compile_commands.json for good clangd.
  • Do not invent core tools; stay on terminal + read_file + index CLI.

Verification​

vibeos language doctor cpp
cmake --build build