apify-generate-output-schema
Skill này làm gì
AI agent này giúp tạo các file cấu hình cho một chương trình gọi là Apify Actor. Nó phân tích code của chương trình để hiểu thông tin nó tạo ra và cách thông tin đó nên được cấu trúc.
Khi nào nên dùng
- ✓Khi tạo một chương trình mới (Actor) trên Apify.
- ✓Khi cần cập nhật cách một chương trình Apify hiện có hiển thị kết quả.
- ✓Khi bạn không chắc cách mô tả dữ liệu mà chương trình tạo ra.
Liên kết skill
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/apify-generate-output-schema/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Tôi cần tạo một file schema cho Actor của mình để thu thập tên sản phẩm và giá của chúng.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent đọc code của chương trình để xem chính xác dữ liệu nó xuất ra. Dựa trên đó, nó tạo các file schema để cho Apify biết cách hiển thị dữ liệu này một cách có tổ chức và nhất quán.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
When to Use
- Use when this upstream workflow matches the user's stated goal.
- Use when the task requires the procedures documented in this skill.
Generate Actor output schema
You are generating output schema files for an Apify Actor. The output schema tells Apify Console how to display run results. You will analyze the Actor's source code, create dataset_schema.json, output_schema.json, and key_value_store_schema.json (if the Actor uses key-value store), and update actor.json.
Core principles
- Analyze code first: Read the Actor's source to understand what data it actually pushes to the dataset — never guess
- Every field is nullable: APIs and websites are unpredictable — always set
"nullable": true - Anonymize examples: Never use real user IDs, usernames, or personal data in examples
- Verify against code: If TypeScript types exist, cross-check the schema against both the type definition AND the code that produces the values
- Reuse existing patterns: Before generating schemas, check if other Actors in the same repository already have output schemas — match their structure, naming conventions, description style, and formatting
- Don't reinvent the wheel: Reuse existing type definitions, interfaces, and utilities from the codebase instead of creating duplicate definitions
Phase 1: Discover Actor structure
Goal: Locate the Actor and understand its output
Initial request: $ARGUMENTS
Actions:
- Create todo list with all phases
- Find the
.actor/directory containingactor.json - Read
actor.jsonto understand the Actor's configuration - Check if
dataset_schema.json,output_schema.json, andkey_value_store_schema.jsonalready exist - Search for existing schemas in the repository: Look for other
.actor/directories or schema files (e.g.,**/dataset_schema.json,**/output_schema.json,**/key_value_store_schema.json) to learn the repo's conventions — match their description style, field naming, example formatting, and overall structure - Find all places where data is pushed to the dataset:
- JavaScript/TypeScript: Search for
Actor.pushData(,dataset.pushData(,Dataset.pushData( - Python: Search for
Actor.push_data(,dataset.push_data(,Dataset.push_data(
- JavaScript/TypeScript: Search for
- Find all places where data is stored in the key-value store:
- JavaScript/TypeScript: Search for
Actor.setValue(,keyValueStore.setValue(,KeyValueStore.setValue( - Python: Search for
Actor.set_value(,key_value_store.set_value(,KeyValueStore.set_value(
- JavaScript/TypeScript: Search for
- Find output type definitions — reuse them directly instead of recreating from scratch:
- TypeScript: Look for output type interfaces/types (e.g., in
src/types/,src/types/output.ts). If an interface or type already defines the output shape, derive the schema fields from it — do not create a parallel definition - Python: Look for TypedDict, dataclass, or Pydantic model definitions. Use the existing field names, types, and docstrings as the source of truth
- TypeScript: Look for output type interfaces/types (e.g., in
- Check for existing shared schema utilities or helper functions in the codebase that handle schema generation or validation — reuse them rather than creating new logic
- If inline
storages.datasetorstorages.keyValueStoreconfig exists inactor.json, note it for migration
Present findings to user: list all discovered dataset output fields, key-value store keys, their types, and where they come from.
Phase 2: Generate dataset_schema.json
Goal: Create a complete dataset schema with field definitions and display views
File structure
{
"actorSpecification": 1,
"fields": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
// ALL output fields here — every field the Actor can produce,
// not just the ones shown in the overview view
},
"required": [],
"additionalProperties": true
},
"views": {
"overview": {
"title": "Overview",
"description": "Most important fields at a glance",
"transformation": {
"fields": [
// 8-12 most important field names
]
},
"display": {
"component": "table",
"properties": {
// Display config for each overview field
}
}
…
Câu hỏi thường gặp
Các file schema này (dataset_schema.json, output_schema.json) là gì?
Đây là các file xác định cấu trúc dữ liệu mà chương trình tạo ra. Chúng giúp Apify hiển thị kết quả rõ ràng và có tổ chức, như trong một bảng.
Tại sao tất cả các trường cần là “nullable”?
Vì website và nguồn dữ liệu có thể thay đổi hoặc gặp lỗi. Đặt một trường là “nullable” đảm bảo chương trình không bị lỗi khi một dữ liệu cụ thể không có sẵn.
“Anonymize examples” nghĩa là gì?
Nghĩa là khi hiển thị ví dụ dữ liệu trong schema, bạn không nên dùng thông tin thật của người (như tên hoặc ID). Hãy dùng dữ liệu giả để bảo vệ quyền riêng tư.
Chi tiết
Mô tả gốc của tác giả
Generate output schemas (dataset_schema.json, output_schema.json, key_value_store_schema.json) for an Apify Actor by analyzing its source code. Use when creating or updating Actor output schemas.
Độ phổ biến
- Sao GitHub
- 48k
- Vị trí xếp hạng
- #3790
- Giấy phép
- MIT
- Cập nhật
- 15/10/2026
Bình luận
- …
Thêm skill từ kho mã này
00-andruia-consultant
48kGiúp agent của bạn bắt đầu hoặc cải thiện các dự án AI. Phân tích mã, gợi ý công cụ và lập kế hoạch hành động bằng tiếng Tây Ban Nha.
007
48kCho phép agent của bạn thực hiện kiểm toán bảo mật và mô hình hóa mối đe dọa. Hữu ích để bảo vệ dự án khỏi các cuộc tấn công và lỗ hổng.
10-andruia-skill-smith
48kGiúp agent của bạn tạo hoặc cải thiện các công cụ AI. Xác định cách công cụ hoạt động, viết tài liệu và kiểm tra cấu trúc.
20-andruia-niche-intelligence
48kGiúp agent của bạn tạo bản tóm tắt về một ngành cụ thể. Hữu ích để hiểu bối cảnh, quy tắc, cách người dùng tương tác và rủi ro của dự án.
Skill tương tự
openclaw-update
394kGiúp agent của bạn cập nhật OpenClaw Gateway đang có, chọn cách cập nhật phù hợp với cách cài đặt và giữ phiên làm việc của bạn hoạt động.
diagnose-gateway
394kGiúp agent của bạn tìm hiểu vì sao OpenClaw Gateway bị lỗi bằng cách kiểm tra cài đặt, kênh và cổng mà không thay đổi gì.
crabbox-apps
394kGiúp agent của bạn mở và chạy một app trên máy đám mây tạm thời, rồi hiển thị giao diện của nó trong thanh bên của chat.