Agent-skill-layerproof layerproof-api
Skill pack for interacting with the Layerproof API including workspaces, projects, slide decks, files, themes, exports, and jobs.
git clone https://github.com/compilet-dev/agent-skill-layerproof
git clone --depth=1 https://github.com/compilet-dev/agent-skill-layerproof ~/.claude/skills/compilet-dev-agent-skill-layerproof-layerproof-api
SKILL.mdLayerproof API Skill Pack
⚠️ Skill Pack Manifest
This file is NOT a skill.
It is the entry point for the Layerproof skill pack.
Individual skills are located in:
skills/*/SKILL.mdAI agents and crawlers should only index those files as skills.
Overview
This repository provides a collection of AI agent skills for the Layerproof API.
These skills allow AI agents to interact with Layerproof to:
- Manage workspaces
- Create and manage projects
- Upload public and project files
- Generate slide decks using AI
- Edit slides and images
- Apply themes
- Export presentations
- Monitor asynchronous jobs
Each skill contains structured instructions that teach an AI agent how to interact with the Layerproof API using
curl.
Required Environment Variables
Before performing any API operations, the agent must verify that these environment variables are set on the user's machine.
Check before every API call
Always verify the following environment variables exist before making any API request:
# Check if LAYERPROOF_BASE_URL is set if [[ -z "${LAYERPROOF_BASE_URL}" ]]; then echo "ERROR: LAYERPROOF_BASE_URL is not set." echo "Please set it in your shell profile or .env file, then re-run." return 1 fi # Check if LAYERPROOF_API_KEY is set if [[ -z "${LAYERPROOF_API_KEY}" ]]; then echo "ERROR: LAYERPROOF_API_KEY is not set." echo "Please set it in your shell profile or .env file, then re-run." return 1 fi
Setting environment variables
If not already set, instruct the user to add them:
echo 'export LAYERPROOF_BASE_URL=https://api.layerproof.com' >> ~/.zshrc echo 'export LAYERPROOF_API_KEY=your-api-key-here' >> ~/.zshrc source ~/.zshrc
Alternatively, for project-specific settings, create a
.env.local file in the project root:
LAYERPROOF_BASE_URL=https://api.layerproof.com LAYERPROOF_API_KEY=your-api-key-here
When using a
.env.local file, ensure it is loaded before running any curl commands:
# For zsh, load .env.local if it exists if [[ -f .env.local ]]; then set -a source .env.local set +a fi
Authentication header
All API requests must include the following header:
X-API-KEY: $LAYERPROOF_API_KEY
How Agents Should Use This Skill Pack
When a user asks to perform an operation related to Layerproof:
- Identify the resource type involved.
- Load the corresponding
.skills/<resource>/SKILL.md - Follow the endpoint definitions in that skill file.
- Construct a valid
request.curl - Execute the request using the environment variables.
- Display the raw JSON response to the user.
If the response contains image URLs, the agent may render them.
Skill Modules
Each module corresponds to a Layerproof API resource.
| Resource | Skill File | Purpose |
|---|---|---|
| Workspaces | | Manage workspaces |
| Projects | | Create and manage projects |
| Public Files | | Upload reference documents |
| Project Files | | Manage files inside projects |
| Slide Decks | | Generate outlines and slide content |
| Slides | | Edit slide images and content |
| Themes | | Generate and apply visual themes |
| Tones | | Tone presets and apply to deck |
| Exports | | Export PNG, PPTX, or video |
| Social campaigns | | Social campaign projects |
| Jobs | | Poll async job status |
Handling Asynchronous Operations
Many Layerproof API endpoints run asynchronously.
When an API response returns an
activityId, the agent should:
- Poll the job status:
GET /api/v2/jobs/{activityId}
- Continue polling until:
status = DONE
- If
exists, report the error.failureReason
Typical Agent Workflow
Example workflows (the agent should automatically select the correct skill module for each step).
Workflow A: Full presentation from scratch (with reference files and theme)
- Workspaces — List workspaces (GET), then create one if needed (POST) or resolve
from list.workspace_id - Projects — Create project (POST) with
,name
, optionalproject_kind: "SLIDE_DECK"
; captureworkspace_id
andid
.slide_deck_id - Public files (optional) — If the user provides reference docs: POST
→ user PUTs file to/api/v2/files/prepare
→ POSTupload_url
with/api/v2/files/confirm
; collects3_key
(s) for outline.s3_key - Themes (optional) — List themes (GET); if user wants a new look: POST
with/api/v2/themes/generate
→ poll Jobs until DONE → noteprompt
.theme_id - Slide decks — POST
with.../outline/generate
,prompt
, optionalslide_count
,file_s3_keys
; capturelanguage
.activity_id - Jobs — Poll
untilGET /api/v2/jobs/{activity_id}
is DONE (or CANCELED); on failure, reportstatus
.failure_reason - Slide decks — GET deck to read
; optionally PUToutline
to tweak sections (title, sections, key_points, visual_suggestion)..../outline - Themes / slide decks — If a theme was generated, POST
with/api/v2/themes/apply
andslide_deck_id
(optionaltheme_id
). Then POSTregenerate_slides
(optionally with.../slides/batch-generate
,generation_type
); captureaspect_ratio
.activity_id - Jobs — Poll
until DONE.GET /api/v2/jobs/{activity_id} - Slide decks — GET deck again; if a single slide needs regeneration, POST
or.../slides/{sectionId}/generate-transcript
etc., then poll job..../generate-image - Slides (optional) — For a specific slide: POST image-edit or object-removal → poll job → POST accept-image-edit with
.live_object_id - Exports — POST
,.../projects/{projectId}/exports/pptx
, or.../exports/png
; capture.../exports/video
; poll GETexport_id
until COMPLETED; present.../exports/{export_id}
to user.download_url
Workflow B: Multi-format export and error handling
- Projects — GET project by ID (or list and pick) to ensure it exists and has
.slide_deck_id - Slide decks — GET deck; confirm
meets expectations before export.metadata.completed_slides - Exports — Start PNG export (POST
); get.../exports/png
. In parallel or after, start PPTX export (POSTexportId
); get second.../exports/pptx
.exportId - Exports — Poll each
until status is COMPLETED or FAILED. If FAILED, showGET .../exports/{exportId}
and suggest retry or check project. When COMPLETED, showerrorMessage
anddownloadUrl
.expiresAt - If user cancels: POST
for in-progress exports..../exports/{exportId}/cancel
Workflow C: Project files and outline with project-scoped assets
- Projects — Create or get project; note
. Get or create a directory in the project (per project-files API if list directories exists) or use a knownproject_id
.directory_id - Project files — POST prepare with
,path
,file_name
,mime_type
→ user uploads tosize
→ POST confirm withupload_url
. Optionally GET file or download-url to verify.file_id - Slide decks — Use project’s
; generate outline withslide_deck_id
from project file S3 keys (if API accepts them) or use public files flow and passfile_s3_keys
from public prepare/confirm.file_s3_keys - Continue with outline → poll job → update outline → batch generate → poll → export as in Workflow A.
The agent should automatically select the correct skill module for each step and handle polling, error responses, and multi-step dependencies.
Skill Discovery
Agents should load the following files when interacting with Layerproof:
- skills/workspaces/SKILL.md
- skills/projects/SKILL.md
- skills/public-files/SKILL.md
- skills/project-files/SKILL.md
- skills/slide-decks/SKILL.md
- skills/slides/SKILL.md
- skills/themes/SKILL.md
- skills/tones/SKILL.md
- skills/exports/SKILL.md
- skills/social-campaigns/SKILL.md
- skills/jobs/SKILL.md
Each skill file contains:
- API endpoint definitions
- request and response types
- curl examples
- agent decision logic
- response handling rules
Repository Structure
agent-skill-layerproof │ ├─ SKILL.md ├─ marketplace.json ├─ README.md │ └─ skills ├─ workspaces │ └─ SKILL.md ├─ projects │ └─ SKILL.md ├─ public-files │ └─ SKILL.md ├─ project-files │ └─ SKILL.md ├─ slide-decks │ └─ SKILL.md ├─ slides │ └─ SKILL.md ├─ themes │ └─ SKILL.md ├─ tones │ └─ SKILL.md ├─ exports │ └─ SKILL.md ├─ social-campaigns │ └─ SKILL.md └─ jobs └─ SKILL.md