Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

6.1 KB
Raw Blame
{
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "properties": {
        "allowed_tools": {
            "description": "Tools the skill asks to use. Tool names cannot contain whitespace. A harness that reads the skill from a file (zip export, git marketplace, a content=full bundle) treats the list as pre-approved. A harness that loads the skill over MCP, including the default content=stub bundle, ignores the list until the user approves that grant.",
            "items": {
                "type": "string"
            },
            "type": "array"
        },
        "base_version": {
            "description": "Latest version you are editing from. Used for optimistic concurrency checks. Required when publishing content changes; optional for an owner-only update (when omitted, owners are replaced without a concurrency check).",
            "minimum": 1,
            "type": "number"
        },
        "body": {
            "description": "Full skill body (SKILL.md instruction content) to publish as a new version. Mutually exclusive with edits.",
            "type": "string"
        },
        "compatibility": {
            "description": "Environment requirements.",
            "maxLength": 500,
            "type": "string"
        },
        "description": {
            "description": "Updated description for the new version.",
            "maxLength": 1024,
            "type": "string"
        },
        "edits": {
            "description": "List of find/replace operations to apply to the current skill body. Each edit's 'old' text must match exactly once. Edits are applied sequentially. Mutually exclusive with body.",
            "items": {
                "properties": {
                    "new": {
                        "description": "Replacement text.",
                        "type": "string"
                    },
                    "old": {
                        "description": "Text to find in the target content. Must match exactly once.",
                        "type": "string"
                    }
                },
                "required": ["old", "new"],
                "type": "object"
            },
            "type": "array"
        },
        "file_edits": {
            "description": "Per-file find/replace updates. Each entry targets one existing file by path and applies sequential edits to its content. Non-targeted files carry forward unchanged. Cannot add, remove, or rename files — use 'files' for that. Mutually exclusive with files.",
            "items": {
                "properties": {
                    "edits": {
                        "description": "Sequential find/replace operations to apply to this file's content.",
                        "items": {
                            "properties": {
                                "new": {
                                    "description": "Replacement text.",
                                    "type": "string"
                                },
                                "old": {
                                    "description": "Text to find in the target content. Must match exactly once.",
                                    "type": "string"
                                }
                            },
                            "required": ["old", "new"],
                            "type": "object"
                        },
                        "type": "array"
                    },
                    "path": {
                        "description": "Path of the bundled file to edit. Must match an existing file on the current skill version.",
                        "maxLength": 500,
                        "type": "string"
                    }
                },
                "required": ["path", "edits"],
                "type": "object"
            },
            "type": "array"
        },
        "files": {
            "description": "Bundled files to include with this version. Replaces all files from the previous version. Mutually exclusive with file_edits.",
            "items": {
                "properties": {
                    "content": {
                        "description": "Text content of the file.",
                        "type": "string"
                    },
                    "content_type": {
                        "default": "text/plain",
                        "description": "MIME type of the file content.",
                        "maxLength": 100,
                        "type": "string"
                    },
                    "path": {
                        "description": "File path relative to skill root, e.g. 'scripts/setup.sh' or 'references/guide.md'.",
                        "maxLength": 500,
                        "type": "string"
                    }
                },
                "required": ["path", "content"],
                "type": "object"
            },
            "type": "array"
        },
        "license": {
            "description": "License name or reference.",
            "maxLength": 255,
            "type": "string"
        },
        "metadata": {
            "additionalProperties": {},
            "description": "Arbitrary key-value metadata.",
            "propertyNames": {
                "type": "string"
            },
            "type": "object"
        },
        "owners": {
            "description": "Replace the skill's owners with these user UUIDs (each a member of this project). Omit to leave owners unchanged; pass an empty list to clear them. Owners are keyed on the logical skill, so setting them is independent of the version being published — a body edit alone never changes ownership.",
            "items": {
                "type": "string"
            },
            "maxItems": 25,
            "type": "array"
        },
        "skill_name": {
            "pattern": "^[^/]+$",
            "type": "string"
        },
        "version_description": {
            "description": "Optional note describing what changed in this version. Shown in the version history.",
            "maxLength": 400,
            "type": "string"
        }
    },
    "required": ["skill_name"],
    "type": "object"
}