Version: 1.0.0 Status: ACTIVE
Extract reusable structure, decision logic, constraints, and quality patterns from an existing high-quality artifact.
The goal is not merely to imitate the artifact.
The goal is to discover:
WHY DOES THIS WORK?
and convert that into something reusable.
Possible outputs include:
SKILL
PROMPT
TEMPLATE
CHECKLIST
REVIEW RUBRIC
CODING CONVENTION
WORKFLOW
Use this skill when the user provides or identifies:
Use this skill when the request is conceptually:
"Make future outputs work like this."
Do not merely copy:
CONTENT
Extract:
STRUCTURE
DECISION LOGIC
CONSTRAINTS
SEQUENCE
QUALITY SIGNALS
The reusable value is usually beneath the surface.
Analyze the gold standard through four layers:
1. ROLE AND CONTEXT
2. STRUCTURAL LOGIC
3. BOUNDARIES
4. REUSABLE SCAFFOLD
Identify what expertise and environment shaped the artifact.
Ask:
Who appears to be producing this?
Who consumes it?
What problem does it solve?
What assumptions does it make?
What domain knowledge does it rely on?
Example:
A strong weekly executive report may assume:
reader has little time
reader cares about decisions and risk
technical detail is secondary
metrics need context
These contextual assumptions matter.
Identify how the artifact is organized.
Look for:
sequence
hierarchy
decision order
information grouping
progression
dependencies between sections
Example:
A strong incident report may follow:
IMPACT
↓
TIMELINE
↓
ROOT CAUSE
↓
RECOVERY
↓
PREVENTION
That sequence may be more reusable than the wording.
Look for what the artifact deliberately avoids.
Examples:
no unnecessary history
no speculation
no implementation detail
no jargon
no recommendations without evidence
no unverified metrics
Negative structure can be as important as visible content.
Convert the useful pattern into parameters.
Example:
Gold-standard status report:
Project Alpha
Green
Deployment completed Friday.
2.3% error rate dropped to 0.4%.
Risk:
vendor certificate expires next month.
Decision:
approve certificate renewal.
Reusable scaffold:
PROJECT
STATUS
WHAT CHANGED
METRIC / EVIDENCE
RISK
DECISION REQUIRED
The project details disappear.
The structure remains.
Separate:
FIXED STRUCTURE
from:
VARIABLE CONTENT
Example:
Fixed:
problem
impact
root cause
corrective action
verification
Variable:
system name
error
timeline
environment
This distinction enables reuse.
Strong artifacts often contain hidden decisions.
Example code:
If file exists:
validate it
Else:
create it
The reusable lesson may be:
Check current state before performing creation.
Look beyond syntax.
Ask:
Why does section A come before section B?
Example:
A deployment procedure may:
BACKUP
↓
STOP SERVICE
↓
DEPLOY
↓
START
↓
HEALTH CHECK
The order is part of the knowledge.
Look for how the gold standard proves success.
Examples:
row counts
test output
health endpoint
checksum
build result
comparison
review checklist
Verification patterns often deserve explicit preservation.
Look for:
what happens when input is invalid
what happens when dependency fails
how partial failure is handled
whether retry is safe
A gold-standard implementation may be valuable largely because of failure handling.
For written artifacts, identify:
sentence length
formality
information density
amount of explanation
use of headings
use of examples
directness
technical depth
Do not reduce tone analysis to vague labels like:
professional
Use observable properties.
Formatting may carry meaning.
Examples:
risk appears before recommendations
numbers are placed beside claims
decisions are separated from background
code examples are minimal
Capture formatting only when it supports function.
Strip details that do not generalize.
Example:
Gold standard contains:
C:\Deploy\ProjectA
The generalized scaffold should probably use:
{{DEPLOYMENT_PATH}}
unless the path is a permanent project fact.
Do not generalize away details that are actually part of the rule.
Example:
If every Mail.dat workflow requires a specific file relationship, that relationship may be essential.
Generalization should remove accidental specifics, not domain truth.
For each strong element ask:
Why is this here?
What problem does it prevent?
Would quality decrease if removed?
If an element has no reusable function, do not necessarily preserve it.
After analysis choose the best artifact.
Use when the gold standard reveals a procedure.
Use when it reveals a repeatable AI task.
Use when it reveals a reusable structure.
Use when it reveals validation criteria.
Use when it reveals a stable coding or project pattern.
Use when it reveals how quality is judged.
Never assume the extracted structure is reusable.
Test it on:
A SECOND, SUBSTANTIALLY DIFFERENT EXAMPLE
If it only works on the original, it was copied rather than generalized.
Ask:
Does the pattern survive when:
names change?
domain details change?
data volume changes?
another author uses it?
the scenario changes?
The stable elements are likely the real pattern.
Watch for scaffolds that become meaningless.
Weak:
1. Understand problem
2. Solve problem
3. Verify solution
This is technically general but not useful.
A reusable scaffold needs enough specificity to improve execution.
Watch for templates containing too many original details.
Weak:
Always write:
"KENT3821 certified mailing..."
when the goal is a general certified-mail workflow.
Replace accidental specifics with parameters.
For code, inspect:
responsibility boundaries
control flow
error handling
data flow
naming
dependencies
interfaces
tests
logging
security checks
Do not simply reproduce syntax.
Inspect:
audience
section order
information density
evidence placement
decision placement
tone
length
formatting
Then determine which elements create quality.
Analyze:
role
objective
inputs
procedure
constraints
output format
examples
tool use
failure handling
verification
Then test whether the prompt structure transfers to another task.
For operational workflows, extract:
trigger
preconditions
sequence
decision branches
failure paths
verification
rollback
completion criteria
These often become excellent skills.
Repeated user edits to agent output can act as a gold standard.
Example:
The user repeatedly changes reports to:
remove opening paragraph
put decision first
shorten bullet list
show exact numbers
That repeated pattern may justify:
EXECUTIVE REPORT SKILL
or an existing skill update.
When several gold standards exist:
COMPARE
Look for shared patterns.
Shared structure is stronger evidence than one example.
Example:
Three successful deployment scripts all:
perform preflight
create backup
stop service
deploy
verify health
rollback on failure
This strongly supports a deployment skill.
A weak artifact can help reveal the pattern.
Ask:
What does the good example contain
that the bad example lacks?
or:
What does the bad example contain
that the good example deliberately avoids?
Contrast improves extraction.
Do not assume the reference is perfect merely because it is preferred.
Before extracting it, check for:
unsafe patterns
obsolete practices
accidental bugs
project-specific hacks
unnecessary complexity
A gold standard can still contain defects.
Preserve what is good, not blindly everything.
A reverse-engineering result should contain:
GOLD STANDARD PURPOSE
ROLE / CONTEXT
STRUCTURAL PATTERN
IMPORTANT BOUNDARIES
VARIABLE ELEMENTS
REUSABLE SCAFFOLD
TARGET ARTIFACT TYPE
TRANSFER TEST
Gold standard characteristics:
short
status first
numbers support claims
risk is explicit
decision request is clear
Extracted template:
# {{PROJECT}}
Status: {{STATUS}}
## What Changed
{{FACTS}}
## Evidence
{{METRICS}}
## Risk
{{RISK}}
## Decision Needed
{{DECISION}}
Three existing services all:
validate inputs
open connection late
use parameterized command
close connection in cleanup
normalize errors
Possible output:
.ai/skills/data-access-service/SKILL.md
The skill should encode the procedure rather than copying one service class.
A successful troubleshooting transcript repeatedly used:
capture exact error
identify layer
test connectivity
test authentication
test application behavior
This could become a diagnostic skill.
Use Reverse Engineer when you have:
GOOD EXISTING OUTPUT
Use Prompt Architect when you have:
GOAL + REQUIREMENTS
Typical combination:
GOLD STANDARD
↓
REVERSE ENGINEER
↓
SCAFFOLD
↓
PROMPT ARCHITECT
↓
PRODUCTION PROMPT
Reverse Engineer focuses on:
AN EXISTING HIGH-QUALITY ARTIFACT
Skill Extractor focuses on:
A PROCEDURE DISCOVERED THROUGH REAL WORK
They overlap but have different triggers.
After extracting a pattern:
MIRROR AUDIT IT
Ask whether the pattern:
depends on hidden assumptions
has unsafe constraints
overfits the example
This prevents copying flawed conventions.
Reusable artifacts extracted from gold standards should be versioned when they become important.
Example:
executive-update_v1.0.md
Later:
executive-update_v1.1.md
Track why the structure changed.
Improve this skill when:
Do not make the extraction process unnecessarily academic.
The goal is reusable execution.
Avoid:
COPY THE EXAMPLE
Avoid:
GENERALIZE UNTIL NOTHING USEFUL REMAINS
Avoid:
PRESERVE ACCIDENTAL DETAILS
Avoid:
ASSUME GOLD STANDARD MEANS PERFECT
Avoid:
SKIP TRANSFER TEST
Initial active version.
Introduced:
Powered by TurnKey Linux.