Awesome-omni-skill promptly-agent-builder
Create, update, or fix standalone Swift command line agents built with Swift Package Manager that use Promptly packages (PromptlyKit, PromptlyConsole, PromptlyKitTooling, PromptlySubAgents). Use when asked to scaffold a new Promptly-based agent, change its prompts or command line interface, add or adjust tools or sub agents, or diagnose build and run errors in such agents.
install
source · Clone the upstream repo
git clone https://github.com/diegosouzapw/awesome-omni-skill
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/diegosouzapw/awesome-omni-skill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/tools/promptly-agent-builder" ~/.claude/skills/diegosouzapw-awesome-omni-skill-promptly-agent-builder && rm -rf "$T"
manifest:
skills/tools/promptly-agent-builder/SKILL.mdsource content
Promptly Agent Builder
Overview
Build and maintain focused Promptly-based command line agents quickly, using the provided template and Promptly module references.
Create a new agent
- Copy the template folder from
into a new project directory.assets/standalone-agent-template - Rename the package and target from
to the new agent name inPromptlyAgent
.Package.swift - Rename the source folder
to match the target name.Sources/PromptlyAgent - Update
andPromptlyAgent.swift
:PromptSupport.systemPrompt- Change
,commandName
, and the system prompt to the agent purpose.abstract - Add or remove command line options as needed.
- Change
- Decide whether to keep tool support:
- Keep
andToolFactory
for shell tools and sub agents.SubAgentToolFactory - Remove them and return
from the tool provider if the agent must run without tools.[]
- Keep
- Build the agent to verify it compiles in the sandboxed environment:
mkdir -p .build/tmp .build/home && TMPDIR="$(pwd)/.build/tmp" HOME="$(pwd)/.build/home" swift build --disable-sandbox
- Run the agent with
or--task
.--interactive
Update an existing agent
- Start by reading
andPackage.swift
to understand dependencies and prompt flow.Sources/<Target>/PromptlyAgent.swift - Update only the system prompt and command options needed for the new behavior; avoid changing configuration loading unless required.
- If adding tools, keep
,toolsFileName
, andincludeTools
consistent with the tools configuration file.excludeTools - If adding sub agents, keep the supervisor hint insertion so the model sees available sub agents.
- Build the agent to verify it compiles in the sandboxed environment:
mkdir -p .build/tmp .build/home && TMPDIR="$(pwd)/.build/tmp" HOME="$(pwd)/.build/home" swift build --disable-sandbox
General guidance
- Prefer a small set of cohesive types over one large
, with one type per file when practical.main.swift - Be careful with Swift
: avoid top level code in the same module and avoid@main
conflicts by choosing a clear entry file name.main.swift - Minimize static helper sprawl by using small service or value types so responsibilities are explicit and testable.
- Avoid creating state that is never read and avoid unused closures; validate inputs but keep tools side effect free unless the user requested persistence.
- Provide sensible defaults so users can run without extra command line options; make interactive and verbosity optional toggles.
- Treat tool output and user interface output as separate concerns; add a verbose flag and keep quiet output clean by default.
- Watch
and actor boundaries in asynchronous callbacks; avoid capturingSendable
inself
closures by extracting local values.@Sendable - Do not write to disk or alter the environment unless the user requested it; prefer in memory mechanisms.
- When scaffolding tools, include include and exclude filtering and keep tool names stable for prompt instructions.
- Run a build or test check when feasible to catch missing imports or type visibility issues early.
Prompt guidance
Use these when you are writing or updating the agent system prompt and tool usage instructions.
- Provide a clear workflow with numbered steps and explicit fallback behavior so the agent can proceed when follow up questions are not possible.
- Define a strict output format with required sections and ordering to avoid response drift.
- Specify tool call ordering, including any required tool calls before the assistant outputs text.
- Require plain text tool inputs without labels or code fences to avoid contaminated inputs.
- Explicitly forbid side effects and environment changes unless the user asked for them.
- State when to ask questions versus when to proceed with safe assumptions.
- Describe how to handle tool failures, including which steps are critical and which can be skipped.
Fix common issues
- Config file not found: verify the
path and ensure it exists.--config-file - Authentication failures: confirm the token is present in the environment or keychain for the chosen provider.
- No tool calls: confirm the tools configuration file is present and tools are not excluded by filters.
- Empty assistant output: ensure
is used and the system prompt is not empty.PromptConsoleRunner
Resources
- Read
for the Promptly types and source references.references/promptly-agent-notes.md - Use
as the base project for new agents.assets/standalone-agent-template