agent-as-function

Decompose monolithic prompts into per-phase skills with artifact handoffs.

Updated Apr 1, 2026
One-click install
npx skills add https://github.com/skurekjakub/docwriter-agent --skill agent-as-function
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: agent-as-function
Source: https://github.com/skurekjakub/docwriter-agent/tree/main/.github/skills/agent-as-function
Command: npx skills add https://github.com/skurekjakub/docwriter-agent --skill agent-as-function

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Coordinate complex multi-agent workflows by decomposing monolithic prompts into per-phase skills and artifact-hand-off patterns.

Core Features & Use Cases

The Ralph Orchestrator patterns described here—Prompt Decomposition (Phases as Skills) and Subagent-as-Function (Artifact Handoff)—enable clean boundaries between orchestrator and subagents. Phase skills load just-in-time and maintain a scratchpad state, while subagents communicate exclusively via filesystem artifacts, not conversation context. This skill provides templates for phase transitions, audit workflows, and domain knowledge integration to help teams refactor or create orchestrators from scratch.

Quick Start

Load this skill into the Ralph orchestrator and begin decomposing a monolithic agent prompt into per-phase skills with artifact handoffs.

Frequently Asked Questions about agent-as-function

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

FAQPage Schema
How do I coordinate multi-agent workflows using artifact handoff?

Multi-agent workflow coordination via artifact handoff decomposes monolithic prompts into per-phase skills, allowing subagents to communicate exclusively through filesystem artifacts rather than shared conversation context. This enforces clean boundaries between orchestrator and subagent contracts.

What is the subagent-as-function pattern for workflow decomposition?

The subagent-as-function pattern treats phase skills as just-in-time loaded components with scratchpad state, defining strict input and output artifact contracts. Subagents communicate exclusively via filesystem artifacts, ensuring clean separation between orchestrator logic and subagent execution.

How do I decompose a monolithic agent prompt into per-phase skills?

Decomposing a monolithic agent prompt involves breaking it into per-phase skills using artifact handoff templates. The skill provides templates for phase transitions, audit workflows, and domain knowledge integration to help refactor existing agents or create orchestrators from scratch.

Can I use this approach to refactor an existing agent orchestrator?

Yes, you can refactor existing agent orchestrators by applying the subagent-as-function contracts and artifact handoff patterns. The skill provides audit workflows and integration guidelines to convert monolithic agent prompts into cleanly separated per-phase skills with filesystem artifact boundaries.

What's the best way to structure phase transitions in a multi-agent orchestrator?

Structuring phase transitions in a multi-agent orchestrator is best handled using artifact handoff templates that define input and output artifacts for each phase. This enforces subagent-as-function contracts and maintains scratchpad state across just-in-time loaded phase skills.

When should I not use filesystem artifacts for subagent communication?

Filesystem artifacts for subagent communication may not suit workflows requiring real-time context sharing or minimal latency between phases. This artifact handoff pattern enforces clean boundaries but adds overhead for reading and writing state between each orchestrator and subagent transition.