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

pre-commit-analysis

Pre-commit implementation analysis for Retail-Agentic-Commerce. Use before commits, after significant changes, or when validating Apps SDK tools, mock data, MCP communication, widget isolation, or implementation quality.

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

설치 방법 보기

포함된 파일(1)

  • SKILL.md4.9 KB

SKILL.md(원문)

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

Pre-Commit Analysis

Use this skill before committing significant changes or when the user asks for implementation-quality validation.

If multi-agent tools are available, run the analysis areas in parallel. If not, perform the same checks directly with local commands.

Analysis Areas

  1. MCP tools: verify tool implementations use real APIs or shared data sources.
  2. Apps SDK web isolation: verify widget code communicates through postMessage and MCP boundaries.
  3. Mock data completeness: verify mock data exists and stays synchronized with the shared catalog.
  4. Communication flow: verify message types and handlers match across parent UI and widget code.

MCP Tools Verification

Files to inspect:

  • src/apps_sdk/tools/*.py
  • src/apps_sdk/main.py

Red flags:

  • Hardcoded product lists instead of shared catalog data.
  • Hardcoded responses where API calls or shared services are expected.
  • Mock data drifting from src/data/product_catalog.py.
  • Missing error handling for API failures.

Commands:

rg "MOCK_PRODUCTS|mock_products" src/apps_sdk/
rg "from src.data.product_catalog import" src/apps_sdk/
rg "httpx|requests|fetch" src/apps_sdk/tools/

Expected patterns:

from src.data.product_catalog import PRODUCTS
async with httpx.AsyncClient() as client:
    response = await client.get(f"{merchant_url}/products/{id}")

Apps SDK Web Isolation

Files to inspect:

  • src/apps_sdk/web/src/**/*.tsx
  • src/apps_sdk/web/src/**/*.ts
  • src/apps_sdk/web/package.json

Red flags:

  • Imports from parent UI directories.
  • Direct calls to localhost backend ports from widget code.
  • Shared state with the parent app.
  • Direct window.parent usage except for postMessage.

Commands:

rg "from ['\"]\\.\\./\\.\\./\\.\\." src/apps_sdk/web/src/
rg "localhost:8000|localhost:8001" src/apps_sdk/web/src/
rg "postMessage|window\\.parent" src/apps_sdk/web/src/

Expected pattern:

window.parent.postMessage({ type: "GET_RECOMMENDATIONS" }, "*");
const result = await window.openai.callTool("add-to-cart", args);

Mock Data Completeness

Files to inspect:

  • src/data/product_catalog.py
  • src/ui/data/mock-data.ts
  • src/apps_sdk/tools/recommendations.py

Red flags:

  • Product count mismatch.
  • Missing development or test mock data.
  • Hardcoded data instead of catalog imports.
  • Missing fallbacks when agent services are unavailable.

Commands:

rg '"id": "prod_' src/data/product_catalog.py | wc -l
rg "CATALOG_PRODUCTS|from src.data.product_catalog" src/apps_sdk/

Communication Flow

Files to inspect:

  • src/ui/components/agent/MerchantIframeContainer.tsx
  • src/ui/hooks/useMCPClient.ts
  • src/apps_sdk/web/src/App.tsx
  • src/apps_sdk/web/src/main.tsx

Message types to verify:

DirectionMessage TypePurpose
Widget to ParentGET_RECOMMENDATIONSRequest product recommendations
Parent to WidgetRECOMMENDATIONS_RESULTReturn recommendation data
Widget to ParentCHECKOUT_COMPLETENotify checkout success
Widget to ParentCALL_TOOLMCP tool invocation through the bridge

Commands:

rg "message\\.type.*==|case.*:" src/ui/components/agent/MerchantIframeContainer.tsx
rg "postMessage.*type:" src/apps_sdk/web/src/

Validation Checklist

Track these before committing:

Pre-Commit Analysis:
- [ ] MCP tools use shared catalog data where applicable.
- [ ] MCP tools make real API calls where needed.
- [ ] Apps SDK web has no forbidden parent imports.
- [ ] Widget uses postMessage for parent communication.
- [ ] Widget makes no direct backend API calls.
- [ ] Mock data is synced with product catalog expectations.
- [ ] Agent fallbacks exist when services are unavailable.
- [ ] Message types match between sender and receiver.
- [ ] Relevant tests pass.
- [ ] Relevant linter and type checks pass.

Post-Analysis Commands

Run relevant checks for the changed areas:

uv run pytest tests/apps_sdk/ -v
uv run ruff check src/apps_sdk/
uv run pyright src/apps_sdk/
cd src/apps_sdk/web && pnpm build

Broaden to the full quality gates from skills/features/SKILL.md and skills/ui/SKILL.md when shared backend or frontend behavior changed.

Report Format

## Pre-Commit Analysis Report

### MCP Tools
- Status: PASS/FAIL
- Issues: [list any issues]

### Apps SDK Isolation
- Status: PASS/FAIL
- Issues: [list any issues]

### Mock Data
- Status: PASS/FAIL
- Product count: X/17
- Issues: [list any issues]

### Communication Flow
- Status: PASS/FAIL
- Issues: [list any issues]

### Recommendations
1. [High priority fixes]
2. [Medium priority improvements]
3. [Low priority enhancements]

리뷰

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

댓글

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

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

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

0 / 1,000자

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

같은 저장소의 스킬

Dependency vulnerability remediation workflow for this repository. Use when fixing CVE, BDSA, GHSA, OSV, npm, PyPI, Dependabot, Black Duck, Snyk, or other package vulnerability findings, especially when the user asks for minimal package-only updates, validation, commits, branches, or pull requests.

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

NVIDIA-AI-Blueprints/Retail-Agentic-Commerce812026년 10월 15일 업데이트

Discoverability shim for the Retail-Agentic-Commerce CVE remediation Codex skill. Use for CVE, BDSA, GHSA, OSV, Dependabot, Black Duck, Snyk, npm, PyPI, or package advisory remediation.

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

NVIDIA-AI-Blueprints/Retail-Agentic-Commerce812026년 10월 15일 업데이트

features

무료

Discoverability shim for the Retail-Agentic-Commerce backend feature Codex skill. Use when writing or modifying Python backend code, routes, services, models, tests, or protocol logic.

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

NVIDIA-AI-Blueprints/Retail-Agentic-Commerce812026년 10월 15일 업데이트

features

무료

Python backend development standards for FastAPI, SQLModel, pytest, Ruff, and Pyright. Use when writing or modifying backend code in src/merchant, src/payment, src/apps_sdk, agents, tests, API routes, services, models, or protocol logic.

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

NVIDIA-AI-Blueprints/Retail-Agentic-Commerce812026년 10월 15일 업데이트

Discoverability shim for the Retail-Agentic-Commerce pre-commit analysis Codex skill. Use before commits, after significant changes, or for implementation-quality validation.

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

NVIDIA-AI-Blueprints/Retail-Agentic-Commerce812026년 10월 15일 업데이트

setup

무료

Launch all services for the Retail-Agentic-Commerce project. Use when the user types setup, install, or asks to start, launch, or run the project stack.

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

NVIDIA-AI-Blueprints/Retail-Agentic-Commerce812026년 10월 15일 업데이트

NVIDIA-AI-Blueprints의 스킬 모두 보기

이 스킬의 문제 신고