agentsope/SkillAlchemy / skills/agentsop-signature-design
agentsop-signature-design
VerifiedDecision rubric for promoting a prose prompt into a typed DSPy Signature. This is an ENHANCE overlay on top of the [[dspy]] library skill: it does NOT teach DSPy syntax — it answers the coder-agent decision "when do I stop hand-writing a prompt string and declare it as a `dspy.Signature`, and how do I name/describe its fields so the optimizer and the calling code both get a clean contract." Activate when: a prompt string grows past ~50 lines; the LM output is consumed by code (parsed, branched on, stored) rather than read by a human; the same prompt is reused across >1 call site; or a teammate asks "should this be a Signature?". Do NOT activate for one-shot throwaway prompts, or for HOW-TO questions about DSPy modules /optimizers/compile — defer those to the [[dspy]] skill and the [[agentsop-dspy]] workflow skill. Search keywords: typed prompt, structured prompt, DSPy Signature, prompt as a function, prompt contract, when to formalize a prompt.
| File | Kind | Size |
|---|---|---|
| README.md | markdown | 3.0 KB |
| SKILL.md | skill md | 21.1 KB |
| intermediate/operation_candidates.json | config | 6.3 KB |
| references/R1-source-evidence.md | markdown | 7.1 KB |
README.md
View on GitHub# signature-design skill
An **enhancement-overlay** coder skill that surfaces one decision the broad `dspy` library skill never states
outright: **when to promote a prose prompt into a typed `dspy.Signature`, and how to shape its fields.**
**Version**: 0.1.0
**Layer**: enhance overlay (decision rubric only — defers all implementation to `[[dspy]]` and `[[agentsop-dspy]]`)
## What this skill answers
- **When** a hand-written prompt has become "load-bearing" enough to deserve a typed contract (the promote
trigger: > ~50 lines, output consumed by code, or reused across calls).
- **How** to shape the Signature: identify inputs/outputs, name fields semantically, add descriptions only where
the name underspecifies, type closed-set/boolean outputs.
- **When NOT to**: one-shot throwaway prompts, free-form human prose, or while the I/O contract is still churning.
- **Where the line is** between "promote to a typed Signature" (parse safety) and "compile/optimize it" (needs a
metric) — two different gates.
## What this skill does NOT do
It is **not** a DSPy tutorial. It deliberately defers every implementation question — class syntax, module choice
(`Predict`/`ChainOfThought`/`ReAct`), evaluation, compile, save/deploy — to the existing skills:
- **`[[dspy]]`** — the library skill (HOW to write/compile a Signature).
- **`[[agentsop-dspy]]`** — the full operating workflow (program → evaluate → optimize, 3-stage gate, optimizers, cost).
This overlay is the narrow "should this prose become a Signature?" slice of `[[agentsop-dspy]]`'s Stage 1.
## Files
- `SKILL.md` — main skill, 7 sections: 何时激活 / 核心心智模型 / SOP / 操作模型 (8 ops + naming rules) / 困境决策案例 (2) / 反模式与边界 / 跨框架对照.
- `references/R1-source-evidence.md` — every claim (S1–S10) traced verbatim to the local `dspy-sop` skill and the
upstream DSPy docs it cites; includes the overlap check vs the local `dspy` library skill.
- `intermediate/operation_candidates.json` — the 8 operations in Trigger / Action / Output / Evidence form, plus
field-naming rules, dilemma cases, and anti-patterns.
## Quick start
If you just want to decide one prompt today:
1. Run the **promote-trigger checklist** (`SKILL.md` §4.1): tick LENGTH / CONSUMED / REUSED. Zero ticks → keep the
prose prompt, you're done.
2. One+ tick → run the SOP (§3): extract inputs/outputs → name fields semantically → add descriptions only where
needed → type closed-set outputs.
3. Hand the shaped Signature to **`[[dspy]]`** for module choice + compile. This skill's job ends there.
## Source basis
- Primary: `/Users/5imp1ex/Desktop/Skill-Workplace/output/dspy-sop-skill/SKILL.md` (Signatures material).
- Upstream (as cited by the primary): [dspy.ai/learn/programming/signatures/], [dspy.ai/cheatsheet/],
[dspy.ai/faqs/], [arxiv.org/abs/2310.03714].
- Overlap-avoidance: frontmatter of `~/.claude/skills/dspy/SKILL.md` confirms that skill is the broad library
layer; this overlay holds a disjoint decision-only scope (see `references/R1-source-evidence.md`).
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation). | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK). | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |