Skip to content

Comments

agent: add meta-skill-creator and meta-agent-creator skills#28

Merged
p-iknow merged 1 commit intomainfrom
i26-feat/meta-skill-to-make-skill
Jan 24, 2026
Merged

agent: add meta-skill-creator and meta-agent-creator skills#28
p-iknow merged 1 commit intomainfrom
i26-feat/meta-skill-to-make-skill

Conversation

@p-iknow
Copy link
Contributor

@p-iknow p-iknow commented Jan 24, 2026

Requirement

resolves #26

Create meta-skills that help users easily create new skills and agents through interactive workflows with automation scripts.

Implementation

  • Add meta-skill-creator skill with 6-phase creation workflow

    • SKILL.md with structured guidance and description format matching Anthropic docs
    • init-skill.ts - scaffolds new skill projects
    • validate-skill.ts - validates skill structure
    • package-skill.ts - packages skills for distribution
    • Reference docs: agent-patterns.md, workflows.md
    • Template assets for skill creation
  • Add meta-agent-creator skill with 5-phase creation workflow

    • SKILL.md with agent categories and platform support (Claude Code, OpenCode)
    • init-agent.ts - scaffolds new agent configurations
    • validate-agent.ts - validates agent files
    • Reference docs: agent-templates.md

Test

N/A (no test files added)

Human Check

🤖 Generated with Claude Code

  • I reviewed it

Requirement:
Current meta-skill description format uses custom `Triggers:` syntax and
arbitrary constraints that don't align with official Anthropic documentation.

Implementation:
- Remove `Triggers:` format, use third-person natural language instead
- Update name constraint from max 40 chars to 64 chars (per official docs)
- Replace ~100 words limit with "keep concise" guideline
- Update validation checklist and anti-patterns sections
- Convert skill-template.md to English with new format
@github-actions github-actions bot added the agent Agent rules and commands label Jan 24, 2026
@p-iknow p-iknow marked this pull request as ready for review January 24, 2026 09:13
Copilot AI review requested due to automatic review settings January 24, 2026 09:13
@p-iknow p-iknow merged commit 27a1631 into main Jan 24, 2026
8 checks passed
@p-iknow p-iknow deleted the i26-feat/meta-skill-to-make-skill branch January 24, 2026 09:13
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to add meta-skills to help users create new skills and agents through interactive workflows. However, there's a fundamental disconnect: issue #26 explicitly requests simplifying the meta-skill-creator to work like make-command.md with an "interactive Q&A workflow without requiring external scripts," but this implementation still provides a complex 6-phase workflow with multiple TypeScript scripts.

Changes:

  • Added meta-skill-creator skill with 6-phase creation workflow, automation scripts (init-skill.ts, validate-skill.ts, package-skill.ts), reference documentation, and template assets
  • Added meta-agent-creator skill with 5-phase creation workflow and automation scripts (init-agent.ts, validate-agent.ts) plus agent templates and reference documentation

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 18 comments.

Show a summary per file
File Description
.claude/skills/meta-skill-creator/SKILL.md Main documentation for skill creation with 6-phase workflow guidance
.claude/skills/meta-skill-creator/scripts/init-skill.ts Scaffolding script to initialize new skill projects
.claude/skills/meta-skill-creator/scripts/validate-skill.ts Validation script to check skill structure and completeness
.claude/skills/meta-skill-creator/scripts/package-skill.ts Packaging script to create distributable .skill files
.claude/skills/meta-skill-creator/references/workflows.md Reference documentation for workflow patterns
.claude/skills/meta-skill-creator/references/agent-patterns.md Reference documentation for agent architecture patterns
.claude/skills/meta-skill-creator/assets/templates/skill-template.md Template file for skill structure (appears unused by scripts)
.claude/skills/meta-agent-creator/SKILL.md Main documentation for agent creation with 5-phase workflow
.claude/skills/meta-agent-creator/scripts/init-agent.ts Scaffolding script to initialize new agent configurations
.claude/skills/meta-agent-creator/scripts/validate-agent.ts Validation script for agent files
.claude/skills/meta-agent-creator/references/agent-templates.md Ready-to-use agent templates for common use cases

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +36 to +135
return { valid: false, error: "SKILL.md 파일이 없습니다" };
}

