gc-guide/src/content/ClaudeCodeSkills.tsx
htlee 56fdc38f7b docs: 개발환경 가이드 v1.6.1 기준 최신화
- InitialSetup: GITEA_TOKEN 생성 가이드 강화 (권한 테이블, settings.local.json)
- StartingProject: init-project 중심 간소화, 파일 구조 2분할 (커밋/로컬), 자동 동기화 안내
- ClaudeCodeSkills: 개발 프로세스 전체 흐름 + 권한별 시나리오 (개발자/관리자)
2026-03-08 13:21:23 +09:00

302 lines
16 KiB
TypeScript

import { Alert } from '../components/common/Alert';
import { CodeBlock } from '../components/common/CodeBlock';
import { StepGuide } from '../components/common/StepGuide';
const SKILLS = [
{ name: '/push', desc: '변경 확인 → 커밋 메시지 자동 제안 → 푸시', perm: 'push' },
{ name: '/mr', desc: '커밋 + 푸시 + MR 생성 + 릴리즈 노트 갱신 + 봇 승인/머지 선택', perm: 'push' },
{ name: '/release', desc: '릴리즈 노트 정리 + develop→main MR + 봇 승인/머지', perm: 'admin' },
{ name: '/version', desc: 'VERSION-HISTORY.md (SemVer) 생성', perm: 'admin' },
{ name: '/create-mr', desc: 'MR만 생성 (세부 옵션 지원)', perm: 'push' },
{ name: '/fix-issue', desc: 'Gitea 이슈 분석 + 수정 브랜치 생성', perm: 'push' },
{ name: '/init-project', desc: '팀 표준 워크플로우로 프로젝트 초기화', perm: '-' },
{ name: '/sync-team-workflow', desc: '워크플로우 버전 동기화', perm: '-' },
];
export default function ClaudeCodeSkills() {
return (
<div className="max-w-4xl mx-auto py-12 px-6">
<h1 className="text-3xl font-bold text-text-primary mb-2">Claude Code </h1>
<p className="text-text-secondary mb-8">
Claude Code , MR , .
</p>
{/* 스킬 일람 */}
<h2 className="text-xl font-bold text-text-primary mt-10 mb-4"> </h2>
<div className="overflow-x-auto">
<table className="w-full bg-surface border border-border-default rounded-lg overflow-hidden text-sm">
<thead>
<tr className="bg-bg-tertiary">
<th className="text-left px-4 py-3 font-semibold text-text-primary"></th>
<th className="text-left px-4 py-3 font-semibold text-text-primary"></th>
<th className="text-left px-4 py-3 font-semibold text-text-primary"> </th>
</tr>
</thead>
<tbody className="divide-y divide-border-subtle">
{SKILLS.map((s) => (
<tr key={s.name}>
<td className="px-4 py-3 font-mono text-accent font-medium">{s.name}</td>
<td className="px-4 py-3 text-text-secondary">{s.desc}</td>
<td className="px-4 py-3">
{s.perm === 'admin' ? (
<span className="px-2 py-0.5 bg-danger/10 text-danger rounded text-xs font-medium">admin</span>
) : s.perm === 'push' ? (
<span className="px-2 py-0.5 bg-info/10 text-info rounded text-xs font-medium">push</span>
) : (
<span className="text-text-muted text-xs">-</span>
)}
</td>
</tr>
))}
</tbody>
</table>
</div>
<Alert type="info">
<strong>push</strong> ,{' '}
<strong>admin</strong> .
Gitea .
</Alert>
{/* 개발 프로세스 전체 흐름 */}
<h2 className="text-xl font-bold text-text-primary mt-10 mb-4"> </h2>
<p className="text-text-secondary mb-6">
, Claude Code .
</p>
{/* 시각적 플로우 */}
<div className="bg-surface border border-border-default rounded-xl p-5 mb-8">
<div className="flex flex-wrap items-center gap-2 text-sm font-mono justify-center">
<span className="px-3 py-1.5 bg-accent/10 text-accent rounded-lg font-semibold"> </span>
<span className="text-text-muted"></span>
<span className="px-3 py-1.5 bg-info/10 text-info rounded-lg font-semibold"> </span>
<span className="text-text-muted"></span>
<span className="px-3 py-1.5 bg-success/10 text-success rounded-lg font-semibold"></span>
<span className="text-text-muted"></span>
<span className="px-3 py-1.5 bg-warning/10 text-warning rounded-lg font-semibold">/push</span>
<span className="text-text-muted"></span>
<span className="px-3 py-1.5 bg-info/10 text-info rounded-lg font-semibold">/mr</span>
<span className="text-text-muted"></span>
<span className="px-3 py-1.5 bg-danger/10 text-danger rounded-lg font-semibold">/release</span>
</div>
</div>
<StepGuide
steps={[
{
title: '1. 계획 수립 — 플랜 모드',
content: (
<>
<p className="mb-2"> . Claude Code가 .</p>
<CodeBlock
language="text"
code={`"사용자 인증 기능을 추가해줘"
# → Claude가 자동으로 플랜 모드 전환
# → 코드베이스 분석 → 구현 계획 작성
# → 사용자 승인 후 구현 시작`}
/>
<p className="text-xs text-text-muted mt-1">3 , .</p>
</>
),
},
{
title: '2. 브랜치 분리 — feature 브랜치 생성',
content: (
<>
<p className="mb-2">develop에서 feature .</p>
<CodeBlock
language="bash"
code={`git checkout develop
git pull origin develop
git checkout -b feature/ISSUE-42-user-auth`}
/>
<p className="text-xs text-text-muted mt-1">
<code className="bg-bg-tertiary px-1 rounded">/fix-issue 42</code>
+ .
</p>
</>
),
},
{
title: '3. 개발 → /push',
content: (
<>
<p className="mb-2"> <code className="bg-bg-tertiary px-1 rounded">/push</code> +.</p>
<CodeBlock
language="text"
code={`/push
# 1. 팀 워크플로우 해시 체크 (불일치 시 자동 동기화)
# 2. 변경 파일 목록 + diff 요약 표시
# 3. Conventional Commits 형식 커밋 메시지 자동 제안
# 4. 사용자 승인 → commit + push`}
/>
<Alert type="info">
, .
<code className="bg-bg-tertiary px-1 rounded ml-1">/push</code> .
</Alert>
</>
),
},
{
title: '4. MR 생성 — /mr',
content: (
<>
<p className="mb-2"> develop으로 MR(Merge Request) .</p>
<CodeBlock
language="text"
code={`/mr
# 1. 커밋되지 않은 변경이 있으면 커밋+푸시
# 2. docs/RELEASE-NOTES.md [Unreleased] 자동 갱신
# 3. 릴리즈 노트 초안 확인 (사용자 첨삭 가능)
# 4. Gitea API로 MR 생성
# 5. 처리 방식 선택:
# - 리뷰 대기 (기본) → 리뷰어가 승인 후 머지
# - 봇 승인+머지 → claude-bot이 즉시 승인+머지`}
/>
</>
),
},
]}
/>
{/* 권한별 시나리오 */}
<h2 className="text-xl font-bold text-text-primary mt-10 mb-4"> </h2>
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
<div className="bg-surface border border-info/30 rounded-xl p-5">
<h4 className="font-semibold text-info mb-3 flex items-center gap-2">
<span className="px-2 py-0.5 bg-info/10 text-info rounded text-xs font-medium">push </span>
</h4>
<div className="text-sm text-text-secondary space-y-2">
<p className="font-medium text-text-primary"> : /push, /mr, /create-mr, /fix-issue</p>
<div className="bg-bg-tertiary rounded-lg p-3 text-xs space-y-1.5">
<div className="flex items-center gap-2">
<span className="text-success">1.</span>
<span><code className="bg-surface px-1 rounded">/push</code> +</span>
</div>
<div className="flex items-center gap-2">
<span className="text-success">2.</span>
<span><code className="bg-surface px-1 rounded">/mr</code> develop으로 MR </span>
</div>
<div className="flex items-center gap-2">
<span className="text-success">3.</span>
<span>&quot; &quot; </span>
</div>
<div className="flex items-center gap-2">
<span className="text-info"></span>
<span> Gitea에서 + </span>
</div>
</div>
<Alert type="info">
<code className="bg-bg-tertiary px-1 rounded">/release</code> <code className="bg-bg-tertiary px-1 rounded">/version</code>
admin . .
</Alert>
</div>
</div>
<div className="bg-surface border border-danger/30 rounded-xl p-5">
<h4 className="font-semibold text-danger mb-3 flex items-center gap-2">
<span className="px-2 py-0.5 bg-danger/10 text-danger rounded text-xs font-medium">admin </span>
</h4>
<div className="text-sm text-text-secondary space-y-2">
<p className="font-medium text-text-primary"> : /release, /version</p>
<div className="bg-bg-tertiary rounded-lg p-3 text-xs space-y-1.5">
<div className="flex items-center gap-2">
<span className="text-success">1.</span>
<span><code className="bg-surface px-1 rounded">/push</code> <code className="bg-surface px-1 rounded">/mr</code> &quot; +&quot; </span>
</div>
<div className="flex items-center gap-2">
<span className="text-success">2.</span>
<span>feature , develop에서:</span>
</div>
<div className="flex items-center gap-2">
<span className="text-success">3.</span>
<span><code className="bg-surface px-1 rounded">/release</code> developmain MR</span>
</div>
<div className="flex items-center gap-2 pl-4 text-text-muted">
<span> + </span>
</div>
<div className="flex items-center gap-2 pl-4 text-text-muted">
<span> claude-bot CI/CD </span>
</div>
<div className="flex items-center gap-2">
<span className="text-success">4.</span>
<span><code className="bg-surface px-1 rounded">/version</code> VERSION-HISTORY.md (SemVer)</span>
</div>
</div>
</div>
</div>
</div>
<Alert type="info">
Gitea . <strong>gc</strong> {' '}
<strong>developers</strong> push .
admin .
</Alert>
{/* 커스텀 에이전트 */}
<h2 className="text-xl font-bold text-text-primary mt-10 mb-4"> </h2>
<p className="text-text-secondary mb-4">
3 .
<code className="bg-bg-tertiary px-1 rounded">.claude/agents/</code> ,{' '}
<code className="bg-bg-tertiary px-1 rounded">/init-project</code> .
</p>
<div className="grid md:grid-cols-3 gap-4">
<div className="bg-surface border border-border-default rounded-lg p-5">
<h4 className="font-semibold text-info mb-2">explorer</h4>
<p className="text-sm text-text-secondary mb-2"> / </p>
<ul className="text-xs text-text-muted space-y-1">
<li> ( )</li>
<li> </li>
<li>모델: Sonnet</li>
</ul>
</div>
<div className="bg-surface border border-border-default rounded-lg p-5">
<h4 className="font-semibold text-success mb-2">implementer</h4>
<p className="text-sm text-text-secondary mb-2"> </p>
<ul className="text-xs text-text-muted space-y-1">
<li> </li>
<li> </li>
<li>모델: Sonnet</li>
</ul>
</div>
<div className="bg-surface border border-border-default rounded-lg p-5">
<h4 className="font-semibold text-warning mb-2">reviewer</h4>
<p className="text-sm text-text-secondary mb-2"> / </p>
<ul className="text-xs text-text-muted space-y-1">
<li> </li>
<li> </li>
<li>모델: Sonnet</li>
</ul>
</div>
</div>
{/* 시작하기 */}
<h2 className="text-xl font-bold text-text-primary mt-10 mb-4"></h2>
<p className="text-text-secondary mb-4">
Claude Code <code className="bg-bg-tertiary px-1 rounded">/init-project</code> .
</p>
<div className="bg-surface border border-border-default rounded-xl p-5">
<div className="space-y-3 text-sm">
<div className="flex items-start gap-3">
<span className="px-2 py-0.5 bg-accent/10 text-accent rounded text-xs font-semibold mt-0.5">1</span>
<span className="text-text-secondary">Claude Code : <code className="bg-bg-tertiary px-1 rounded">npm install -g @anthropic-ai/claude-code</code></span>
</div>
<div className="flex items-start gap-3">
<span className="px-2 py-0.5 bg-accent/10 text-accent rounded text-xs font-semibold mt-0.5">2</span>
<span className="text-text-secondary"> <code className="bg-bg-tertiary px-1 rounded">claude</code> <code className="bg-bg-tertiary px-1 rounded">/init-project</code></span>
</div>
<div className="flex items-start gap-3">
<span className="px-2 py-0.5 bg-accent/10 text-accent rounded text-xs font-semibold mt-0.5">3</span>
<span className="text-text-secondary">GITEA_TOKEN ( <strong> </strong> )</span>
</div>
</div>
</div>
<p className="text-xs text-text-muted mt-2">
<code className="bg-bg-tertiary px-1 rounded">CLAUDE_BOT_TOKEN</code>{' '}
<code className="bg-bg-tertiary px-1 rounded">settings.json</code> .
(rules, skills, agents) <code className="bg-bg-tertiary px-1 rounded">/push</code> .
</p>
</div>
);
}