Skip to content

feat: cargo-review 스킬 추가 (Direct Skill)#10

Merged
bluejayA merged 2 commits into
mainfrom
feat/cargo-review-skill
Apr 6, 2026
Merged

feat: cargo-review 스킬 추가 (Direct Skill)#10
bluejayA merged 2 commits into
mainfrom
feat/cargo-review-skill

Conversation

@bluejayA
Copy link
Copy Markdown
Owner

@bluejayA bluejayA commented Apr 6, 2026

Summary

  • Rust 프로젝트의 코드 변경사항을 Correctness/Style/Suggestions 3개 축으로 구조화된 리뷰 리포트를 생성하는 Direct Skill 추가
  • skills/cargo-review/ 경로에 SKILL.md + references + assets 구조로 배치
  • Option A (Direct Skill Submission) 방식 — 별도 플러그인 repo 없이 마켓플레이스에 직접 등록

주요 기능

  • cargo test + clippy 자동 실행 및 결과 통합
  • 대규모 diff(100줄+) 시 서브에이전트 3개 병렬 리뷰 (Correctness/Style/Suggestions)
  • Refactor 포커스 모드 — 동작 보존 검증에 집중, Suggestions 생략
  • Cargo workspace 지원 — 변경된 crate만 대상으로 테스트
  • .cargo-review.toml로 test/clippy 커맨드, base branch 오버라이드
  • base branch 자동 감지 (origin/HEADmainmaster fallback)
  • CI/headless 모드 지원

파일 구조

skills/cargo-review/
├── SKILL.md                      # 스킬 정의 (228줄)
├── references/
│   └── agent-prompts.md          # 서브에이전트 프롬프트 정의
└── assets/
    └── report-template.md        # 리포트 출력 템플릿

