factory-files

Author and validate Warp software factory definition files against the server schema.

64.7k|5.5k|Updated Jul 8, 2021
One-click install
npx skills add https://github.com/warpdotdev/warp --skill factory-files
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: factory-files
Source: https://github.com/warpdotdev/warp/tree/main/resources/bundled/skills/factory-files
Command: npx skills add https://github.com/warpdotdev/warp --skill factory-files

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

Editing Warp software factory definitions (factory.yaml, Agent, Automation, Scorer, Runner, and Webhook files) is error-prone because the format is owned by warp-server and changes over time. This Skill guides correct authoring of those files and validates the tree against the live server parser, avoiding stale local schema copies that report wrong diagnostics.

Core Features & Use Cases

  • Schema-guided authoring: Fetches the exact JSON schema for the tree's declared schemaVersion from the warp-server schema endpoints before editing any resource file.
  • Server-backed validation: Runs the bundled Python validator, which submits the tree's resource files to the warp-server validation endpoint and reports real parser diagnostics with FF_* codes, paths, and line numbers.
  • Honest validation outcomes: Distinguishes three exit codes (valid, diagnostics found, not validated) and forbids claiming a tree was checked when the server was unreachable.
  • Use Case: You add a new Automation with a GitHub pull_request trigger to your factory tree. The Skill reads factory.yaml, fetches the v1alpha1 schema, writes the automation.md with correct trigger filter keys, then runs the validator and fixes every reported diagnostic before you open the pull request.

Quick Start

Ask the agent to create or edit a factory resource file in the repository rooted at factory.yaml and validate the tree with the bundled validation script before opening a pull request.

Frequently Asked Questions about factory-files

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I validate Warp factory files before opening a pull request?

Run the bundled validator with Python 3.8 or newer: python3 scripts/validate_factory_files.py <factory-root>. It submits the tree's resource files to the warp-server validation endpoint, which runs the real parser and returns diagnostics with FF_* codes, paths, and line numbers.

How do I create an Agent or Automation file in a Warp factory tree?

Agents live at agents/<name>/agent.md and automations at automations/<name>/automation.md, with YAML frontmatter and a Markdown body as the prompt. Fetch the schema for the tree's schemaVersion from the warp-server schema endpoint first, since the server owns the format and unknown fields are errors.

What does exit code 2 from the factory files validator mean?

Exit code 2 means the tree was not validated at all, typically because the server was unreachable, answered with an error, or the directory lacks a factory.yaml. It is neither a pass nor a failure, and you should report that validation did not run rather than claiming the files are correct.

Can I validate factory files offline with a bundled schema?

No. The skill deliberately carries no local schema copy because a bundled copy goes stale against the server and reports confident, wrong diagnostics. When the server cannot be reached, the correct outcome is to state that the tree was not checked.

Why does my factory validation fail with FF_UNKNOWN_FIELD or FF_INVALID_TRIGGER?

FF_UNKNOWN_FIELD means a field is not in the schema for the declared schemaVersion; check spelling against the fetched schema. FF_INVALID_TRIGGER indicates a structurally wrong trigger, such as a schedule.cron_fired trigger declaring both schedule.cron and filter.schedule_ids.

When should I not use the factory-files skill?

Do not use it for agent-definition Markdown belonging to other tools, for trees without a factory.yaml, or to operate a live factory. Operating a registered factory, sending work, or inspecting task status is handled through Factory MCP instead.