const content = readFileSync(skillMdPath, "utf-8");
const todoMatches = content.match(/\[TODO[^\]]*\]/gi);

if (todoMatches && todoMatches.length > 0) {
return { valid: false, error: `완료되지 않은 TODO 항목이 ${todoMatches.length}개 있습니다` };
}

const frontmatterMatch = content.match(/^---\s*\n([\s\S]*?)\n---/);
if (!frontmatterMatch) {
return { valid: false, error: "YAML frontmatter가 없습니다" };
}

if (!frontmatterMatch[1].includes("name:")) {
return { valid: false, error: "frontmatter에 'name' 필드가 없습니다" };
}

if (!frontmatterMatch[1].includes("description:")) {
return { valid: false, error: "frontmatter에 'description' 필드가 없습니다" };
}

return { valid: true };
}

function packageSkill(skillPath: string, outputDir?: string): PackageResult {
const resolvedPath = resolve(skillPath);
const skillName = basename(resolvedPath);

if (!existsSync(resolvedPath)) {
return { success: false, error: `스킬 폴더를 찾을 수 없습니다: ${resolvedPath}` };
}

if (!statSync(resolvedPath).isDirectory()) {
return { success: false, error: `경로가 디렉토리가 아닙니다: ${resolvedPath}` };
}

console.log("🔍 패키징 전 검증 중...");
const validation = validateBeforePackage(resolvedPath);
if (!validation.valid) {
return { success: false, error: validation.error };
}
console.log("✅ 검증 통과\n");

const targetDir = outputDir ? resolve(outputDir) : process.cwd();
if (!existsSync(targetDir)) {
mkdirSync(targetDir, { recursive: true });
}

const outputPath = join(targetDir, `${skillName}.skill`);
const files = getAllFiles(resolvedPath);

console.log("📦 파일 패키징 중:");

try {
const zipCommand = `cd "${resolvedPath}" && zip -r "${outputPath}" .`;
execSync(zipCommand, { stdio: "pipe" });

for (const file of files) {
const relativePath = file.replace(resolvedPath + "/", "");
console.log(` - ${relativePath}`);
}

console.log(`\n✅ 패키징 완료: ${outputPath}`);
return { success: true, outputPath };
} catch (error) {
const message = error instanceof Error ? error.message : String(error);
return { success: false, error: `패키징 오류: ${message}` };
}
}

