一键导入
nutrition-analysis-prompt
식단 입력 → 칼로리·영양소 분석 Claude 프롬프트 패턴. 하루 목표 대비 진행률, 구조화 JSON 출력, 한국 식품 기반.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
식단 입력 → 칼로리·영양소 분석 Claude 프롬프트 패턴. 하루 목표 대비 진행률, 구조화 JSON 출력, 한국 식품 기반.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Spring Security 5.5.x + jjwt 0.10.7 레거시 JWT 인증 - WebSecurityConfigurerAdapter, OncePerRequestFilter, javax.servlet 환경
Spring Boot 3.x + Spring Security 6.x + jjwt 0.12.x 기반 모던 JWT 인증 패턴. SecurityFilterChain Bean, 람다 DSL, jakarta.servlet, Virtual Threads 적용
Unity 6 LTS 2D 모바일 게임용 uGUI 시스템 전문 스킬. Canvas/RectTransform/TextMeshPro, 모바일 UI 패턴(팝업·무한 스크롤·광고·IAP), 성능 최적화, UI Toolkit과의 선택 기준 포함.
아크라시아(akrasia, 자제력 없음) 학술 논쟁의 핵심 구도와 주요 연구자·문헌을 빠르게 파악할 수 있는 도메인 지식 스킬. 도덕윤리교육 전공 대학원생(석/박사)이 학위논문·KCI 투고·세미나 준비 시 고대–현대–한국 학계–도덕심리학 흐름을 한 번에 짚도록 구성. <example>사용자: "아리스토텔레스의 propeteia와 astheneia 구분을 인용하려는데 출처를 알려줘"</example> <example>사용자: "데이비슨이 의지박약을 어떻게 가능하다고 봤는지 핵심 논증을 정리해줘"</example> <example>사용자: "한국 도덕교육 학계에서 아크라시아 다룬 논문 있어?"</example>
아리스토텔레스 『니코마코스 윤리학』에서 akrasia(자제력없음)와 akolasia(무절제)의 5축 차이를 정밀하게 정리한 학위논문 자료 스킬. NE VII.4 1147b20-1148b14, VII.8 1150b29-1151a28, III.10-12 1117b23-1119b18 절별 분해와 표준 학자 해석(Bostock, Broadie-Rowe, Pakaluk, Hursthouse, Charles 등)을 포함. 도덕교육 적용을 위한 두 상태 차이의 함의 및 한국어 번역어 처리 권장안 제공. <example>사용자: "akrates와 akolastos를 prohairesis 측면에서 어떻게 구분해야 하나요?"</example> <example>사용자: "NE VII.4의 ἁπλῶς akrasia가 akolasia와 어떻게 갈라지는지 절별 분해해주세요"</example> <example>사용자: "Hursthouse의 연속체 모델을 도덕교육 적용 절에서 어떻게 활용할 수 있나요?"</example>
한국 위기 대응 자원(자살·자해·정신건강·여성·청소년·노인·다문화) 핫라인과 앱·챗봇 안전 가드 응답 패턴 종합. 꿈 해몽·정신건강 앱 등 자가 진단/감정 콘텐츠 도메인에서 위험 신호 포착 시 안전한 자원 안내 문구를 작성할 때 참조. <example>사용자: "꿈 해몽 앱에 위기 안내 문구를 어떻게 넣을까?"</example> <example>사용자: "한국에서 자살예방 핫라인 번호가 어떻게 바뀌었지?"</example> <example>사용자: "정신건강 챗봇 안전 가드 응답 템플릿을 짜줘"</example>
| name | nutrition-analysis-prompt |
| description | 식단 입력 → 칼로리·영양소 분석 Claude 프롬프트 패턴. 하루 목표 대비 진행률, 구조화 JSON 출력, 한국 식품 기반. |
소스: https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices 참고: https://platform.claude.com/cookbook/tool-use-vision-with-tools 검증일: 2026-06-26
당신은 한국 식품에 정통한 영양 분석 전문가입니다.
역할:
- 사용자가 입력한 식단의 칼로리와 영양소를 분석합니다
- 한국 식품의약품안전처 식품영양성분 DB 기준으로 추정합니다
- 분석 결과는 반드시 지정된 JSON 형식으로만 반환합니다
중요 규칙:
- 제공하는 수치는 추정값임을 항상 인지합니다
- 조리법·양념·재료 비율에 따라 실제 값은 달라질 수 있음을 인지합니다
- 모든 수치는 입력된 섭취량 기준으로 계산합니다
- 의료적 진단이나 처방은 절대 하지 않습니다
다음 음식의 영양소를 분석해주세요.
음식명: {foodName}
섭취량: {amount}{unit}
아래 JSON 형식으로만 응답해주세요:
{
"foodName": "음식명",
"amount": 숫자,
"unit": "g | ml | 인분",
"nutrition": {
"calories": 숫자,
"carbs": 숫자,
"protein": 숫자,
"fat": 숫자,
"fiber": 숫자,
"sodium": 숫자
},
"confidence": "high | medium | low",
"note": "추정 근거 또는 주의사항"
}
const buildDayAnalysisPrompt = (
mealLogs: MealLog[],
dailyGoal: NutritionGoal
): string => {
const mealList = mealLogs
.map(log => `- ${log.foodName}: ${log.amount}${log.unit} (${log.mealType})`)
.join('\n');
return `
오늘 섭취한 식단을 분석해주세요.
[오늘 섭취 식단]
${mealList}
[하루 영양 목표]
- 칼로리: ${dailyGoal.calories} kcal
- 탄수화물: ${dailyGoal.carbs}g
- 단백질: ${dailyGoal.protein}g
- 지방: ${dailyGoal.fat}g
- 나트륨: ${dailyGoal.sodium}mg 미만
아래 JSON 형식으로만 응답해주세요:
{
"totalNutrition": {
"calories": 숫자,
"carbs": 숫자,
"protein": 숫자,
"fat": 숫자,
"fiber": 숫자,
"sodium": 숫자
},
"goalProgress": {
"caloriesPercent": 숫자 (0~100 이상),
"carbsPercent": 숫자,
"proteinPercent": 숫자,
"fatPercent": 숫자,
"sodiumPercent": 숫자
},
"evaluation": "good | warning | over",
"feedback": {
"positive": ["잘 지킨 점 1", "잘 지킨 점 2"],
"improve": ["개선할 점 1", "개선할 점 2"],
"suggestion": "내일 식단 제안 (1~2문장)"
},
"confidence": "high | medium | low"
}
`;
};
import Anthropic from '@anthropic-ai/sdk';
const client = new Anthropic();
interface NutritionResult {
foodName: string;
amount: number;
unit: string;
nutrition: {
calories: number;
carbs: number;
protein: number;
fat: number;
fiber: number;
sodium: number;
};
confidence: 'high' | 'medium' | 'low';
note?: string;
}
const analyzeFoodNutrition = async (
foodName: string,
amount: number,
unit: string = 'g'
): Promise<NutritionResult> => {
const message = await client.messages.create({
model: 'claude-sonnet-4-6',
max_tokens: 512,
system: `당신은 한국 식품에 정통한 영양 분석 전문가입니다. 한국 식품의약품안전처 식품영양성분 DB 기준으로 영양소를 추정하며, 응답은 반드시 JSON 형식으로만 반환합니다.`,
messages: [{
role: 'user',
content: `음식명: ${foodName}\n섭취량: ${amount}${unit}\n\n영양소를 JSON으로 분석해주세요. 필드: foodName, amount, unit, nutrition(calories/carbs/protein/fat/fiber/sodium), confidence, note`
}],
});
const text = message.content[0].type === 'text' ? message.content[0].text : '{}';
const jsonStr = text.replace(/```json\n?|\n?```/g, '').trim();
return JSON.parse(jsonStr);
};
interface DayAnalysisResult {
totalNutrition: {
calories: number;
carbs: number;
protein: number;
fat: number;
fiber: number;
sodium: number;
};
goalProgress: {
caloriesPercent: number;
carbsPercent: number;
proteinPercent: number;
fatPercent: number;
sodiumPercent: number;
};
evaluation: 'good' | 'warning' | 'over';
feedback: {
positive: string[];
improve: string[];
suggestion: string;
};
confidence: 'high' | 'medium' | 'low';
}
const analyzeDayNutrition = async (
mealLogs: MealLog[],
dailyGoal: NutritionGoal
): Promise<DayAnalysisResult> => {
const message = await client.messages.create({
model: 'claude-sonnet-4-6',
max_tokens: 1024,
system: `당신은 한국 식품에 정통한 영양 분석 전문가입니다. 분석 결과를 JSON 형식으로만 반환합니다. 의료적 진단은 하지 않습니다.`,
messages: [{
role: 'user',
content: buildDayAnalysisPrompt(mealLogs, dailyGoal),
}],
});
const text = message.content[0].type === 'text' ? message.content[0].text : '{}';
const jsonStr = text.replace(/```json\n?|\n?```/g, '').trim();
return JSON.parse(jsonStr);
};
type MealType = '아침' | '점심' | '저녁' | '간식';
interface MealLog {
id: string;
foodName: string;
amount: number;
unit: string;
mealType: MealType;
loggedAt: string; // ISO 8601
nutrition?: { // 캐시 (이미 분석된 경우)
calories: number;
carbs: number;
protein: number;
fat: number;
fiber: number;
sodium: number;
};
}
interface NutritionGoal {
calories: number; // kcal
carbs: number; // g
protein: number; // g
fat: number; // g
sodium: number; // mg
}
// nutrition-basics 스킬의 BMR/TDEE 계산 기반
const getDefaultGoal = (
gender: 'male' | 'female',
age: number,
weightKg: number,
heightCm: number,
activityLevel: 1.2 | 1.375 | 1.55 | 1.725 | 1.9 = 1.55
): NutritionGoal => {
// Harris-Benedict 수정 공식
const bmr = gender === 'male'
? 88.4 + (13.4 * weightKg) + (4.8 * heightCm) - (5.7 * age)
: 447.6 + (9.2 * weightKg) + (3.1 * heightCm) - (4.3 * age);
const tdee = Math.round(bmr * activityLevel);
return {
calories: tdee,
carbs: Math.round((tdee * 0.55) / 4), // 55% → g
protein: Math.round((tdee * 0.15) / 4), // 15% → g
fat: Math.round((tdee * 0.25) / 9), // 25% → g
sodium: 2300, // 한국인 기준 2,300mg 미만
};
};
| goalProgress 값 | evaluation | 의미 |
|---|---|---|
| 칼로리 80~110% | good | 목표 달성 |
| 칼로리 110~130% 또는 나트륨 초과 | warning | 주의 필요 |
| 칼로리 130% 초과 또는 주요 영양소 150% 초과 | over | 과다 섭취 |
추정값 고지: 모든 영양소 수치는 AI 추정값이며 ±15~25% 오차 가능 의료 목적 금지: 질환 치료·처방 목적으로 사용하지 않는다 API 비용: 식사마다 분석 시 Claude API 호출 누적 — 동일 음식은 로컬 캐싱 권장