data-substrate-analysis
데이터 프리미티브와 타입 시스템 분석
데이터 모델링 패턴을 이해하는 것은 유지보수 가능한 AI 에이전트 프레임워크를 구축하는 데 핵심입니다. 이 스킬은 타이핑 전략, 변경 패턴, 직렬화 접근 방식을 구조적으로 분석하여 정보에 기반한 아키텍처 결정을 내릴 수 있도록 합니다.
تنزيل ZIP المهارة
رفع في Claude
اذهب إلى Settings → Capabilities → Skills → Upload skill
فعّل وابدأ الاستخدام
اختبرها
استخدام "data-substrate-analysis". Analyze the type system in this agent framework codebase
النتيجة المتوقعة:
- Typing Strategy: Pydantic BaseModel with V2 migration
- Key Files: models.py (L15-45), schema.py (L8-32)
- Nesting Depth: Medium (2-3 levels)
- Mutation: Mixed - uses model_copy() for updates but list.append() for message history
- Serialization: model_dump_json() for API, model_dump() for internal
- Risk: Message history mutable via .append() - consider copy-on-write
استخدام "data-substrate-analysis". Review the mutation patterns in this Python service
النتيجة المتوقعة:
- Pattern Detected: In-place mutation via list.append()
- Location: state_manager.py:42-48
- Risk Level: Medium - shared state mutation
- Recommendation: Use model_copy() or dataclasses.replace() for thread safety
استخدام "data-substrate-analysis". Check serialization methods used in this project
النتيجة المتوقعة:
- Serialization: Pydantic model_dump() with custom encoder
- Round-trip Safety: Tested with model_validate()
- Unsafe Patterns: None detected
- Note: pickle is not used - security best practice
التدقيق الأمني
آمنPure markdown documentation skill providing analysis guidance for typing strategies, mutation patterns, and serialization approaches. Contains no code execution, network access, filesystem operations, or external commands. All 42 static findings are false positives from misinterpreting documentation syntax and metadata as security risks.
عوامل الخطر
🌐 الوصول إلى الشبكة (1)
📁 الوصول إلى نظام الملفات (1)
⚙️ الأوامر الخارجية (27)
درجة الجودة
ماذا يمكنك بناءه
타이핑 접근 비교
에이전트 프레임워크 아키텍처 결정을 위해 Pydantic vs TypedDict vs dataclasses를 평가합니다.
상태 관리 감사
기존 코드베이스의 상태 처리에서 변경 위험과 불변성 위반을 식별합니다.
직렬화 전략 문서화
직렬화 패턴을 분석하고 데이터 모델 전반의 라운드트립 안전성을 문서화합니다.
جرّب هذه الموجهات
Use data-substrate-analysis to examine the type definitions in this codebase. Identify the typing strategy (Pydantic, Dataclass, TypedDict, or loose dicts) and list the key data primitives with their locations.
Apply data-substrate-analysis to audit the mutation patterns. Report whether state updates use in-place modification or copy-on-write. Flag any risky mutable patterns found.
Use data-substrate-analysis to document the serialization approach. Check for pickle usage (security risk), validate implicit vs explicit serialization, and verify round-trip safety.
Run data-substrate-analysis on Framework A and Framework B. Generate a comparative matrix showing typing strategy, mutation patterns, serialization method, and validation boundaries for each.
أفضل الممارسات
- 경계에서 자동 검증이 이루어지는 타입 안전 데이터에는 Pydantic BaseModel을 사용하세요
- 제자리 수정 대신 copy-on-write(model_copy, dataclasses.replace)를 선호하세요
- 보안 취약점 때문에 직렬화에 pickle 사용을 피하세요
تجنب
- API ingress/egress에서 타입 경계 없이 느슨한 Dict[str, Any] 사용
- 동일한 데이터 구조 내에서 가변/불변 패턴을 일관성 없이 혼용
- 명시적 to_dict() 또는 from_dict() 메서드 없이 암묵적 직렬화 사용
الأسئلة المتكررة
이 스킬은 어떤 타이핑 전략을 감지하나요?
안전한 변경 패턴은 무엇인가요?
다른 스킬과는 어떻게 통합되나요?
분석 중 데이터는 안전한가요?
어떤 직렬화 방법이 위험하다고 표시되나요?
타입 체커와는 어떻게 다른가요?
تفاصيل المطور
المؤلف
Dowwieالترخيص
MIT
المستودع
https://github.com/Dowwie/agent_framework_study/tree/main/.claude/skills/data-substrate-analysisمرجع
main
بنية الملفات
📄 SKILL.md