function main(): void {
const args = process.argv.slice(2);

if (args.length < 1) {
console.log("사용법: bun scripts/package-skill.ts <skill-folder> [output-dir]");
console.log("\n예시:");
console.log(" bun scripts/package-skill.ts .claude/skills/my-skill");
console.log(" bun scripts/package-skill.ts .claude/skills/my-skill ./dist");
process.exit(1);
}

const skillPath = args[0];
const outputDir = args[1];

console.log(`📦 스킬 패키징: ${skillPath}`);
if (outputDir) {
console.log(` 출력 디렉토리: ${outputDir}`);
}
console.log();

const result = packageSkill(skillPath, outputDir);

if (result.success) {
process.exit(0);
} else {
console.error(`❌ 오류: ${result.error}`);
process.exit(1);
}
Copy link

Copilot AI Jan 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to the validate-skill.ts script, all error messages and console output in this file are in Korean (스킬 폴더를 찾을 수 없습니다, 검증 통과, etc.), which is inconsistent with the stated goal that all generated content should be in English. For a consistent user experience, error messages and output should be in English.

Copilot uses AI. Check for mistakes.
Comment on lines +92 to +93
const zipCommand = `cd "${resolvedPath}" && zip -r "${outputPath}" .`;
execSync(zipCommand, { stdio: "pipe" });
Copy link

Copilot AI Jan 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The package script uses the zip command which is not available on all systems. On Windows, for example, zip is not installed by default. Since this is a cross-platform TypeScript/Node.js project (using Bun), the script should use a cross-platform solution like the archiver npm package or Node.js built-in compression capabilities instead of relying on system commands. This would ensure the script works consistently across Windows, macOS, and Linux.

Copilot uses AI. Check for mistakes.
Comment on lines +127 to +128
if (name.length > 40) {
return { valid: false, error: "스킬 이름은 40자를 초과할 수 없습니다" };
Copy link

Copilot AI Jan 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's an inconsistency in the name length validation. Line 127 validates that the name must be 40 characters or less, but the SKILL.md documentation at line 120 states "kebab-case, max 64 chars". The validation should match the documented specification of 64 characters.

Suggested change
if (name.length > 40) {
return { valid: false, error: "스킬 이름은 40자를 초과할 수 없습니다" };
if (name.length > 64) {
return { valid: false, error: "스킬 이름은 64자를 초과할 수 없습니다" };

Copilot uses AI. Check for mistakes.
Comment on lines +12 to +101
PDF 폼 작성은 다음 단계를 따릅니다:

1. 폼 분석 (analyze-form.ts 실행)
2. 필드 매핑 생성 (fields.json 편집)
3. 매핑 검증 (validate-fields.ts 실행)
4. 폼 작성 (fill-form.ts 실행)
5. 출력 검증 (verify-output.ts 실행)
```

## Conditional Workflows

For tasks with branching logic, guide through decision points:

```markdown
## Workflow Decision Tree

1. 작업 유형 결정:
**새 콘텐츠 생성?** → "생성 워크플로우" 따르기
**기존 콘텐츠 수정?** → "편집 워크플로우" 따르기

### 생성 워크플로우
1. 템플릿 선택
2. 데이터 입력
3. 검증 및 출력

### 편집 워크플로우
1. 파일 로드
2. 변경 사항 적용
3. 백업 후 저장
```

## Iteration Patterns

For workflows that may need multiple passes:

```markdown
## 반복 워크플로우

1. 초기 구현 수행
2. 검증 실행
3. 검증 통과?
- ✅ 예: 완료
- ❌ 아니오: 오류 수정 후 2단계로 복귀

최대 반복 횟수: 3회 (초과 시 사용자에게 알림)
```

## Parallel Execution Patterns

For independent tasks that can run simultaneously:

```markdown
## 병렬 실행

다음 작업들은 동시에 실행 가능합니다:

| 작업 | 담당 | 상태 |
|------|------|------|
| API 문서 분석 | librarian | 백그라운드 |
| 코드베이스 탐색 | explore | 백그라운드 |
| 유사 구현 검색 | explore | 백그라운드 |

모든 작업 완료 후 결과 종합
```

## Error Handling Patterns

```markdown
## 오류 처리

### 재시도 가능한 오류
- 네트워크 타임아웃 → 3회까지 재시도
- 일시적 API 오류 → 지수 백오프로 재시도

### 복구 불가능한 오류
- 파일 손상 → 사용자에게 알림 후 중단
- 권한 부족 → 필요한 권한 안내 후 중단
```

## Verification Patterns

```markdown
## 검증 체크리스트

각 작업 완료 후:
- [ ] 출력 파일 존재 확인
- [ ] 파일 형식 유효성 검증
- [ ] 예상 결과와 비교
- [ ] 부작용 없음 확인
```
Copy link

Copilot AI Jan 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflow examples in this reference file contain Korean text (PDF 폼 작성은 다음 단계를 따릅니다, 작업 유형 결정, 반복 워크플로우, 병렬 실행, etc.). While these are example workflows, they should ideally be in English to be consistent with the stated policy that all generated content should be in English, especially since users will likely copy these patterns when creating their own skills.

Copilot uses AI. Check for mistakes.
Comment on lines +89 to +103
function initAgent(name: string, basePath: string, platform: Platform): { success: boolean; path?: string; error?: string } {
const validation = validateAgentName(name);
if (!validation.valid) return { success: false, error: validation.error };

const outputDir = resolve(basePath);
if (!existsSync(outputDir)) {
mkdirSync(outputDir, { recursive: true });
}

try {
let filePath: string;
let content: string;

filePath = join(outputDir, `${name}.ts`);
content = applyTemplate(OPENCODE_TEMPLATE, name);
Copy link

Copilot AI Jan 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The platform parameter is accepted and validated but never actually used in the initAgent function. Lines 102-103 always use the OPENCODE_TEMPLATE regardless of the platform value passed in. This means specifying --platform claude-code has no effect - the script will always generate OpenCode format. Either the platform parameter should be used to select different templates, or it should be removed if only one format is supported.

Copilot uses AI. Check for mistakes.
Comment on lines +13 to +66
description: |
[TODO: 스킬의 목적과 사용 시점을 명확하게 설명하세요]
[TODO: 트리거 조건을 포함하세요 - 예: "~할 때 사용", "~라고 말하면 활성화"]
트리거: "키워드1", "키워드2", "keyword3"
---

# {{SKILL_TITLE}}

## 개요

[TODO: 이 스킬이 무엇을 하는지 1-2문장으로 설명하세요]

## 빠른 시작

[TODO: 즉시 사용 가능한 예시를 제공하세요]

\`\`\`bash
# 예시 명령어
bun scripts/example.ts
\`\`\`

## 사용 가이드

### 기본 사용법

[TODO: 기본적인 사용 방법을 설명하세요]

### 고급 기능

[TODO: 필요한 경우 고급 기능을 설명하세요]

## 리소스

### scripts/

실행 가능한 스크립트들이 포함됩니다.

- \`example.ts\` - 예시 스크립트 (필요에 따라 수정하거나 삭제하세요)

### references/

상세 문서가 필요한 경우 이 디렉토리에 추가합니다.

- \`guide.md\` - 상세 가이드 (필요에 따라 수정하거나 삭제하세요)

### assets/

출력물에 사용되는 파일들이 포함됩니다.

- 템플릿, 이미지, 설정 파일 등

---

**불필요한 디렉토리나 파일은 삭제하세요.** 모든 스킬이 세 가지 리소스 유형을 모두 필요로 하지는 않습니다.
Copy link

Copilot AI Jan 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a structural inconsistency between the two skill templates. The skill-template.md file in assets/templates/ uses a simpler structure with single-line description in frontmatter and placeholders like {{SKILL_DESCRIPTION}} and {{WHEN_TO_USE}}, while the SKILL_MD_TEMPLATE in init-skill.ts uses multi-line YAML (description: |) and has Korean TODO items. These templates should be consistent in structure and approach. Either consolidate to one template or ensure they serve clearly different purposes.

Suggested change
description: |
[TODO: 스킬의 목적과 사용 시점을 명확하게 설명하세요]
[TODO: 트리거 조건을 포함하세요 - : "~할 때 사용", "~라고 말하면 활성화"]
트리거: "키워드1", "키워드2", "keyword3"
---
# {{SKILL_TITLE}}
## 개요
[TODO: 스킬이 무엇을 하는지 1-2문장으로 설명하세요]
## 빠른 시작
[TODO: 즉시 사용 가능한 예시를 제공하세요]
\`\`\`bash
# 예시 명령어
bun scripts/example.ts
\`\`\`
## 사용 가이드
### 기본 사용법
[TODO: 기본적인 사용 방법을 설명하세요]
### 고급 기능
[TODO: 필요한 경우 고급 기능을 설명하세요]
## 리소스
### scripts/
실행 가능한 스크립트들이 포함됩니다.
- \`example.ts\` - 예시 스크립트 (필요에 따라 수정하거나 삭제하세요)
### references/
상세 문서가 필요한 경우 디렉토리에 추가합니다.
- \`guide.md\` - 상세 가이드 (필요에 따라 수정하거나 삭제하세요)
### assets/
출력물에 사용되는 파일들이 포함됩니다.
- 템플릿, 이미지, 설정 파일
---
**불필요한 디렉토리나 파일은 삭제하세요.** 모든 스킬이 가지 리소스 유형을 모두 필요로 하지는 않습니다.
description: {{SKILL_DESCRIPTION}}
when_to_use: {{WHEN_TO_USE}}
---
# {{SKILL_TITLE}}
## Overview
{{SKILL_DESCRIPTION}}
## When to use
{{WHEN_TO_USE}}
## Quick start
\`\`\`bash
# Example command
bun scripts/example.ts
\`\`\`
## Usage guide
### Basic usage
<!-- Describe the basic way to use this skill. -->
### Advanced features
<!-- Describe any advanced or optional features. -->
## Resources
### scripts/
Executable scripts related to this skill.
- \`example.ts\` - Example script (modify or remove as needed)
### references/
Additional documentation for this skill.
- \`guide.md\` - Detailed guide (modify or remove as needed)
### assets/
Files used as outputs or templates for this skill.
- Templates, images, configuration files, etc.
---
Unnecessary directories or files can be removed. Not every skill needs all three resource types.

Copilot uses AI. Check for mistakes.
Comment on lines +19 to +38
function parseFrontmatter(content: string): { frontmatter: Frontmatter; body: string } | null {
const match = content.match(/^---\s*\n([\s\S]*?)\n---\s*\n([\s\S]*)$/);
if (!match) return null;

const yamlContent = match[1];
const body = match[2];
const frontmatter: Frontmatter = {};

for (const line of yamlContent.split("\n")) {
const colonIndex = line.indexOf(":");
if (colonIndex > 0) {
const key = line.slice(0, colonIndex).trim();
const value = line.slice(colonIndex + 1).trim();
if (key && !key.startsWith(" ")) {
frontmatter[key] = value.replace(/^["']|["']$/g, "");
}
}
}

return { frontmatter, body };
Copy link

Copilot AI Jan 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The YAML frontmatter parser is overly simplistic and will fail on multi-line YAML values. For example, if a description field uses YAML's multi-line syntax (using | or > operators), the parser will only capture the | or > character as the value instead of the full multi-line content. This is problematic because line 14 of the SKILL.md template in init-skill.ts uses exactly this syntax: description: |. The parser should properly handle multi-line YAML values or use a proper YAML parsing library.

Copilot uses AI. Check for mistakes.
Comment on lines +76 to +77
if (name.length > 40) {
errors.push(`'name'이 40자를 초과합니다: ${name.length}자`);
Copy link

Copilot AI Jan 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's an inconsistency in the name length validation. Line 76 validates that the name must be 40 characters or less, but the SKILL.md documentation at line 120 states "kebab-case, max 64 chars". The validation should match the documented specification of 64 characters.

Suggested change
if (name.length > 40) {
errors.push(`'name'이 40자를 초과합니다: ${name.length}자`);
if (name.length > 64) {
errors.push(`'name'이 64자를 초과합니다: ${name.length}자`);

Copilot uses AI. Check for mistakes.
Comment on lines +49 to +192
```markdown
---
name: explore
description: 코드베이스 탐색 전문가. "X는 어디에?", "Y가 있는 파일은?" 질문에 사용
model: fast
readonly: true
---

코드베이스 검색 전문가입니다. 파일과 코드를 찾아 실행 가능한 결과를 반환합니다.

## 미션

다음 질문에 답합니다:
- "X는 어디에 구현되어 있나요?"
- "Y를 포함하는 파일은?"
- "Z를 수행하는 코드를 찾아주세요"

## 결과 형식

<results>
<files>
- /절대/경로/파일1.ts — 관련 이유
- /절대/경로/파일2.ts — 관련 이유
</files>
<answer>
실제 필요에 대한 직접적인 답변
</answer>
</results>
```

### Specialist Agents

Domain-specific implementation agents.

```markdown
---
name: frontend-engineer
description: 프론트엔드 UI/UX 전문가. 시각적 변경, 스타일링, 레이아웃, 애니메이션에 사용
model: inherit
---

프론트엔드 UI/UX 전문 엔지니어입니다.

## 전문 분야

- 컴포넌트 디자인 및 구현
- 반응형 레이아웃
- 애니메이션 및 트랜지션
- 접근성 (a11y)
- 디자인 시스템 준수
```

### Advisor Agents

Read-only consultation agents for high-stakes decisions.

```markdown
---
name: oracle
description: 읽기 전용 자문 에이전트. 아키텍처 결정, 복잡한 디버깅, 2회 이상 실패 후 사용
model: inherit
readonly: true
---

전략적 기술 자문가입니다. 복잡한 분석이나 아키텍처 결정이 필요할 때 호출됩니다.

## 역할

- 코드베이스 분석
- 구체적이고 구현 가능한 기술 권장 사항 제시
- 아키텍처 설계 및 리팩토링 로드맵
- 복잡한 기술 문제 해결

## 제약

- 읽기 전용: 파일 생성, 수정, 삭제 불가
- 자문만 제공, 직접 구현하지 않음
```

### Orchestration Agents

Coordinator agents that delegate to other agents.

```markdown
---
name: orchestrator
description: 복잡한 다단계 작업의 마스터 코디네이터. 작업 분할, 위임, 검증 수행
model: inherit
---

다중 에이전트 조율자입니다.

## 사용 가능한 서브에이전트

- `/explore` - 빠른 코드베이스 검색
- `/librarian` - 문서 및 외부 참조 검색
- `/oracle` - 아키텍처 자문
- `/verifier` - 작업 완료 검증

## 워크플로우

1. 작업 분석 및 분할
2. 적절한 서브에이전트에 위임 (병렬 가능)
3. 결과 수집 및 검증
4. 최종 출력 종합

## 필수 규칙

- 복잡한 작업은 반드시 위임
- 가능하면 병렬 실행
- 완료 전 반드시 검증
```

## Platform Format (Claude Code / OpenCode)

```typescript
export function createExploreAgent(model: string): AgentConfig {
return {
name: "explore",
description: "코드베이스 탐색 전문가...",
mode: "subagent",
model,
temperature: 0.1,
tools: { include: ["read", "glob", "grep", "ast_grep_search"] },
prompt: `...`
};
}
```

## Best Practices

### DO

- Write focused agents with single responsibility
- Include specific trigger conditions in description
- Use readonly for consultation-only agents
- Set appropriate model tier based on complexity

### DON'T

- Create vague "helper" agents
- Give broad tool access when not needed
- Use expensive models for simple lookups
- Skip verification in orchestrators
Copy link

Copilot AI Jan 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The agent pattern examples in this reference file contain Korean text in descriptions and prompts (코드베이스 탐색 전문가, 미션, 결과 형식, etc.). While this is a reference file for meta-skill-creator and not meta-agent-creator, it still provides agent templates that should be consistent with the stated policy that generated agent content should be in English. These examples should be in English or clarified that they are examples only.

Copilot uses AI. Check for mistakes.
Comment on lines +18 to +25
# Initialize a new skill (using npx/bunx)
npx ts-node scripts/init-skill.ts <skill-name> --path <output-directory>

# Or with Bun
bun scripts/init-skill.ts <skill-name> --path <output-directory>

# Example
bun scripts/init-skill.ts my-awesome-skill --path .claude/skills
Copy link

Copilot AI Jan 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The script paths in the usage examples are incomplete. Line 19 shows npx ts-node scripts/init-skill.ts and line 22 shows bun scripts/init-skill.ts, but these scripts are actually located at .claude/skills/meta-skill-creator/scripts/init-skill.ts. Users would need to either cd into the skill directory first or use the full path. The examples should clarify the working directory or use complete paths for clarity.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent Agent rules and commands

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: meta skill to make skill

1 participant