Back to Skills

docs-admin

verified

어드민 문서 자동 뷰어 - 모든 가이드를 한 곳에서 관리

View on GitHub

Marketplace

kreatsaas-marketplace

johunsang/kreatsaas

Plugin

kreatsaas

Development

Repository

johunsang/kreatsaas
1stars

skills/docs-admin/SKILL.md

Last Verified

January 16, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/johunsang/kreatsaas/blob/main/skills/docs-admin/SKILL.md -a claude-code --skill docs-admin

Installation paths:

Claude
.claude/skills/docs-admin/
Powered by add-skill CLI

Instructions

# 어드민 문서 자동 뷰어

> 모든 KreatSaaS 가이드를 어드민 대시보드에서 한 곳에서 관리하고 열람

---

## 1. 자동 문서 로더

### 문서 스캔 유틸리티

```typescript
// src/lib/docs/scanner.ts
import fs from 'fs/promises';
import path from 'path';
import matter from 'gray-matter';

export type DocCategory =
  | 'beginner'      // 초보자 가이드
  | 'setup'         // 설치 가이드
  | 'development'   // 개발 가이드
  | 'deployment'    // 배포 가이드
  | 'enhancement'   // 고도화 가이드
  | 'seo'           // SEO 가이드
  | 'admin'         // 어드민 가이드
  | 'api';          // API 가이드

export interface DocMeta {
  slug: string;
  title: string;
  description: string;
  category: DocCategory;
  order: number;
  lastUpdated: string;
  triggers?: string[];
}

export interface DocFile extends DocMeta {
  content: string;
}

// KreatSaaS 스킬 디렉토리에서 모든 문서 스캔
export async function scanDocs(skillsDir: string): Promise<DocMeta[]> {
  const docs: DocMeta[] = [];

  try {
    const skillFolders = await fs.readdir(skillsDir);

    for (const folder of skillFolders) {
      const skillPath = path.join(skillsDir, folder, 'SKILL.md');

      try {
        const content = await fs.readFile(skillPath, 'utf-8');
        const { data, content: body } = matter(content);

        docs.push({
          slug: folder,
          title: data.name || folder,
          description: data.description || '',
          category: getCategoryFromSlug(folder),
          order: getCategoryOrder(folder),
          lastUpdated: (await fs.stat(skillPath)).mtime.toISOString(),
          triggers: data.triggers || [],
        });
      } catch {
        // 파일이 없으면 스킵
      }
    }
  } catch (error) {
    console.error('Error scanning docs:', error);
  }

  return docs.sort((a, b) => a.order - b.order);
}

// 문서 내용 가져오기
export async function getDoc(skillsDir: string, slug: string): Promise<DocFile | null> {
  const skillPath = path.join(skillsDir, slug, 'SKILL.md');

  try {
    const content = await fs.readFile(skillPath, 'utf-8');
    const { data, content: body } = matter(content);
    const st

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
15323 chars