Craft prompt
π Prompt-engineering and project-roadmap plugin that crafts professional xml prompts and picks, surveys, and tracks your next tasks.
npx -y skills add V-Songbird/foreman --skill craft-promptAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- 29 days oldThe repository was created 29 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
- 19 stars19 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Interactive prompt builder. Guides you through assembling a self-contained spawned-session prompt following Foreman's template β asks which optional sections to include, gathers required info via AskUserQuestion, assembles the XML, then runs it here as one or several tracked tasks, hands it to a background Agent, or copies it to the clipboard.
SKILL.md
13.2 KB, as published. Nobody here has run it
foreman:craft-prompt β interactive prompt builder
Assemble a self-contained prompt for a spawned session following Foreman's template. The spawned session has zero memory of this conversation β every field must be filled so it can act cold.
If args were provided, treat them as the task description seed and skip asking for it in Call 1.
Call 1 β task type and optional sections
Ask these two questions together:
Q1 β "What task should the spawned session perform?"
Options: Implement a feature, Fix a bug, Investigate / research, Refactor code, Write documentation, Security audit
Q2 β "Which optional sections do you want in the prompt?" (multiSelect: true) Options:
Toneβ override the default (minimal/professional, silent-by-default β see the template; projects opt out entirely viaomitSections: ["tone"])Exampleβ a before/after or inputβoutput snippet (good for fixes and transformations)Constraintsβ hard limits on files or interfaces the agent must NOT touchBackground contextβ architectural decisions, patterns, or environment detailsCustom output formatβ wrap the deliverable in a specific XML tag for a downstream parser (skip this unless something actually parses the output β the default is a plain human-readable summary, no tags)Workflow stageβ prompt plus a JSON Schema the tool layer enforces, for a Workflowagent(prompt, {schema})stage (mechanically omitsToneand replaces the default output format with a fixed enforcement sentence β see the template; pick this instead ofCustom output format, not alongside it)
Record which optional sections were selected.
Q2 asks what the user wants in the prompt, not what's true about the code β no amount of upfront code investigation answers it, so don't skip it even when you've already grounded every fact the prompt will state. Investigation and section selection are orthogonal: being confident about the code is not the same as knowing which sections the user wants included.
Call 2 β required fields (batch all 4)
Q1 β "What role should the spawned agent play?"
Options: Senior engineer, Security engineer, TypeScript developer, Python developer, Technical writer, Code reviewer
Q2 β "What does 'done' look like? One sentence. A performance or
coverage goal names the metric and threshold (e.g. 'p95 under 500ms')."
Options: Bug is fixed and all tests pass, Feature is implemented and tested, Findings are written to a file in the repo, cited, Refactor complete β no behavior change
Q3 β "List the relevant files with line ranges where known. If an
analogous implementation exists, name it too as a pattern to imitate."
Options: I'll list them (nudge user to use Other and type paths like src/auth/middleware.ts:42-80 β token refresh logic, plus Pattern: src/webhooks/github.ts β build the new code the same way when one applies)
Q4 β "Describe the three steps: read/explore, then analyze/check, then implement/produce."
Options: I'll describe them
Call 3 β verification (conditional)
Skip this call only if the task type is pure research/investigation with no code changes.
Q1 β "What command or commands verify success?"
Options: npm test, npm run build, pytest, cargo test, go test ./...
Q2 β "What's the expected outcome?"
Options: All tests pass, Build succeeds with exit code 0, No lint errors, Report file produced
Several checks, named in the order they should run, are fine and normal β
each becomes its own Run:/Expected: pair in the prompt. They are also
what Call 5b's task split cuts on, so a task with three real checks is
worth listing all three here.
Q3 β only when Call 1's task type was Fix a bug: "Paste the failing
output β stack trace, error message, or test failure β verbatim."
Options: None observed
The answer lands in <context> under an Observed failure: line, exactly
as pasted β the artifact, not a paraphrase (the spawned session can't ask
what the error actually said).
Call 4-N β optional section details
For each section selected in Call 1 Q2, ask its detail question(s). Batch up to 4 questions per call.
Tone (if selected):
- "Describe the tone for this session."
Options:
Cautious and defensive (security-focused),Fast and pragmatic (prototype),Pedagogical β explain each step,Formal technical report style
Example (if selected):
- "Provide a before/after snippet or input β output example."
Options:
I'll type it
Constraints (if selected, batch together):
- "Which files or interfaces must NOT be modified?"
Options:
I'll list them - "Is there a coding style or pattern to follow? Point to an example file."
Options:
None,I'll describe it
Background context (if selected):
- "Describe the architectural decisions, patterns, or constraints the agent needs to know to act without prior context."
Options:
I'll describe it
Custom output format (if selected):
- "What XML tag should wrap the final deliverable?"
Options:
<findings>,<report>,<diff>,<summary>
Workflow stage (if selected):
- "What should come back? Describe the fields the schema should capture."
Options:
I'll describe them
Resolve project config (craft-time, once)
Run node ${CLAUDE_PLUGIN_ROOT}/scripts/render-sections.js now β the one
mechanical call that resolves usePersona/sections/omit/
targetModel/decisionLog. Every step below (Call 6's default, Assemble
the prompt's elaboration scoping and its <decision_log> block, Deliver's
clipboard recommendation) reads this same result. Nothing past this point
calls it again.
Call 5 β destination
Ask this now, before the prompt exists, not after assembly. There is nothing to preview yet; the destination decides how the prompt gets delivered, not the other way around.
Q1 β "How do you want to run this?" Options:
Execute here (Recommended)β run it in this sessionExecute with a background Agentβ offload it, get notified on completion β best for orchestration, where this session owns the commitsCopy prompt to clipboardβ just get the text, no execution
The spawn_task ban applies here β see prompt-template.md's "Delivery
mechanics" section.
Call 5b β execution mode (conditional)
Ask this only when Call 5 Q1's answer was Execute here. The other two
destinations skip it and go to Call 6 instead β the two questions are
mutually exclusive.
Q1 β "How should it run here?"
Options and their free-text rule: prompt-template.md's "Delivery
mechanics" section, verbatim.
Call 6 β executing model (conditional)
Ask this when Call 5 Q1's answer was "Execute with a background Agent"
or "Copy prompt to clipboard" β its default depends on that answer, so
it can't batch into Call 5's own question. Skip it for Execute here:
that destination runs the task in this session, so no model choice
exists (Call 5b runs instead).
Q1 β background Agent: "Which model should the background Agent run
on?" Clipboard: "Which model will run the pasted prompt?"
Haiku, Sonnet, Opus always; Fable too, but only when the
render-sections result's fableEnabled is true β three options when
it's false (the default), four when it's true. Reordered so the
recommended model leads, with (Recommended) appended to its label β
same convention foreman:roadmap's Q1 uses for its top-ranked candidate.
The recommendation is the resolved targetModel when the project pinned
a concrete one; otherwise (inherit) judge it from the task the user
described against prompt-template.md's "Model fit" note. A targetModel: "fable" project pin still recommends Fable even when fableEnabled is
false β a direct pin is its own declaration, independent of the
interactive-menu gate.
No fifth "Inherit"/"Unknown" slot β AskUserQuestion caps authored
options at four, and the tool's own automatic Other already covers
"not sure" / "whatever it inherits" as free text, so a dedicated option
for that would cost one of the four real models a slot for no reason.
Add a one-line why to Q1's context (e.g. "bounded single-file change β
Haiku fits", or "reconciles renamed refs β Sonnet/Opus/Fable, past the
Haiku cliff"), plus this hint so the user knows the escape hatch exists:
"Not sure, or want it to inherit the session's model? Pick Other and
leave it blank or say so."
The user can always override the default. The answer does two jobs:
- Elaboration: a concrete model becomes the effective target model
for the template's elaboration scoping, overriding
targetModelβ the model actually running the task wins over the project declaration. AnOtheranswer that doesn't name a concrete model keeps the resolvedtargetModelinstead. - Dispatch (background Agent only): a concrete model becomes the
Agentcall's literalmodelvalue (haiku/sonnet/opus/fable); anOtheranswer that doesn't name a concrete model means leavingmodelout of the call.
Assemble the prompt
Follow ${CLAUDE_PLUGIN_ROOT}/prompt-template.md exactly for its XML
template, verbatim. Its craft-time environment check (render-sections.js)
already ran above, before Call 5 β use that same result, don't invoke it
again. Elaboration scoping uses the effective target model: Call 6's
concrete answer when one was gathered, otherwise the result's
targetModel. Never re-derive or duplicate the per-model elaboration
guidance itself; if the template changes, this skill picks up the change
automatically by reading it fresh each time. Map this skill's
gathered fields onto the template's placeholders:
task_context: role β Call 2 Q1, goal β Call 2 Q2relevant_filesβ Call 2 Q3 (including anyPattern:reference line)- observed failure β Call 3 Q3, when gathered and not
None observed: into<context>under anObserved failure:line, verbatim task_rules: steps β Call 2 Q4; Constraints β Call 4's Constraints answers, if selected; Verification β Call 3, if gathered- review-flavored tasks (the
Security audittask type, or theCode reviewerrole): add one constraint bullet totask_rulesβ "Flag only gaps that affect correctness or security β reporting that the work is sound is a valid outcome." toneβ Call 4's Tone answer, if selected (overrides the template's default entirely, same as the template already says); otherwise the template's own craft-time gate applies unchangedbackground/contextβ Call 4's Background-context answer, if selectedexampleβ Call 4's Example answer, if selectedoutput_formatβ Call 4's Custom-output-format answer, if selected; otherwise the template's own default appliesoutput_format/toneβ ifWorkflow stagewas selected instead: the template's Workflow-stage flavor overrides both (fixed sentence, mechanical tone omission, schema-authoring and delivery rules all live there) β the schema itself derives from Call 4's Workflow-stage answerdecision_logβ include the template's<decision_log>block when the render-sections result'sdecisionLog.enabledis true, substituting itsdirfor<dir>; omit it when false (the template's own craft-time gate says the same). A craft-prompt task carries no roadmap entry, so name the doc after a short kebab slug of the goal in place of<entry-id>.
Before moving to the next phase, verify the assembled prompt against
prompt-template.md's own checklist, then run its mechanical gate
(scripts/check-prompt.js β the template's "Mechanical gate" section has
the exact call) and fix every error until it passes β don't re-list
either here.
Deliver
Deliver via whatever Calls 5 and 5b picked β no further question. Each
destination's mechanics are prompt-template.md's "Delivery mechanics"
section; the Execute here sub-mode is Call 5b's answer. Two additions
this skill layers on top:
- Background Agent β pass
model= Call 6's answer as its literal string (haiku/sonnet/opus/fable); omit themodelparameter entirely when the answer was anOtherthat didn't name a concrete model. - Clipboard β if the effective target model (Call 6's answer, else
targetModel) is concrete, add one more line alongside the file path: "Recommended model: [Haiku/Sonnet/Opus/Fable] β this prompt's elaboration level was calibrated for it." Skip that line when it resolved toinheritor no concrete model was named β no fixed target, so there's nothing to recommend.