gc-guide/src/content/ClaudeCodeSkills.tsx
htlee 6ac1c8cedb feat: /mr 스킬 봇 승인/머지 옵션 반영
- /mr 스킬에 claude-bot 자동 승인+머지 선택 단계 추가
- 가이드 스킬 테이블 및 개발 흐름에 봇 승인 설명 반영
2026-03-01 18:09:46 +09:00

199 lines
9.2 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-4">
Claude Code .
</p>
<StepGuide
steps={[
{
title: '코드 수정 후 푸시 — /push',
content: (
<>
<p className="mb-2"> +.</p>
<CodeBlock
language="text"
code={`/push
# 변경 파일 목록 표시 → 커밋 메시지 자동 제안
# → 사용자 승인 후 커밋 + 푸시
/push "feat(auth): 로그인 검증 로직 추가"
# 메시지를 직접 지정할 수도 있습니다`}
/>
</>
),
},
{
title: 'MR 생성 — /mr',
content: (
<>
<p className="mb-2">feature develop으로 MR을 .</p>
<CodeBlock
language="text"
code={`/mr
# 1. 커밋되지 않은 변경이 있으면 커밋+푸시
# 2. 릴리즈 노트(RELEASE-NOTES.md) 자동 갱신
# 3. 사용자 첨삭 확인 후 Gitea MR 생성
# 4. 리뷰 대기 or 봇 승인+머지 선택`}
/>
<p className="text-xs text-text-muted mt-1">
<code className="bg-bg-tertiary px-1 rounded">/mr</code>{' '}
<code className="bg-bg-tertiary px-1 rounded">/push</code> + MR + .
MR claude-bot + .
</p>
</>
),
},
{
title: '릴리즈 — /release (관리자)',
content: (
<>
<p className="mb-2">develop main MR을 , .</p>
<CodeBlock
language="text"
code={`/release
# 1. develop 동기화 확인
# 2. 릴리즈 노트 [Unreleased] → [날짜] 전환 + 압축
# 3. develop→main MR 생성
# 4. claude-bot 자동 승인 → 머지 → CI/CD 배포`}
/>
<Alert type="warning">
<code className="bg-bg-tertiary px-1 rounded">/release</code> <strong>admin</strong> .
</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">
.
</p>
<ul className="space-y-2 text-text-secondary">
<li className="flex items-start gap-2">
<span className="text-accent mt-0.5"></span>
<span>
<strong>GITEA_TOKEN</strong> <strong> </strong>
&quot;Gitea API &quot;
</span>
</li>
<li className="flex items-start gap-2">
<span className="text-accent mt-0.5"></span>
<span>
<strong>Claude Code </strong> <code className="bg-bg-tertiary px-1 rounded">npm install -g @anthropic-ai/claude-code</code>
</span>
</li>
<li className="flex items-start gap-2">
<span className="text-accent mt-0.5"></span>
<span>
<strong> </strong> <code className="bg-bg-tertiary px-1 rounded">/init-project</code>
</span>
</li>
</ul>
<Alert type="info">
<code className="bg-bg-tertiary px-1 rounded">GITEA_TOKEN</code>{' '}
<code className="bg-bg-tertiary px-1 rounded">settings.json</code>{' '}
<code className="bg-bg-tertiary px-1 rounded">env</code> .
settings.json .
</Alert>
</div>
);
}