전체 코드 버그 종합 분석
프로젝트 코드 전체의 보안 취약점과 로직 오류를 체계적으로 분석하고 수정 보고서를 만듭니다.
- 추천 툴
- Claude CodeAI 분류
- 쓰인 기법
- 역할 부여 · 단계별 사고 · 출력 형식 지정
프롬프트 원문
Act as a comprehensive repository analysis and bug-fixing expert. You are tasked with conducting a thorough analysis of the entire repository to identify, prioritize, fix, and document ALL verifiable bugs, security vulnerabilities, and critical issues across any programming language, framework, or technology stack. Your task is to: - Perform a systematic and detailed analysis of the repository. - Identify and categorize bugs based on severity, impact, and complexity. - Develop a step-by-step process for fixing bugs and validating fixes. - Document all findings and fixes for future reference. ## Phase 1: Initial Repository Assessment You will: 1. Map the complete project structure (e.g., src/, lib/, tests/, docs/, config/, scripts/). 2. Identify the technology stack and dependencies (e.g., package.json, requirements.txt). 3. Document main entry points, critical paths, and system boundaries. 4. Analyze build configurations and CI/CD pipelines. 5. Review existing documentation (e.g., README, API docs). ## Phase 2: Systematic Bug Discovery You will identify bugs in the following categories: 1. **Critical Bugs:** Security vulnerabilities, data corruption, crashes, etc. 2. **Functional Bugs:** Logic errors, state management issues, incorrect API contracts. 3. **Integration Bugs:** Database query errors, API usage issues, network problems. 4. **Edge Cases:** Null handling, boundary conditions, timeout issues. 5. **Code Quality Issues:** Dead code, deprecated APIs, performance bottlenecks. ### Discovery Methods: - Static code analysis. - Dependency vulnerability scanning. - Code path analysis for untested code. - Configuration validation. ## Phase 3: Bug Documentation & Prioritization For each bug, document: - BUG-ID, Severity, Category, File(s), Component. - Description of current and expected behavior. - Root cause analysis. - Impact assessment (user/system/business). - Reproduction steps and verification methods. - Prioritize bugs based on severity, user impact, and complexity. ## Phase 4: Fix Implementation 1. Create an isolated branch for each fix. 2. Write a failing test first (TDD). 3. Implement minimal fixes and verify tests pass. 4. Run regression tests and update documentation. ## Phase 5: Testing & Validation 1. Provide unit, integration, and regression tests for each fix. 2. Validate fixes using comprehensive test structures. 3. Run static analysis and verify performance benchmarks. ## Phase 6: Documentation & Reporting 1. Update inline code comments and API documentation. 2. Create an executive summary report with findings and fixes. 3. Deliver results in Markdown, JSON/YAML, and CSV formats along with an artifact tracking and explaining all the defects found and status of the fix. ## Phase 7: Continuous Improvement 1. Identify common bug patterns and recommend preventive measures. 2. Propose enhancements to tools, processes, and architecture. 3. Suggest monitoring and logging improvements. ## Constraints: - Never compromise security for simplicity. - Maintain an audit trail of changes. - Follow semantic versioning for API changes. - Document assumptions and respect rate limits. Use variables like repositoryName for repository-specific details. Provide detailed documentation and code examples when necessary.
한국어 풀이 보기(참고용)
전체 리포지토리 분석 및 버그 수정 전문가로 활동해 주세요. 귀하의 임무는 모든 프로그래밍 언어, 프레임워크 또는 기술 스택에 걸쳐 검증 가능한 모든 버그, 보안 취약점 및 심각한 문제를 식별, 우선순위 지정, 수정 및 문서화하기 위해 전체 리포지토리에 대한 철저한 분석을 수행하는 것입니다. 귀하의 과제: - 리포지토리에 대한 체계적이고 상세한 분석을 수행합니다. - 심각도, 영향 및 복잡성을 기준으로 버그를 식별하고 분류합니다. - 버그 수정 및 수정 사항 검증을 위한 단계별 프로세스를 개발합니다. - 향후 참조를 위해 모든 발견 사항과 수정 사항을 문서화합니다. ## Phase 1: 초기 리포지토리 평가 다음 사항을 수행합니다: 1. 전체 프로젝트 구조를 매핑합니다 (예: src/, lib/, tests/, docs/, config/, scripts/). 2. 기술 스택 및 종속성을 식별합니다 (예: package.json, requirements.txt). 3. 주요 엔트리 포인트, 핵심 경로 및 시스템 경계를 문서화합니다. 4. 빌드 구성 및 CI/CD 파이프라인을 분석합니다. 5. 기존 문서(예: README, API 문서)를 검토합니다. ## Phase 2: 체계적인 버그 검색 다음 범주에서 버그를 식별합니다: 1. **심각한 버그:** 보안 취약점, 데이터 손상, 크래시 등. 2. **기능적 버그:** 로직 오류, 상태 관리 문제, 잘못된 API 계약. 3. **통합 버그:** 데이터베이스 쿼리 오류, API 사용 문제, 네트워크 문제. 4. **엣지 케이스:** Null 처리, 경계 조건, 타임아웃 문제. 5. **코드 품질 문제:** 사용되지 않는 코드, 더 이상 사용되지 않는 API, 성능 병목 현상. ### 검색 방법: - 정적 코드 분석. - 종속성 취약점 스캐닝. - 테스트되지 않은 코드에 대한 코드 경로 분석. - 구성 검증. ## Phase 3: 버그 문서화 및 우선순위 지정 각 버그에 대해 다음을 문서화합니다: - BUG-ID, 심각도, 범주, 파일 목록, 구성 요소. - 현재 동작 및 예상 동작에 대한 설명. - 근본 원인 분석. - 영향 평가 (사용자/시스템/비즈니스). - 재현 단계 및 검증 방법. - 심각도, 사용자 영향 및 복잡성을 기준으로 버그의 우선순위를 지정합니다. ## Phase 4: 수정 구현 1. 각 수정 사항에 대해 격리된 브랜치를 생성합니다. 2. 먼저 실패하는 테스트를 작성합니다 (TDD). 3. 최소한의 수정 사항을 구현하고 테스트 통과를 확인합니다. 4. 회귀 테스트를 실행하고 문서를 업데이트합니다. ## Phase 5: 테스트 및 검증 1. 각 수정 사항에 대해 단위, 통합 및 회귀 테스트를 제공합니다. 2. 포괄적인 테스트 구조를 사용하여 수정 사항을 검증합니다. 3. 정적 분석을 실행하고 성능 벤치마크를 확인합니다. ## Phase 6: 문서화 및 보고 1. 인라인 코드 주석 및 API 문서를 업데이트합니다. 2. 발견 사항 및 수정 사항이 포함된 요약 보고서를 작성합니다. 3. 발견된 모든 결함과 수정 상태를 추적 및 설명하는 아티팩트와 함께 Markdown, JSON/YAML, CSV 형식으로 결과를 전달합니다. ## Phase 7: 지속적 개선 1. 일반적인 버그 패턴을 식별하고 예방 조치를 권장합니다. 2. 도구, 프로세스 및 아키텍처 개선을 제안합니다. 3. 모니터링 및 로깅 개선 사항을 제안합니다. ## 제약 사항: - 단순성을 위해 보안을 타협하지 마십시오. - 변경 사항에 대한 감사 추적을 유지하십시오. - API 변경에 대해 유의적 버전을 따르십시오. - 가정을 문서화하고 속도 제한을 준수하십시오. [repositoryName]과 같은 변수를 사용하여 리포지토리별 세부 정보를 입력하세요. 필요한 경우 상세한 문서와 코드 예시를 제공하세요.
- 활용Claude Code나 Cursor 등 리포지토리 전체에 접근 가능한 AI 도구에서 실행할 때 효과적입니다.
- 활용한 번에 전 과정을 수행하기 부담스럽다면 특정 Phase(예: Phase 1~3)만 먼저 수행하도록 요청해보세요.
출처 · prompts.chat · Comprehensive bug analysis — 원문은 출처에 게시된 그대로이며, 권리는 원작자에게 있습니다.
텍스트 결과
Gemini로 실행한 결과입니다. 입력 항목에는 국내 환경의 예시값을 적용했습니다(AI 생성 — 사실 확인 필요).
실행 입력값 보기
Act as a comprehensive repository analysis and bug-fixing expert. You are tasked with conducting a thorough analysis of the entire repository to identify, prioritize, fix, and document ALL verifiable bugs, security vulnerabilities, and critical issues across any programming language, framework, or technology stack. Target Repository Context: - repositoryName: "k-pay-service-backend" - Tech Stack: Node.js (TypeScript), Express, PostgreSQL, Redis, Docker Your task is to: - Perform a systematic and detailed analysis of the repository. - Identify and categorize bugs based on severity, impact, and complexity. - Develop a step-by-step process for fixing bugs and validating fixes. - Document all findings and fixes for future reference. ## Phase 1: Initial Repository Assessment You will: 1. Map the complete project structure (e.g., src/, lib/, tests/, docs/, config/, scripts/). 2. Identify the technology stack and dependencies (e.g., package.json, requirements.txt). 3. Document main entry points, critical paths, and system boundaries. 4. Analyze build configurations and CI/CD pipelines. 5. Review existing documentation (e.g., README, API docs). ## Phase 2: Systematic Bug Discovery You will identify bugs in the following categories: 1. **Critical Bugs:** Security vulnerabilities, data corruption, crashes, etc. 2. **Functional Bugs:** Logic errors, state management issues, incorrect API contracts. 3. **Integration Bugs:** Database query errors, API usage issues, network problems. 4. **Edge Cases:** Null handling, boundary conditions, timeout issues. 5. **Code Quality Issues:** Dead code, deprecated APIs, performance bottlenecks. ### Discovery Methods: - Static code analysis. - Dependency vulnerability scanning. - Code path analysis for untested code. - Configuration validation. ## Phase 3: Bug Documentation & Prioritization For each bug, document: - BUG-ID, Severity, Category, File(s), Component. - Description of current and expected behavior. - Root cause analysis. - Impact assessment (user/system/business). - Reproduction steps and verification methods. - Prioritize bugs based on severity, user impact, and complexity. ## Phase 4: Fix Implementation 1. Create an isolated branch for each fix. 2. Write a failing test first (TDD). 3. Implement minimal fixes and verify tests pass. 4. Run regression tests and update documentation. ## Phase 5: Testing & Validation 1. Provide unit, integration, and regression tests for each fix. 2. Validate fixes using comprehensive test structures. 3. Run static analysis and verify performance benchmarks. ## Phase 6: Documentation & Reporting 1. Update inline code comments and API documentation. 2. Create an executive summary report with findings and fixes. 3. Deliver results in Markdown, JSON/YAML, and CSV formats along with an artifact tracking and explaining all the defects found and status of the fix. ## Phase 7: Continuous Improvement 1. Identify common bug patterns and recommend preventive measures. 2. Propose enhancements to tools, processes, and architecture. 3. Suggest monitoring and logging improvements. ## Constraints: - Never compromise security for simplicity. - Maintain an audit trail of changes. - Follow semantic versioning for API changes. - Document assumptions and respect rate limits. Use variables like repositoryName for repository-specific details. Provide detailed documentation and code examples when necessary.
[k-pay-service-backend 저장소 종합 분석 및 결함 진단 보고서]
- Phase 1: 저장소 초기 진단 (Initial Assessment)
- 저장소명: k-pay-service-backend (가상 프로젝트)
- 주요 기술 스택: Node.js (TypeScript), Express v4.18, PostgreSQL (Prisma ORM), Redis
- 핵심 경로:
src/server.ts(진입점),src/controllers/payment.ts(결제 승인 핵심 로직)
- Phase 2 & 3: 결함 발견 및 문서화 (Bug Discovery & Prioritization)
■ [BUG-001] Critical | 보안 | src/middlewares/auth.ts
- 현상: 결제 취소 API 요청 시 JWT 검증 미들웨어가 누락되어 무인가 요청 통과 위험.
- 영향: 타인의 결제 건 무단 취소 가능 (보안 위협 극대)
- 조치 우선순위: P0 (최상)
■ [BUG-002] Functional | 로직 | src/services/payService.ts
- 현상: 환불 처리 시 Redis 분산 락(Redlock) 미적용으로 동시 요청 시 중복 환불 발생 가능.
- 원인: Race Condition 조건 미제어
- 조치 우선순위: P1 (상)
■ [BUG-003] Edge Case | 예외 처리 | src/utils/httpClient.ts
- 현상: 외부 PG 통신 연동 시 타임아웃 예외 미처리로 인해 요청 대기열 커넥션 블로킹 발생.
- 조치 우선순위: P2 (중)
- Phase 4~6: 수정 계획 및 조치 (Fix & Verification)
- 이슈별 격리 브랜치 생성 (
fix/BUG-001-jwt-auth등) - TDD 기반 실패 단위 테스트 작성 후 미들웨어 적용 및 Redlock 도입 구현
- 전체 회귀 테스트 통과 확인 후 API 문서 업데이트 및 보고서 작성 예정
mopick 개선안
원문을 더 잘 동작하게 고쳐 쓴 프롬프트
원문을 그대로 넣으면 AI 가 매번 다르게 답하거나 중요한 부분을 빠뜨릴 수 있습니다. 개선안은 원문의 뜻과 언어는 그대로 두고 역할 · 바꿔 넣을 입력 칸 · 결과 형식 · 지킬 조건을 보완해 다시 쓴 버전입니다. 원문과 같은 곳(ChatGPT · Claude 등)에 그대로 붙여 넣어 쓰면 됩니다.
AI 자체 평가 — 개선안을 쓴 AI 가 명확성 · 구체성 · 결과 형식 · 재사용성 기준(100점)으로 직접 매긴 점수 · 결과를 돌려 검증한 값은 아님
원문의 문제 → 개선안에서 고친 점
입력 칸레슨 05 배우기 ›
원문 · 없음바꿔 넣을 자리가 표시돼 있지 않아 쓸 때마다 원문을 직접 고쳐야 했습니다.
개선 · 4개[REPOSITORY_NAME] · [TECH_STACK] · [TARGET_SCOPE] 외 1개
고친 이유 (개선안을 만든 AI 의 설명)
- 1입력 변수([REPOSITORY_NAME] 등)를 명시하여 재사용성을 높였습니다.
- 2핵심 단계와 제약을 간결하게 정리하여 명확성을 강화했습니다.
- 3자가 검토(Self-review) 단계를 추가하여 신뢰도를 높였습니다.
이 개선안에 쓰인 기법 — 프롬프트 클래스에서 배우기
원문
Act as a comprehensive repository analysis and bug-fixing expert. You are tasked with conducting a thorough analysis of the entire repository to identify, prioritize, fix, and document ALL verifiable bugs, security vulnerabilities, and critical issues across any programming language, framework, or technology stack. Your task is to: - Perform a systematic and detailed analysis of the repository. - Identify and categorize bugs based on severity, impact, and complexity. - Develop a step-by-step process for fixing bugs and validating fixes. - Document all findings and fixes for future reference. ## Phase 1: Initial Repository Assessment You will: 1. Map the complete project structure (e.g., src/, lib/, tests/, docs/, config/, scripts/). 2. Identify the technology stack and dependencies (e.g., package.json, requirements.txt). 3. Document main entry points, critical paths, and system boundaries. 4. Analyze build configurations and CI/CD pipelines. 5. Review existing documentation (e.g., README, API docs). ## Phase 2: Systematic Bug Discovery You will identify bugs in the following categories: 1. **Critical Bugs:** Security vulnerabilities, data corruption, crashes, etc. 2. **Functional Bugs:** Logic errors, state management issues, incorrect API contracts. 3. **Integration Bugs:** Database query errors, API usage issues, network problems. 4. **Edge Cases:** Null handling, boundary conditions, timeout issues. 5. **Code Quality Issues:** Dead code, deprecated APIs, performance bottlenecks. ### Discovery Methods: - Static code analysis. - Dependency vulnerability scanning. - Code path analysis for untested code. - Configuration validation. ## Phase 3: Bug Documentation & Prioritization For each bug, document: - BUG-ID, Severity, Category, File(s), Component. - Description of current and expected behavior. - Root cause analysis. - Impact assessment (user/system/business). - Reproduction steps and verification methods. - Prioritize bugs based on severity, user impact, and complexity. ## Phase 4: Fix Implementation 1. Create an isolated branch for each fix. 2. Write a failing test first (TDD). 3. Implement minimal fixes and verify tests pass. 4. Run regression tests and update documentation. ## Phase 5: Testing & Validation 1. Provide unit, integration, and regression tests for each fix. 2. Validate fixes using comprehensive test structures. 3. Run static analysis and verify performance benchmarks. ## Phase 6: Documentation & Reporting 1. Update inline code comments and API documentation. 2. Create an executive summary report with findings and fixes. 3. Deliver results in Markdown, JSON/YAML, and CSV formats along with an artifact tracking and explaining all the defects found and status of the fix. ## Phase 7: Continuous Improvement 1. Identify common bug patterns and recommend preventive measures. 2. Propose enhancements to tools, processes, and architecture. 3. Suggest monitoring and logging improvements. ## Constraints: - Never compromise security for simplicity. - Maintain an audit trail of changes. - Follow semantic versioning for API changes. - Document assumptions and respect rate limits. Use variables like repositoryName for repository-specific details. Provide detailed documentation and code examples when necessary.
개선안 · 색칠한 [칸]에 내 내용을 넣어 쓰세요
Act as a repository analysis and bug-fixing expert. Conduct a systematic analysis of [REPOSITORY_NAME] to identify, prioritize, fix, and document verifiable bugs, security vulnerabilities, and code quality issues. ## Inputs & Scope - Target Repository: [REPOSITORY_NAME] - Tech Stack & Dependencies: [TECH_STACK] - Target Scope / Branch: [TARGET_SCOPE] ## Execution Workflow 1. **Initial Assessment**: Map project structure, dependencies, main entry points, and CI/CD pipelines. 2. **Systematic Bug Discovery**: Categorize findings into Critical (Security/Crashes), Functional (Logic errors), Integration (API/DB), Edge Cases, and Code Quality. 3. **Documentation & Prioritization**: For each defect, record BUG-ID, Severity, File/Component, Root Cause, Expected vs. Actual Behavior, and Verification Steps. 4. **Fix Implementation & Testing**: Write unit/regression tests to reproduce defects, apply minimal non-breaking fixes, and confirm all test suites pass. 5. **Reporting**: Produce an executive summary report alongside structured artifacts in [OUTPUT_FORMAT: Markdown/JSON/CSV]. ## Constraints & Self-Review - Ensure all changes preserve security and backward compatibility. - Maintain an audit trail of modified code and document explicit assumptions. - **Self-Review**: Verify that all reported bugs contain concrete reproduction steps and that fixes pass static and regression validation before final delivery.
같은 분야 프롬프트 코딩 · 개발
더 보기 ›- 텍스트 결과
코딩 · 개발 · Claude Code
레트로 게임 AI 코딩 연출
AI로 웹 게임 개발 시 불필요한 텍스트 연출을 막고 레트로 사운드와 UI를 깔끔하게 구현합니다.
기법 · 네가티브 제약
- 웹 화면(HTML)텍스트 결과
코딩 · 개발 · 공통
공장 AI HMI 시뮬레이터 제작
공장 작업자의 AI 시스템 대응 교육용 단일 HTML 웹 HMI 시뮬레이터를 즉시 구축할 때 활용합니다.
기법 · 역할 부여 · 단계별 지시 · 출력 형식 지정
- 텍스트 결과
코딩 · 개발 · Claude
깃허브 수정위치 시각화 가이드
GitHub 리포지토리에서 수정 및 추가해야 할 코딩 위치를 스크린샷과 동그라미 표시로 직관적으로 확인합니다.
기법 · 시각적 가이드 · 작업 자동화 · 출력 형식 지정

