Langsung ke konten
Skillpedia
Deploy & cloud (DevOps)48k ยท #3790

apify-generate-output-schema

Fungsinya

Agent AI ini membantu membuat file konfigurasi untuk program yang disebut Apify Actor. Agent ini menganalisis kode program untuk memahami informasi apa yang dihasilkan dan bagaimana strukturnya seharusnya.

Kapan dipakai

  • โœ“Saat membuat program (Actor) baru di Apify.
  • โœ“Saat Anda perlu memperbarui cara program Apify yang sudah ada menampilkan hasilnya.
  • โœ“Jika Anda belum yakin bagaimana menjelaskan data yang dihasilkan program Anda.

Link skill

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/apify-generate-output-schema/SKILL.md

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/apify-generate-output-schema/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit โ†’

Contoh permintaan ke AI

โ€œSaya perlu membuat file schema untuk Actor saya yang mengumpulkan nama produk dan harganya.โ€

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Agent ini membaca kode program Anda untuk melihat dengan tepat data apa yang dihasilkan. Berdasarkan itu, agent membuat file schema yang memberi tahu Apify cara menampilkan data tersebut secara rapi dan konsisten.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.

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:

  1. Create todo list with all phases
  2. Find the .actor/ directory containing actor.json
  3. Read actor.json to understand the Actor's configuration
  4. Check if dataset_schema.json, output_schema.json, and key_value_store_schema.json already exist
  5. 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
  6. 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(
  7. 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(
  8. 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
  9. 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
  10. If inline storages.dataset or storages.keyValueStore config exists in actor.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
                }
            }

โ€ฆ
Pertanyaan umum

Apa itu file schema (dataset_schema.json, output_schema.json)?

Ini adalah file yang mendefinisikan struktur data yang dihasilkan program Anda. File ini membantu Apify menampilkan hasil dengan jelas dan teratur, misalnya dalam bentuk tabel.

Mengapa semua field harus 'nullable'?

Karena situs web dan sumber data bisa berubah atau gagal. Dengan menjadikan sebuah field 'nullable', program tidak akan error jika data tertentu tidak tersedia.

Apa arti 'anonymize examples'?

Artinya, saat menampilkan contoh data dalam schema, Anda sebaiknya tidak menggunakan informasi asli milik orang lain (seperti nama atau ID). Gunakan data palsu untuk melindungi privasi.

Detail

Deskripsi asli dari pembuat

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.

repo: sickn33/agentic-awesome-skills

Popularitas

Bintang GitHub
48k
Peringkat
#3790
Lisensi
MIT
Diperbarui
15/10/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • โ€ฆ

Skill lain dari repositori ini

Skill serupa