Test plan

  • Skill Audit: Direct CI가 skills/** 변경을 감지하고 자동 실행되는지 확인
  • Audit 결과 PASSED 또는 PASSED with warnings 판정 확인
  • frontmatter 표준 필드(name, description, metadata) 준수 확인
  • SKILL.md 500줄 이하 확인

🤖 Generated with Claude Code

Rust 프로젝트의 코드 변경사항을 Correctness/Style/Suggestions
3개 축으로 구조화된 리뷰 리포트를 생성하는 스킬.

주요 기능:
- cargo test + clippy 자동 실행 및 결과 통합
- 대규모 diff(100줄+) 시 서브에이전트 병렬 리뷰
- Refactor 포커스 모드 (동작 보존 검증 집중)
- Cargo workspace 지원
- 커스텀 test/clippy 커맨드 오버라이드
- base branch 자동 감지

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 6, 2026

⚠️ Skill Audit Results (Direct Submission)

Verdict: PASSED_WITH_WARNINGS

모든 체크리스트와 대상 파일을 읽었습니다. 이제 전체 35개 규칙을 적용하여 감사를 수행합니다.


Skill Security Audit Report

Skill: cargo-review
Submitted by: bluejayA
Audit date: 2026-04-06
Ruleset version: v2.0.0 (sha: 31233dc)
Phase: 2
Verdict: ⚠️ PASSED with warnings

Summary

Severity Count
CRITICAL 0
HIGH 0
MEDIUM 1
EXEMPTED 0

Findings

🟡 MEDIUM — 참고 사항

[QUA-003] description 시작 형식

  • File: skills/cargo-review/SKILL.md:3
  • Evidence: description 값이 "Rust 프로젝트의 현재 변경사항을..." 으로 시작 — "Use when" 구문 없이 기능 설명이 먼저 옴
  • OWASP AST: —
  • Note: description은 "Use when" 형태로 시작해야 Claude Code의 CSO(Context-Sensitive Orchestration)가 적절한 시점에 스킬을 트리거할 수 있습니다. 현재 description 하단에 "Use when reviewing Rust code changes..." 구문이 있으나, 필드의 첫 문장이 아닌 두 번째 단락에 위치합니다. description 첫 줄을 "Use when reviewing Rust code changes before commit or PR." 로 시작하도록 순서를 조정하세요.

검사 세부 결과

Step 1: 대상 파일

파일 유형
skills/cargo-review/SKILL.md SKILL.md (구조·품질·보안)
skills/cargo-review/references/agent-prompts.md Markdown (보안 패턴)
skills/cargo-review/assets/report-template.md Markdown (자격증명 중심)

scripts/, *.sh, *.py, *.js, *.ts, Makefile, package.json 없음.

Step 2: 사양 준수 (SCH-*)

규칙 결과 비고
SCH-001 ✅ PASS cargo-review — kebab-case, 12자, 디렉토리명 일치
SCH-002 ✅ PASS description 존재, 약 280자(1024자 이하), "Use when" 구문 포함
SCH-003 ✅ PASS frontmatter 필드: name, description, metadata — 모두 허용 필드
SCH-004 ✅ PASS 230줄 / 추정 ~1,800 토큰 — 500줄/5,000 토큰 이하
SCH-005 ✅ PASS references/, assets/ — 인정 하위 디렉토리만 존재

Step 3: 메타데이터 무결성 (META-*)

규칙 결과 비고
META-001 ✅ PASS SOUL.md, MEMORY.md, CLAUDE.md 등 아이덴티티 파일 쓰기 지시 없음
META-002 ✅ PASS 제로폭 유니코드 문자 탐지 없음
META-003 ✅ PASS 코드 블록 외부 Base64 유사 문자열(40자+) 없음

Step 4: 보안 패턴 스캔

규칙 결과 비고
SEC-010 ✅ PASS ghp_, sk-, AKIA, AIza 등 API 키 없음
SEC-011 ✅ PASS BEGIN PRIVATE KEY 등 없음
SEC-013 ✅ PASS process.env 전체 덤프/외부 전송 없음
SEC-003 ✅ PASS curl|bash, wget|sh 없음 (CI 예시는 claude -p CLI 호출로 해당 없음)
SEC-030 ✅ PASS base64 -d | bash 등 없음
SEC-001 ✅ PASS git diff {base_branch}...HEAD, cargo test -p {crate} — 변수 삽입 패턴 확인. {base_branch}.cargo-review.toml 또는 git rev-parse 출력. Bash 셸 인젝션 경로(bash -c, shell=True)가 없고 명령 인자 수준 삽입이므로 SEC-001 CRITICAL/HIGH 조건 불충족
SEC-002 ✅ PASS eval(), exec(), new Function() 없음
SEC-012 ✅ PASS .env, credentials.json 등 민감 파일 참조 없음
SEC-020 ✅ PASS WebFetch, fetch(, curl, wget 직접 지시 없음
SEC-020H ✅ PASS 민감 데이터 외부 전송 지시 없음
SEC-022 ✅ PASS ssh, nc, netcat 등 독립 토큰 없음
SBX-001 ✅ PASS 스킬 디렉토리 외부 파일 쓰기 지시 없음
SBX-003 ✅ PASS ../../etc/passwd 등 경로 탈출 없음
SBX-004 ✅ PASS ~/.ssh, ~/.aws 등 홈 디렉토리 민감 경로 없음
SBX-007 ✅ PASS ~/.bash_history, security find-generic-password 없음
SBX-010 ✅ PASS allowed-tools 선언 없음. CI 예시의 --allowedTools "Bash,Read,Grep,Glob,Agent"Bash(*:*) 와일드카드 아님
SBX-011 ✅ PASS network: true 선언 없음
SBX-012 ✅ PASS **/*, ~/*, /etc/ 등 광범위 글로브 없음
SEC-040 ✅ PASS scripts/ 없음, yaml.load( 없음
SEC-041 ✅ PASS scripts/ 없음
DST-001 ✅ PASS rm -rf, rimraf, shutil.rmtree 없음
DST-007 ✅ PASS chmod 777, sudo, sysctl -w 없음
DST-003 ✅ PASS git push --force 없음
DST-002 ✅ PASS rm(단독) 없음

Step 5: 품질 검사 (QUA-*)

규칙 결과 비고
QUA-001 ✅ PASS SKILL.md 존재
QUA-002 ✅ PASS name, description 모두 존재
QUA-003 🟡 MEDIUM description이 "Rust 프로젝트의..." 로 시작, "Use when" 이 두 번째 단락
QUA-004 ✅ PASS ~280자 (1024자 이하)
QUA-005 ✅ PASS 230줄 (500줄 이하)
QUA-006 ✅ PASS references/agent-prompts.md, assets/report-template.md 참조, 2단계 중첩 없음
QUA-010 ✅ PASS 적절히, appropriately, as needed 등 모호 표현 없음
QUA-011 ✅ PASS description에 references/, dispatch, Step 1 등 내부 구현 키워드 없음

Step 6: audit-ignore

  • SKILL.md frontmatter에 audit-ignore 선언 없음 → 예외 처리 대상 없음

Step 8: Slack 알림

SLACK_WEBHOOK_URL 미설정 — 로컬 실행 (PASSED는 전송 대상 아님)


JSON 결과

{
  "version": "2.0.0",
  "phase": 2,
  "ruleset_sha": "31233dc",
  "skill": "cargo-review",
  "submitted_by": "bluejayA",
  "audit_date": "2026-04-06",
  "verdict": "PASSED_WITH_WARNINGS",
  "counts": {
    "critical": 0,
    "high": 0,
    "medium": 1,
    "low": 0,
    "exempted": 0
  },
  "findings": [
    {
      "id": "QUA-003",
      "severity": "MEDIUM",
      "file": "skills/cargo-review/SKILL.md",
      "line": 3,
      "evidence": "description starts with '\\nRust 프로젝트의 현재 변경사항을...' — 'Use when' not at first line",
      "owasp_ast": "",
      "fix": "Move 'Use when reviewing Rust code changes before commit or PR.' to the first line of the description field."
    }
  ]
}

요약: cargo-review 스킬은 CRITICAL/HIGH 이슈 없이 통과했습니다. MEDIUM 1건(QUA-003)은 description 필드의 첫 줄을 "Use when..." 형태로 재배열하면 해결됩니다. 머지 차단 없이 제출 가능합니다.

- README.md: GitHub 랜딩페이지 — 소개, 리포트 예시, 기능 요약
- references/examples.md: 5개 시나리오별 상세 입출력 예시
  (셀프 리뷰, 대규모 PR, 리팩토링, workspace, CI/headless)
- SKILL.md에 examples 참조 포인터 추가

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@bluejayA bluejayA merged commit d7fc399 into main Apr 6, 2026
2 of 4 checks passed
@bluejayA bluejayA deleted the feat/cargo-review-skill branch April 6, 2026 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant