Community라이팅 & 에디팅github.com

trailofbits/code-improver

지정된 리뷰어(설치된 스킬 또는 에이전트)를 사용하여 모든 코드 대상(스킬, 플러그인, 모듈, 디렉토리)에 대해 자동 리뷰-수정 개선 루프를 실행합니다. 교차 라운드 결과 원장을 유지하고, 수정이 수렴되지 않을 때 에스컬레이션하며, 범위를 기계적으로 보호합니다. '이 코드가 리뷰를 통과할 때까지 개선해줘', '<리뷰어>로 개선 루프 실행' 같은 요청 시 사용합니다. 스킬에는 skill-improver, 브랜치에는 pr-improver 사용을 권장합니다.

code-improver란 무엇인가요?

Code Improver는 사용자가 지정한 리뷰어(설치된 스킬 또는 에이전트)를 활용하여 코드 대상에 대한 반복적인 리뷰-수정 루프를 자동화하는 AI 에이전트 스킬입니다. 이 스킬은 Claude Code, Codex, Cursor 등 다양한 AI 에이전트 플랫폼에서 사용할 수 있도록 설계되었으며, `/code-improver:improve` 명령어로 시작됩니다. 주요 기능으로는 교차 라운드 결과 원장 관리, 수렴 실패 시 자동 에스컬레이션, 엄격한 범위 보호 메커니즘을 제공합니다. 워크플로우는 리뷰어가 더 이상 중요한 문제를 발견하지 않을 때까지 최대 5라운드(사용자 설정 가능) 동안 리뷰, 수정, 재리뷰를 반복합니다. 리뷰어를 명시적으로 지정해야 하며 기본값이 없고, 대상 디렉토리와 작업 범위를 명확히 설정해야 합니다. 수렴, 한도 도달, 에스컬레이션 또는 중단 상태를 명확히 보고하며, 사용자 개입이 필요한 경우에만 중단됩니다. 이 스킬은 단순한 일회성 리뷰가 아닌 반복적인 개선이 필요한 상황에 최적화되어 있습니다.

지원 대상✓Claude Code✓Codex CLI~Cursor
npx skills add https://github.com/trailofbits/skills/tree/main/plugins/code-improver/skills/code-improver

Installed? Explore more 라이팅 & 에디팅 skills: steipete/notion, langchain-ai/langchain, bytedance/podcast-generation · View all 6 →

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

Code Improver

/code-improver:improve를 실행하여 모든 코드 대상을 개선하세요 — 리뷰어와 수정 에이전트를 루프로 실행하여 리뷰에서 중요/주요 문제가 0건 보고될 때까지 반복한 후, 자신의 잔여물을 제거하는 동적 워크플로우입니다. 루프, 원장 및 보호 메커니즘은 워크플로우 내에 있습니다. 이 스킬은 일반 진입점에 필요한 세 가지 입력을 수집하고 결과를 전달합니다.

루프 시작

사용자가 제공한 내용: $ARGUMENTS (비어 있으면 대화에서 세부 정보를 가져옵니다).

1. 세 가지 필수 입력 수집 — 추측 금지

  1. 대상(Target): 개선할 디렉토리의 절대 경로. 상대 경로는 작업 디렉토리를 기준으로 확인하고, 디렉토리가 존재하는지 확인합니다.
  2. 리뷰어(Reviewer): 모든 리뷰를 수행하는 설치된 스킬 또는 에이전트. 사용자가 이름을 지정해야 하며 — 기본값이나 번들 리뷰어는 없습니다. 유형을 결정합니다:
    • 네임스페이스 에이전트 (예: plugin-dev:skill-reviewer) → "kind": "agent"
    • 설치된 스킬 (예: pr-review-toolkit:review-pr) → "kind": "skill" 이름이 둘 중 하나일 수 있는 경우 세션의 스킬 목록을 확인합니다. 여전히 모호하면 사용자에게 질문합니다. 리뷰어가 지정되지 않은 경우 질문하세요 — 직접 선택하지 마십시오.
  3. 범위(Scope): 루프가 수정할 수 있는 저장소 상대 글로브(globs). 일반 진입점에서는 이를 명시적으로 요구합니다. 사용자가 제공하지 않은 경우 대상 디렉토리(<repo-relative-target>/**)를 제안하고 실행 전에 확인합니다.

2. 루프 스크립트 확인

루프는 이 플러그인의 동적 워크플로우 workflows/improve.js입니다. 경로로 실행합니다: scriptPath는 확인된 절대 경로를 사용하고, Workflow 도구의 name은 내장 및 프로젝트 워크플로우를 확인하므로 마켓플레이스에서 설치된 것이 code-improver:improve에 응답하지 않을 수 있습니다. 순서대로 시도하며 먼저 성공하는 것을 사용합니다 — 홈 디렉토리가 .보다 우선하므로 설치된 복사본이 이 마켓플레이스 체크아웃보다 우선합니다:

  1. Bash: ls -d -- "${CLAUDE_PLUGIN_ROOT}/workflows/improve.js"
  2. Bash: ls -d -- "${CODEX_PLUGIN_ROOT}/workflows/improve.js" (해당 변수가 설정된 경우)
  3. Bash: find ~/.claude ~/.codex . -maxdepth 7 -path '*/code-improver/workflows/improve.js' -print -quit 2>/dev/null

출력된 경로를 그대로 사용합니다. 해당 플러그인 디렉토리 — /workflows/improve.js가 제거된 경로 — 는 pluginRoot입니다. 세 가지 모두 비어 있으면 {name: "code-improver:improve"}를 한 번 시도합니다. 사용할 수 없는 경우 중단하고 루프를 찾을 수 없다고 말합니다. 경로를 수동으로 조립하거나 루프를 즉석에서 만들지 마십시오.

3. 워크플로우 실행

Workflow 도구로 실행합니다: {scriptPath: "<2단계의 경로>", args: {...}}:

{
  "target": "<대상 절대 경로>",
  "reviewer": { "kind": "agent|skill", "name": "<네임스페이스 이름>", "notes": "<리뷰어가 대상에 대해 알아야 할 사항>" },
  "scope": ["<저장소 상대 글로브>/**"],
  "pluginRoot": "<2단계의 플러그인 디렉토리>",
  "maxRounds": 5
}
  • maxRounds는 사용자가 다른 제한을 요청한 경우에만 설정합니다.
  • pluginRoot는 실행 시 메트릭 수집기를 찾을 수 있게 합니다. 2단계에서 워크플로우 이름으로 대체된 경우에만 키를 생략합니다 — 워크플로우가 자체적으로 검색합니다.
  • finalize ({"version_bump": bool, "narration_strip": bool, "docs_pass": bool})는 기본값을 재정의하는 경우에만 설정합니다: 대상이 플러그인 내에 있을 때 버전 범프, 내레이션 제거 및 문서 패스는 항상 수행됩니다.
  • decision은 계속 진행할 때만 사용합니다(아래 참조).

워크플로우는 백그라운드에서 실행되며 감독이 필요 없습니다: 리뷰, 수정, 재리뷰, 각 수정 라운드 후 범위를 확인하고, 깨끗한 리뷰에서만 완료됩니다. 커밋하지 않습니다. 모든 변경 사항은 작업 트리에 남습니다.

Workflow 도구를 사용할 수 없거나 거부된 경우 중단하고 그렇게 말합니다. 직접 편집으로 루프를 즉석에서 만들지 마십시오 — 원장, 범위 보호, 에스컬레이션 보장은 워크플로우에 있으며, 즉석 모방에는 이 기능이 없습니다.

결과가 halted: "reviewer-unavailable"인 경우 이를 전달하고 중단합니다. 지정된 리뷰어가 이 세션에 설치되지 않았습니다. 사용자에게 어떤 플러그인이 제공하는지 알려주고 설치한 후 다시 실행하도록 합니다. 직접 리뷰하지 마십시오.

루프가 실행 중일 때 턴을 종료하지 마십시오. Workflow 도구는 즉시 작업 ID를 반환합니다. 결과는 나중에 옵니다. 대화형 세션에서는 완료 알림이 당신을 다시 호출합니다 — 기다리십시오. 비대화형 실행(스크립트, CI, 평가)에서는 이후 턴이 없습니다: 중단하면 루프가 중간에 버려집니다. 따라서 실행 후 반환된 작업 ID로 TaskOutput을 사용하거나 sleep-and-recheck로 작업을 폴링하여 완료될 때까지 기다린 후 결과를 전달합니다. "루프가 실행 중이며 나중에 보고하겠습니다"라고 응답하는 세션은 실행을 잃게 됩니다.

결과 전달

워크플로우는 구조화된 결과를 반환합니다. 정직하게 보고하십시오 — 구분이 중요합니다:

  • converged: true — 마지막 작업이 중요/주요 문제가 0건인 리뷰였습니다. 사용된 라운드 수, 남은 사소한 문제(open_minor_count), 아티팩트 경로(ledger_path, metrics)를 보고합니다.
  • capped: true — 수정 예산이 소진되었고 최종 리뷰에서 여전히 차단 문제가 발견되었습니다. 명확히 말합니다: 한도 도달, 수렴되지 않음, open_blocking을 나열합니다. 성공으로 제시하지 마십시오.
  • escalation — 루프가 수렴되지 않음을 감지했습니다(반복되는 문제, 감소하지 않는 개수, 또는 수정으로 문제가 이동한 경우). 에스컬레이션 메시지와 문제 ID를 사용자에게 전달합니다: 이것은 더 많은 라운드가 아닌 설계 결정이 필요합니다.
  • halted — 가드가 발동되었습니다(범위 위반, 미등록 새 파일, 중단되었거나 사용할 수 없는 리뷰어, 또는 finalize 패스의 자체 편집이 뒤따르는 검사에 실패한 경우). violations/new_untracked_files의 경로, finalize_regressions의 사이트, 노트를 전달합니다.
  • **notes**는 항상 결과와 함께 전달됩니다 — 표면화하십시오. "git 저장소가 초기화되었습니다"와 같은 큰 경고를 포함합니다.

에스컬레이션 후 계속 진행

루프는 설계상 에스컬레이션에서 중단됩니다. 사용자가 결정하면 동일한 target 및 reviewer로 새 실행을 시작하고 다음을 추가합니다:

{ "decision": "<사용자의 판결, 그대로>" }

새 실행은 디스크에 있는 원장을 다시 로드하므로 모든 문제, 거부, 판결이 유지됩니다 — 라운드는 다시 시작되지만 재파생은 없습니다.

실행 중인 루프를 중지하려면 워크플로우 작업을 중지합니다(TaskStop). 디스크의 원장은 마지막 라운드까지 최신 상태이며 재실행 시 이어서 진행됩니다.

사용하지 말아야 할 경우

  • Claude Code 스킬: skill-improver 진입점을 사용하세요 — 올바른 리뷰어를 연결합니다.
  • 브랜치 / 풀 리퀘스트: pr-improver 진입점을 사용하세요 — diff에서 범위를 파생합니다.
  • 일회성 리뷰: 리뷰어를 직접 호출하세요. 루프의 가치는 반복에 있습니다.
  • 빠른 단일 수정: 파일을 직접 편집하세요.

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

trailofbits/address-sanitizer

AddressSanitizer detects memory errors during fuzzing. Use when fuzzing C/C++ code to find buffer overflows and use-after-free bugs.

trailofbits/aflpp

AFL++ is a fork of AFL with better fuzzing performance and advanced features. Use for multi-core fuzzing of C/C++ projects.

trailofbits/agentic-actions-auditor

Audits GitHub Actions workflows for security vulnerabilities in AI agent integrations including Claude Code Action, Gemini CLI, OpenAI Codex, and GitHub AI Inference. Detects attack vectors where attacker-controlled input reaches AI agents running in CI/CD pipelines, including env var intermediary patterns, direct expression injection, dangerous sandbox configurations, and wildcard user allowlists. Use when reviewing workflow files that invoke AI coding agents, auditing CI/CD pipeline security for prompt injection risks, or evaluating agentic action configurations.

trailofbits/algorand-vulnerability-scanner

Scans Algorand smart contracts for 11 common vulnerabilities including rekeying attacks, unchecked transaction fees, missing field validations, and access control issues. Use when auditing Algorand projects (TEAL/PyTeal).

trailofbits/ask-questions-if-underspecified

Clarify requirements before implementing. Use when serious doubts arise.

trailofbits/atheris

Atheris is a coverage-guided Python fuzzer based on libFuzzer. Use for fuzzing pure Python code and Python C extensions.

trailofbits/audit-augmentation

Augments Trailmark code graphs with external audit findings from SARIF static analysis results and weAudit annotation files. Maps findings to graph nodes by file and line overlap, creates severity-based subgraphs, and enables cross-referencing findings with pre-analysis data (blast radius, taint, etc.). Use when projecting SARIF results onto a code graph, overlaying weAudit annotations, cross-referencing Semgrep or CodeQL findings with call graph data, or visualizing audit findings in the context of code structure.

trailofbits/audit-context-building

Enables ultra-granular, line-by-line code analysis to build deep architectural context before vulnerability or bug finding.

trailofbits/audit-prep-assistant

Prepares codebases for security review using Trail of Bits' checklist. Helps set review goals, runs static analysis tools, increases test coverage, removes dead code, ensures accessibility, and generates documentation (flowcharts, user stories, inline comments).

trailofbits/burpsuite-project-parser

Searches and explores Burp Suite project files (.burp) from the command line. Use when searching response headers or bodies with regex patterns, extracting security audit findings, dumping proxy history or site map data, or analyzing HTTP traffic captured in a Burp project.

trailofbits/cairo-vulnerability-scanner

Scans Cairo/StarkNet smart contracts for 6 critical vulnerabilities including felt252 arithmetic overflow, L1-L2 messaging issues, address conversion problems, and signature replay. Use when auditing StarkNet projects.

trailofbits/cargo-fuzz

cargo-fuzz is the de facto fuzzing tool for Rust projects using Cargo. Use for fuzzing Rust code with libFuzzer backend.

trailofbits/chrome-mcp-troubleshooting

Diagnose and fix Claude in Chrome MCP extension connectivity issues. Use when mcp__claude-in-chrome__* tools fail, return "Browser extension is not connected", or behave erratically.

trailofbits/claude-in-chrome-troubleshooting

Diagnose and fix Claude in Chrome MCP extension connectivity issues. Use when mcp__claude-in-chrome__* tools fail, return "Browser extension is not connected", or behave erratically.

trailofbits/code-maturity-assessor

Systematic code maturity assessment using Trail of Bits' 9-category framework. Analyzes codebase for arithmetic safety, auditing practices, access controls, complexity, decentralization, documentation, MEV risks, low-level code, and testing. Produces professional scorecard with evidence-based ratings and actionable recommendations.

trailofbits/codeql

Scans a codebase for security vulnerabilities using CodeQL's interprocedural data flow and taint tracking analysis. Triggers on "run codeql", "codeql scan", "codeql analysis", "build codeql database", or "find vulnerabilities with codeql". Supports "run all" (security-and-quality + security-experimental suites) and "important only" (high-precision security findings) scan modes. Also handles creating data extension models and processing CodeQL SARIF output.

trailofbits/constant-time-analysis

Detects timing side-channel vulnerabilities in cryptographic code. Use when implementing or reviewing crypto code, encountering division on secrets, secret-dependent branches, or constant-time programming questions in C, C++, Go, Rust, Swift, Java, Kotlin, C#, PHP, JavaScript, TypeScript, Python, or Ruby.

trailofbits/constant-time-testing

Constant-time testing detects timing side channels in cryptographic code. Use when auditing crypto implementations for timing vulnerabilities.

trailofbits/cosmos-vulnerability-scanner

Scans Cosmos SDK blockchain modules and CosmWasm contracts for consensus-critical vulnerabilities — chain halts, fund loss, state divergence. 25 core + 16 IBC + 10 EVM + 3 CosmWasm patterns. Use when auditing custom x/ modules, reviewing IBC integrations, or assessing pre-launch chain security. Updated for SDK v0.53.x.

trailofbits/coverage-analysis

Coverage analysis measures code exercised during fuzzing. Use when assessing harness effectiveness or identifying fuzzing blockers.

관련 스킬