# 코드 지식 그래프 (understand)

> 코드베이스를 분석해 파일·관계·계층·투어를 담은 knowledge-graph.json을 .ua/에 만들어 대시보드로 볼 수 있게 합니다.

- 카테고리: [아키텍처 개선](https://www.myskills.tools/ko/categories/architecture-tuning/)
- 출처: 커뮤니티 · Egonex-AI
- 저장소: https://github.com/Egonex-AI/Understand-Anything/tree/main/understand-anything-plugin/skills/understand (commit 08d16bd)
- SKILL.md: https://github.com/Egonex-AI/Understand-Anything/blob/main/understand-anything-plugin/skills/understand/SKILL.md
- 설치 명령: `npx skills add Egonex-AI/Understand-Anything --skill understand`
- 라이선스: MIT
- 호환 도구: Claude Code, Codex, Cursor, Copilot, Gemini CLI
- 권한: read-repo ✓, write-files ✓, shell ✓, network ✓
- 상태: 스캔 통과
- 규칙 스캔으로 모든 위험을 찾을 수는 없습니다. 설치 전에 이 스킬의 SKILL.md를 읽고 권한을 확인하세요.
- ⚠ 처음 실행 시 플러그인 디렉터리에서 pnpm install과 빌드를 수행하며, 큰 코드베이스는 많은 서브 에이전트를 써서 오래 걸립니다.

## 핵심 규칙

오류를 조용히 버리지 않고, 모든 실패를 최종 보고서에 드러냅니다.

## 실행 단계

1. **사전 점검** — 프로젝트 루트와 .ua/ 데이터 디렉터리를 정하고, 필요하면 플러그인을 빌드하며, 기존 그래프로 전체 또는 증분 분석을 결정합니다.
2. **스캔과 배치** — .understandignore와 --exclude 규칙에 따라 파일을 스캔하고 언어·프레임워크를 파악한 뒤 의미 단위 배치를 만듭니다.
3. **파일 분석** — 최대 5개의 서브 에이전트가 배치를 병렬로 분석하고, 노드와 엣지로 합친 뒤 조립된 그래프를 검토합니다.
4. **계층과 투어** — 아키텍처 계층을 식별하고 가이드 투어를 만든 뒤 전체 그래프를 검증합니다.
5. **저장과 보고** — 그래프, 지문 기준선, meta.json을 저장하고 중간 파일을 정리해 통계를 보고하며, 검증을 통과하면 대시보드를 엽니다.

## 권한 설명 (SKILL.md 기준)

| 기능 | 필요 여부 | 설명 |
|---|---|---|
| 파일 쓰기 | 일부 필요 | 프로젝트의 .ua/(또는 기존 .understand-anything/) 안에만 그래프, 설정, 중간 파일을 쓰며 소스는 바꾸지 않습니다. |
| 명령 실행 | 필요 | git, 동봉된 Node·Python 스크립트를 실행하고, 처음 사용할 때 pnpm install과 빌드를 수행합니다. |
| 네트워크 송신 | 일부 필요 | 플러그인이 빌드되지 않았을 때 pnpm install로 의존성을 받는 경우뿐이며, 분석 자체는 네트워크를 쓰지 않습니다. |

## SKILL.md 프런트매터(YAML)

```yaml
---
name: understand
description: Analyze a codebase to produce an interactive knowledge graph for understanding architecture, components, and relationships
argument-hint: ["[path] [--full|--auto-update|--no-auto-update|--review|--language <lang>|--exclude <patterns>]"]
---
```

홈: https://www.myskills.tools/ko/ · URL: https://www.myskills.tools/ko/skills/understand/
