본문으로 건너뛰기
cccskills
무료GitHub에 공개

build-one-cc-file

Build a single C++ file. Use when a single .cc file needs to be compiled to check for errors.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(2)

  • SKILL.md3.3 KB
  • scripts/omake.sh2.0 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Build One C++ File

Use this skill when needing to compile one *.cc C++ file to check for errors. This provides a fast validation path without building the entire project.

Deterministic Rules

  • MUST run only from ${IMPALA_HOME}.
  • MUST configure the environment in the same shell session before building: export IMPALA_HOME=<git_repo_root> && cd "${IMPALA_HOME}" && source "${IMPALA_HOME}/bin/impala-config.sh" && source "${IMPALA_HOME}/bin/set-classpath.sh"
  • MUST use .agents/skills/build-one-cc-file/scripts/omake.sh as the only build command path.
  • MUST NOT use the agent's compile tool, Ninja, or direct CMake/Ninja invocation.

Available Scripts

  • .agents/skills/build-one-cc-file/scripts/omake.sh [--dry-run] <input> — builds the single object file for one C++ source.
    • Accepts a bare basename (rpc-trace).
    • --dry-run: prints the resolved make command on stdout and exits 0. Does not build.
    • Without --dry-run: runs the make command; exits 0 on success, non-zero on failure.
    • If no build target is found: exits non-zero (grep failure propagated via set -e).

Input Contract

Pass exactly one argument: the source basename only.

  • Input MUST be one token with no path separators.
  • Input MUST NOT include a directory path.
  • If input ends with .cc, strip .cc and continue.
  • Basename MUST match this pattern: [A-Za-z0-9_-]+
  • If validation fails, stop and request corrected input.

Examples:

  • Correct: .agents/skills/build-one-cc-file/scripts/omake.sh rpc-trace
  • Incorrect: .agents/skills/build-one-cc-file/scripts/omake.sh be/src/rpc/rpc-trace.cc
  • Incorrect: .agents/skills/build-one-cc-file/scripts/omake.sh rpc-trace.cc

If starting from a path like be/src/rpc/rpc-trace.cc, convert it to rpc-trace before invocation.

Execution Procedure

  1. Preflight and setup:
    • Ensure current directory is ${IMPALA_HOME}.
    • Ensure environment configuration has run in the current shell session.
  2. First attempt MUST use dry-run:
    • Run: .agents/skills/build-one-cc-file/scripts/omake.sh --dry-run <basename>
    • If dry-run fails, stop and report failure details.
  3. Execute real build after successful dry-run:
    • Run: .agents/skills/build-one-cc-file/scripts/omake.sh <basename>

Ambiguity Handling

If basename collision occurs (multiple candidate source files map to the same basename), do not guess.

  • MUST ask the user to clarify which source path to use.
  • MUST wait for clarification before running the real build command.

Failure and Retry Policy

On any failure:

  • MUST report the exact command run.
  • MUST report exit code.
  • MUST report the first non-empty line from stderr; if stderr is empty, first stdout line containing "error:"

Retry behavior:

  • MUST analyze the failure first.
  • MUST attempt a concrete fix (for example corrected basename input or environment setup).
  • MAY retry the real build (step 3) once after analysis and fix attempt.
  • MUST NOT perform blind repeated retries.

Success Output Contract

On success, report:

  • Normalized basename used.
  • Dry-run command and result.
  • Real build command and result.
  • Final exit code and success confirmation.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Combines all git commits for a change into a single commit and pushes it to gerrit. Use when you push to gerrit.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

apache/impala1.3천2026년 10월 15일 업데이트

apache의 스킬 모두 보기

이 스킬의 문제 신고