Files
Luong NGUYEN 3337f0df5e fix(plugins): address review (drop k8s MCP, pin GitHub server, tighten deploy hooks)
- devops-automation: remove the Kubernetes MCP server (.mcp.json in en/uk/vi)
  and every README mention of it; keep the deploy hooks.
- Pin GitHub's MCP server image to ghcr.io/github/github-mcp-server:v2.1.0.
- pre-deploy/post-deploy: detect deploys by command word (after &&, ;, |,
  newlines), skipping quoted strings and heredoc bodies, and allow global
  flags before the verb; document the limits.
- post-deploy: kubectl rollout status when DEPLOY_DEPLOYMENT is set, else the
  pod-ready wait on DEPLOY_APP_LABEL; clear message when kubectl is missing.
- pre-review: handle repos with no commits and detached HEAD; matcher accepts
  both pr-review:<cmd> and the bare name; hooks use exec form (args).
- INDEX.md, QUICK_REFERENCE.md, README.md and concepts guides (all locales):
  drop deleted mcp/*.json files and use /<plugin>:<command> names.

Refs #260
2026-11-12 14:01:32 +00:00

4.4 KiB

Claude How To

문서화 플러그인

프로젝트 문서를 포괄적으로 생성하고 유지 관리합니다.

기능

✅ API 문서 생성 ✅ README 작성 및 업데이트 ✅ 문서 동기화 ✅ 코드 주석 개선 ✅ 예제 생성

설치

claude --plugin-dir ./07-plugins/documentation

로드하기 전에 플러그인을 검사합니다.

claude plugin validate ./07-plugins/documentation

포함 항목

슬래시 명령어

플러그인 명령어에는 plugin.json의 플러그인 name이 네임스페이스로 붙습니다.

  • /documentation:generate-api-docs - API 문서 생성
  • /documentation:generate-readme - README 작성 또는 업데이트
  • /documentation:sync-docs - 코드 변경 사항과 문서 동기화
  • /documentation:validate-docs - 문서 검증

서브에이전트

  • api-documenter - API 문서화 전문
  • code-commentator - 코드 주석 개선
  • example-generator - 코드 예제 작성

템플릿

  • api-endpoint.md - API 엔드포인트 문서 템플릿
  • function-docs.md - 함수 문서 템플릿
  • adr-template.md - 아키텍처 결정 기록(ADR) 템플릿

MCP 서버

.mcp.json은 서버 하나, github를 선언합니다. GitHub의 공식 MCP 서버(ghcr.io/github/github-mcp-server)이며 Docker로 읽기 전용 모드로 실행됩니다. 이미지는 v2.1.0 릴리스로 고정되어 있으며, 업그레이드하려면 .mcp.json의 태그를 변경하세요. /mcp에서는 plugin:documentation:github로 표시됩니다.

사용 방법

API 문서 생성

/documentation:generate-api-docs

README 작성

/documentation:generate-readme

문서 동기화

/documentation:sync-docs

문서 검증

/documentation:validate-docs

요구 사항

  • Claude Code 2.1+
  • Docker와 GitHub 개인 액세스 토큰(선택 사항, GitHub MCP 서버용)

워크플로 예시

User: /documentation:generate-api-docs

Claude:
1. Scans all API endpoints in /src/api/
2. Delegates to api-documenter subagent
3. Extracts function signatures and JSDoc
4. Organizes by module/endpoint
5. Uses api-endpoint.md template
6. Generates comprehensive markdown docs
7. Includes curl, JavaScript, and Python examples

Result:
✅ API documentation generated
📄 Files created:
   - docs/api/users.md
   - docs/api/auth.md
   - docs/api/products.md
📊 Coverage: 23/23 endpoints documented

템플릿 사용법

API 엔드포인트 템플릿

전체 예제를 포함해 REST API 엔드포인트를 문서화할 때 사용합니다.

함수 문서 템플릿

개별 함수·메서드를 문서화할 때 사용합니다.

ADR 템플릿

아키텍처 결정을 문서화할 때 사용합니다.

설정

문서 동기화를 위해 GitHub 토큰을 설정합니다.

export GITHUB_TOKEN="your_github_token"

.mcp.json은 이 토큰을 서버가 읽는 변수인 GITHUB_PERSONAL_ACCESS_TOKEN으로 서버에 전달합니다. /mcp를 실행해 plugin:documentation:github가 연결되었는지 확인하세요. 토큰이 없어도 명령어는 로컬 파일에 대해 그대로 동작합니다.

모범 사례

  • 문서를 코드 가까이에 둡니다
  • 코드를 변경할 때 문서도 함께 업데이트합니다
  • 실용적인 예제를 포함합니다
  • 정기적으로 검증합니다
  • 일관성을 위해 템플릿을 사용합니다

최종 업데이트: 2026년 10월 18일 Claude Code 버전: 2.1.302 출처: