From jerry
Builds structured prompts for Jerry Framework via 5-element anatomy, generates NPT-009/013 XML-wrapped constraints, and scores prompt quality on 7-criterion rubric. Use for prompt construction and validation.
How this skill is triggered — by the user, by Claude, or both
Slash command
/jerry:prompt-engineeringThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
> **Version:** 1.0.0
Version: 1.0.0 Framework: Jerry Framework v0.9.0 Constitutional Compliance: Jerry Constitution v1.0 SSOT Reference:
.context/rules/prompt-quality.md,.context/rules/prompt-templates.md
| Section | Purpose |
|---|---|
| Overview | What this skill does and why |
| When to Use This Skill | Triggers and use cases |
| Available Agents | Agent registry with routing guide |
| Invoking an Agent | Three invocation options (natural language, explicit, Task tool) |
| Quick Reference | Copy-paste examples for common tasks |
| Routing Disambiguation | When this skill is the wrong choice |
| Constitutional Compliance | Principle mapping with consequences |
| Architecture Notes | Design rationale and references |
This SKILL.md serves multiple audiences:
| Level | Audience | Sections to Focus On |
|---|---|---|
| L0 (ELI5) | Users new to prompt engineering | Overview, When to Use, Quick Reference |
| L1 (Engineer) | Developers building prompts and constraints | Available Agents, Quick Reference, Architecture Notes |
| L2 (Architect) | Framework maintainers and skill designers | Routing Disambiguation, Constitutional Compliance, Architecture Notes |
The Prompt Engineering skill operationalizes PROJ-014 negative prompting research findings into a reusable tool for constructing high-quality structured prompts within the Jerry Framework. PROJ-014 validated that NPT-013 structured negation (NEVER + consequence + alternative) achieves 100% compliance vs 92.2% for positive-only framing (p=0.016, CONDITIONAL GO via PG-003).
<forbidden_actions> and <constraint> XML wrapping.| Format | Structure | Use Case |
|---|---|---|
| NPT-009 | {PRINCIPLE} VIOLATION: NEVER {action} -- Consequence: {impact} | Agent forbidden actions, constitutional guardrails |
| NPT-013 | NEVER {action} -- Consequence: {impact}. Instead: {alternative} | Behavioral constraints, routing rules, methodology guardrails |
Invoke /prompt-engineering when you need to:
<forbidden_actions>, <constraint>) for agent governance YAML.NEVER invoke this skill when:
/adversary with S-014 rubric scoring/problem-solving instead.context/rules/prompt-templates.md -- Consequence: template execution does not require prompt construction; the 5 templates are self-contained and ready to use with placeholder substitutionagent-development-standards.md schema, not prompt anatomy; use direct file editing with schema validation per H-34See Routing Disambiguation for full exclusion conditions with consequences.
| Agent | File | Model | Cognitive Mode | Purpose |
|---|---|---|---|---|
pe-builder | skills/prompt-engineering/agents/pe-builder.md | opus | integrative | Interactive prompt assembly -- walks user through 5 elements, generates XML-wrapped structured prompt |
pe-constraint-gen | skills/prompt-engineering/agents/pe-constraint-gen.md | sonnet | systematic | NPT pattern selector and constraint formatter -- takes intent, outputs NPT-009/NPT-013 XML blocks |
pe-scorer | skills/prompt-engineering/agents/pe-scorer.md | haiku | convergent | Prompt quality scorer -- evaluates against 7-criterion rubric, returns dimension scores + improvement suggestions |
| Keywords in Request | Likely Agent | Rationale |
|---|---|---|
| build, create, construct, assemble, walk me through, 5 elements | pe-builder | Interactive prompt construction with element-by-element guidance |
| constraint, NPT, forbidden, NEVER, consequence, XML, guardrail | pe-constraint-gen | Systematic constraint formatting using NPT pattern catalog |
| score, evaluate, rate, quality, rubric, dimensions, improve | pe-scorer | Convergent evaluation against 7-criterion rubric |
All prompt engineering agents are workers, NOT orchestrators. The MAIN CONTEXT (Claude session) orchestrates the workflow.
P-003 AGENT HIERARCHY:
======================
+-------------------+
| MAIN CONTEXT | <-- Orchestrator (Claude session)
| (orchestrator) |
+-------------------+
| | |
v v v
+------+ +------+ +------+
| pe- | | pe- | | pe- | <-- Workers (max 1 level)
|build | |const | |score |
+------+ +------+ +------+
Agents CANNOT invoke other agents.
Agents CANNOT spawn subagents.
Only MAIN CONTEXT orchestrates the sequence.
Simply describe what you need:
"Build a prompt for researching authentication patterns for a .NET microservice"
"Generate NPT-013 constraints for a research agent that must not hallucinate sources"
"Score this prompt against the quality rubric"
"Convert these positive instructions to NPT-009 format for agent governance"
The orchestrator selects the appropriate agent based on keywords and context.
Request a specific agent:
"Use pe-builder to walk me through constructing a C3 orchestration prompt"
"Have pe-constraint-gen produce NPT-009 forbidden actions for a T4 research agent"
"I need pe-scorer to evaluate this prompt and tell me what to fix"
For programmatic invocation within workflows:
Task(
description="pe-constraint-gen: Generate NPT-013 constraints",
subagent_type="general-purpose",
prompt="""
You are the pe-constraint-gen agent (v1.0.0).
## INPUT
- **Intent:** Prevent hallucinated source citations in a research agent
- **Target Context:** Agent governance YAML forbidden_actions
- **NPT Format:** NPT-009 (governance YAML context)
## REFERENCE
Load pattern reference: skills/prompt-engineering/rules/npt-pattern-reference.md
## TASK
Generate NPT-009 formatted constraints for the specified intent.
Persist output to: {output_path}
"""
)
"Build a prompt for researching authentication patterns for a .NET microservice project"
pe-builder walks through: (1) skill routing, (2) domain scope, (3) data source, (4) quality gate, (5) output path. Produces a complete XML-wrapped prompt.
"Generate NPT-013 constraints for a new research agent that must not hallucinate sources"
pe-constraint-gen produces XML blocks:
<forbidden_actions>
<constraint format="NPT-013">
NEVER fabricate or hallucinate source citations -- Consequence: downstream agents
build analysis on nonexistent evidence, compounding errors through the pipeline.
Instead: explicitly state when no source is available and mark confidence as low.
</constraint>
</forbidden_actions>
"Score this prompt against the quality rubric:
'Research authentication patterns and write them up somewhere'"
pe-scorer returns dimension-level scores (C1-C7) with weighted composite and specific improvement suggestions per failing criterion.
| Need | Agent | Example |
|---|---|---|
| Build prompt from scratch | pe-builder | "Help me build a prompt for a C3 architecture decision" |
| Generate agent guardrails | pe-constraint-gen | "Generate NPT-009 forbidden actions for a T4 research agent" |
| Convert positive to negation | pe-constraint-gen | "Convert these DOs to NPT-013 format: 'Always cite sources'" |
| Evaluate prompt quality | pe-scorer | "Score this prompt and tell me what to fix" |
| Full build-and-score cycle | pe-builder + pe-scorer | "Build a prompt for X, then score it" |
| Build, score, iterate | pe-builder + pe-scorer (loop) | "Build a prompt for X, score it, and iterate until it reaches 90+" |
End-to-End Build-Score-Iterate Workflow:
1. pe-builder constructs prompt (5-element anatomy)
2. pe-scorer evaluates prompt (7-criterion rubric)
3. If score < target: pe-builder revises based on scorer findings
4. Repeat steps 2-3 until score >= target or 3 iterations reached
Default target: >= 90 for standard prompts; adjust per prompt-quality.md threshold table. The orchestrator (main context) coordinates this loop. Agents do not call each other (P-003).
| Skill/Resource | Relationship | Integration Pattern |
|---|---|---|
/adversary | Distinct scope | /adversary scores deliverables against S-014 quality gate; /prompt-engineering scores prompts against the 7-criterion rubric. Different rubrics, different targets. |
/problem-solving | Consumer | ps-researcher, ps-analyst, and other agents consume prompts constructed by pe-builder. The prompt quality directly affects downstream research quality. |
.context/rules/prompt-templates.md | Complement | Templates provide ready-to-use prompts with placeholder substitution. pe-builder constructs new prompts when no template fits. Use templates first; invoke pe-builder when templates are insufficient. |
.context/rules/prompt-quality.md | Source rubric | pe-scorer implements the 7-criterion rubric defined in prompt-quality.md. The rubric is the SSOT; pe-scorer operationalizes it. |
When this skill is the wrong choice and what happens if misrouted.
| Condition | Use Instead | Consequence of Misrouting |
|---|---|---|
| Adversarial quality review of a deliverable | /adversary | Prompt engineering scores prompts against the 7-criterion rubric, not deliverables against the S-014 quality gate; wrong rubric applied, wrong scoring dimensions used |
| Research, analysis, or investigation tasks | /problem-solving | Prompt engineering constructs prompts, not research artifacts; no analytical methodology, no data source access, no root cause investigation |
| Requirements, design, or architecture work | /nasa-se | Prompt engineering produces prompts and constraints, not requirements specifications or architecture documents; wrong deliverable type |
| Executing an existing prompt template | Direct template use | Template execution requires placeholder substitution only; invoking prompt engineering adds unnecessary construction overhead to a ready-to-use artifact |
| Agent definition schema validation | /ast or direct H-34 validation | Agent governance YAML follows JSON Schema validation per H-34, not prompt quality rubric; wrong validation mechanism applied |
| Transcript parsing or meeting notes | /transcript | Prompt engineering has no audio/VTT/SRT processing capability; fundamentally different domain |
All agents adhere to the Jerry Constitution v1.0:
P-002 scope note: P-002 applies to pe-builder and pe-constraint-gen (
output.required: true). pe-scorer supports optional file persistence (output.required: false); inline scoring output is permitted per its evaluation-only role.
| Principle | Requirement | Consequence of Violation |
|---|---|---|
| P-002 | NEVER produce transient-only output -- persist all artifacts to files | Work products lost on session end; no audit trail; downstream agents cannot reference output |
| P-003 | NEVER spawn recursive subagents -- max 1 level | Agent hierarchy violation; uncontrolled token consumption |
| P-004 | NEVER omit source attribution for generated constraints | Constraint provenance untraceable; reviewers cannot verify NPT pattern compliance |
| P-020 | NEVER override user intent -- ask before destructive ops | Unauthorized action; trust erosion |
| P-022 | NEVER deceive about actions, capabilities, or confidence | Governance undermined; quality assessment invalidated |
This skill operationalizes three knowledge sources into reusable tooling:
.context/rules/prompt-quality.md is encoded as the pe-scorer evaluation framework. Scoring uses the same weighted formula: total = sum((raw_score_N / 3) * weight_N * 100)..context/rules/prompt-quality.md (routing, scope, data source, quality gate, output path).| Source | Content |
|---|---|
.context/rules/prompt-quality.md | 7-criterion rubric, 5-element anatomy, anti-patterns |
.context/rules/prompt-templates.md | 5 copy-paste templates (research spike, implementation, orchestration, architecture, batch) |
skills/prompt-engineering/rules/npt-pattern-reference.md | NPT pattern catalog (NPT-009, NPT-013 formats) |
projects/PROJ-014-negative-prompting-research/orchestration/neg-prompting-20260227-001/phase-6/final-synthesis.md | PROJ-014 research synthesis (NPT-013 validation data: 100% vs 92.2%, p=0.016) |
projects/PROJ-014-negative-prompting-research/orchestration/neg-prompting-20260227-001/ab-testing/ab-testing-synthesis.md | A/B testing results (CONDITIONAL GO via PG-003) |
.context/rules/agent-development-standards.md | Agent definition schema, guardrails template, forbidden action format |
.context/rules/quality-enforcement.md | Quality gate SSOT, criticality levels, enforcement architecture |
projects/PROJ-006-jerry-prompt/ | PROJ-006 research: 5-element anatomy derivation, quality rubric development, template validation |
Skill Version: 1.0.0
Constitutional Compliance: Jerry Constitution v1.0
SSOT: .context/rules/prompt-quality.md, .context/rules/prompt-templates.md
Source: PROJ-014 Negative Prompting Research
Created: 2026-03-01
npx claudepluginhub geekatron/jerry --plugin jerryCrafts or updates LLM prompts from first principles by discovering goals, constraints, and context through targeted questions. Use for new prompts, updates, or reviews.
Transforms vague prompts into structured, constraint-aware prompts with explicit roles, task decomposition, output formats, and quality checks. Use for inconsistent outputs or when prompt improvement is needed.
Structures Claude prompts using behavior/task/knowledge zones, XML tagging, and tone registers for skills, agents, modes, complex tasks, tools, and code generation.