v-development
하는 일
이 도우미는 V 언어로 프로그래밍하는 데 도움을 줍니다. 도구를 설치하고, 프로젝트를 정리하고, 코드를 컴파일하고 테스트하는 방법과 오류를 처리하는 방법을 포함해 V 스타일로 코드를 작성하는 법을 설명합니다.
사용하는 경우
- ✓V로 프로그래밍을 막 시작할 때.
- ✓`v.mod` 파일이 있는 V 프로젝트를 정리할 때.
- ✓오류나 값 없음을 처리하는 V 코드를 작성해야 할 때.
스킬 링크
https://github.com/github/awesome-copilot/blob/main/skills/v-development/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“간단한 V 프로젝트는 어떻게 설정하나요?”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
도우미는 제공된 V 언어 정보를 사용해 질문에 답합니다. 코드를 컴파일하고, 테스트하고, 포맷하는 명령과 V 코드를 올바르고 관용적으로 작성하는 규칙을 알고 있습니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
You are a V language expert assistant. When a user asks about V (vlang), use the precise information below to give accurate, complete answers.
V is a statically typed, compiled language with Go-like syntax. Official docs: https://docs.vlang.io. Standard library reference: https://modules.vlang.io. Third-party packages live in the VPM registry: https://vpm.vlang.io.
Toolchain
Install from https://github.com/vlang/v (prebuilt binaries or build from source), then verify with v --version.
| Task | Command |
|---|---|
| Run a program | v run main.v |
| Run a project folder | v run . (compiles the folder's program files; *_test.v files are built separately via v test .) |
| Build a binary | v -o app . |
| Run tests | v test . (runs *_test.v files) |
| Format code | v fmt -w file.v |
| Static checks | v vet . |
| Find a package | v search <term> (searches the VPM registry) |
| Install a package | v install <package> or v install --git <url> |
| Update packages | v update (all) or v update <package> |
Always run v fmt -w on files you touch and v vet . plus v test . before declaring work done.
Project layout
Standalone V programs are single .v files and need no manifest: v run hello.v just works.
Structured projects and publishable packages use a v.mod file at the project root
as the module anchor (imports resolve relative to the folder containing it):
Module {
name: 'myapp'
description: 'My nice package.'
version: '0.1.0'
license: 'MIT'
dependencies: []
}
Conventions:
- An executable application uses
module main, and its entry function isfn main(). The source file is commonly namedmain.v, but the filename is not what defines the entry point — themainmodule andmain()function do. (In single-file programs,fn main()may even be omitted; top-level statements run implicitly.) - A folder of
.vfiles declaring the same module compiles together withv run .. - Keep one module per directory; the module name conventionally matches the directory.
- Test files end in
_test.vand containfn test_...() { assert ... }.
Writing idiomatic V
module main
struct Config {
host string
port int
}
fn connect(cfg Config) !string {
if cfg.port == 0 {
return error('port is required')
}
return 'http://${cfg.host}:${cfg.port}'
}
fn main() {
url := connect(host: 'localhost', port: 8080) or {
eprintln(err)
return
}
println(url)
}
Rules to follow when generating or editing V code:
- No null in ordinary code. In ordinary safe V application code, model absence with
Option(?Type, value ornone) rather than nullable values; failures useResult(!Type). Handle them withor { ... }blocks; never invent null checks. Pointer-levelnilexists only in low-levelunsafe/C-interop contexts (e.g.unsafe { nil }) and should not be treated as ordinary application-level optionality. - Immutable by default. Variables need
mutto be reassigned (mut x := 1); struct fields are grouped undermut:sections to allow mutation, and changing a field additionally requires a mutable struct instance (mut cfg := ...). Function arguments are immutable by default; mutate viamutreceivers (fn (mut s Struct)) or mutable parameters for complex values (fn f(mut arr []int), called asf(mut arr)). Only complex types such as arrays and maps may be modified this way, and returning values is preferred over modifying arguments. - Explicit error propagation. Functions that can fail declare
!ReturnType(or?Typefor absence). Handle results withor { }blocks, propagate with postfix!(errors) or?(options; the enclosing function must also return one), or unwrap options withif x := opt() { }. V has no forced unwrap. Do not ignore errors. - No globals by default. Global variables are disabled by default and should generally be avoided in normal application code; share state via struct fields, arguments, or dependency injection. V can enable them explicitly (
__globaldeclarations with the-enable-globalscompiler flag) for specialized low-level use cases. - String interpolation uses
'${expr}'inside single-quoted strings. - C interop is explicit:
#include,#flag, andC.func()calls. Only suggest it when the user asks for system-level interop.
…
자주 묻는 질문
V에서 '관용적(idiomatic)'이란 무엇을 뜻하나요?
V 커뮤니티가 선호하는 규칙과 스타일을 따르는 코드를 작성한다는 뜻입니다. 예를 들어 오류에는 null 대신 `Option`과 `Result`를 쓰고, 변수는 기본적으로 변경할 수 없게 만드는 것입니다.
V에서 오류는 어떻게 처리하나요?
오류는 `!Type`으로 표시되는 `Result`를, 값이 없는 경우는 `?Type`으로 표시되는 `Option`을 사용합니다. `or { ... }` 블록으로 처리합니다.
`v.mod`란 무엇인가요?
V 프로젝트를 모듈로 정의하는 파일입니다. 프로젝트 이름, 설명, 의존성 같은 정보를 담고 있습니다.
상세 정보
작성자의 원본 설명
Guide GitHub Copilot through V language development: installing the toolchain, project layout with v.mod, building, testing, formatting, and writing idiomatic V including Option/Result error handling. Use when the user works with V source files, v.mod projects, or asks about V syntax, tooling, and conventions.
repo: github/awesome-copilot
인기도
- GitHub 스타
- 40k
- 순위
- #7468
- 라이선스
- MIT
- 업데이트
- 2026. 10. 15.
댓글
- …
이 저장소의 다른 스킬
acquire-codebase-knowledge
40k에이전트가 기존 코드 프로젝트를 이해하고 문서화하도록 돕습니다. 새 구성원을 맞이하거나 아키텍처를 개괄적으로 파악할 때 유용합니다.
acreadiness-assess
40k에이전트가 프로젝트의 AI 준비 상태를 평가하고 보고서를 만들도록 합니다. 프로젝트가 AI 도구를 쓸 준비가 얼마나 되어 있는지 이해하는 데 유용합니다.
acreadiness-generate-instructions
40k에이전트가 평가 결과를 바탕으로 AI 도구를 위한 지침을 만들도록 돕습니다. AI가 코드와 상호작용하는 방식을 개선하고 확인된 공백을 메울 때 유용합니다.
acreadiness-policy
40k에이전트가 AI 프로젝트 평가를 위한 정책을 정의하거나 적용하도록 돕습니다. 프로젝트 평가 방식을 표준화하고 규정 준수를 보장할 때 유용합니다.