1. Input Parsing
1.1 Required Parameters
(Position 1) — Absolute path of the file to be scored. Supported extensions:
/
/
/
/
/
.
Binary files / programming language source codes are not supported (not the evaluation target of this skill).
1.2 Optional Parameters
- (default 90) — Minimum Overall score required to exit the loop (percentage, 0-100). If the score is lower than this value, the iteration continues.
- (default 10) — Upper limit of maximum iteration rounds. If the target is not reached when the limit is hit, stop (no error thrown, output a closing report indicating the target is not met).
- (default empty) — Focus of the review. Examples:
review_focus="schema instruction"
or review_focus="OpenCode skill body"
. If left empty, the oracle uses a general baseline.
2. Global Rules
2.1 Fast Fail Rule
If any
/
/
call fails (timeout, agent unavailable, error returned, etc.):
- Immediately stop the current round
- Report "🔴 [Round Name] Interrupted: [Call Name] call failed. [Error Message]"
- Wait for user intervention
Downgrading, retrying, skipping, or executing alternative actions on your own is prohibited.
2.2 Scoring System (Percentage)
Each dimension is scored 1-5 points, multiplied by 20 to get the percentage score. Overall = Average score of 5 dimensions × 20.
| Dimension | Meaning |
|---|
| Clarity | Is the intent unambiguous to the LLM? Are verbs specific vs vague? Are conditions explicit vs implicit? |
| Conciseness | Are there removable repetitions? Is there wording that adds tokens but no constraints? |
| Actionability | Can the LLM execute end-to-end without asking "Wait, what do I do?" Are failure modes addressed? |
| Consistency | Are internal terminology, PHASE/Step numbering, and format conventions consistent? |
| Minimal-slop | Is there AI-generated redundancy, marketing frameworks, magic number tokens, or restatements? |
2.3 target_score Mode
Default value and range are specified in §1.2 (default 90 if not passed, valid range 0-100).
- is considered "Strict Mode" (each refinement requires higher ROI)
- is considered "Lenient Mode" (oracle will focus more on blocking issues)
- or is considered invalid, stop and prompt the user
3. R0: Baseline Assessment
Purpose: Obtain the first oracle report and establish a refinement backlog.
Call (single oracle agent, run_in_background=false):
task(subagent_type="oracle", prompt="
You are the Oracle Review Agent, responsible for running a 5-dimensional quality assessment (baseline assessment) on <target_file>.
**Task**:
1. Read this skill body (§2.2 5-dimensional definitions + §5 Output Format + §2.3 target_score mode — all are authoritative sources from the skill body)
2. Read <target_file> (the file to be reviewed)
3. Output 5-dimensional scores + 3 types of findings + Quick wins according to §5 Output Format
**Target Score** (percentage): <target_score>, < 80 means lenient / ≥95 means strict / default 90.
")
Parse Output: Extract the Overall score (e.g., "Overall: 4.5/5" → 90/100), record it as R0 baseline.
4. R1+: Refinement-Review Loop
4.1 Loop Entry
Read the oracle output from the previous round, list all 🔴 / 🟡 / ⚪ findings. Decide "fix in this round" or "postpone" for each finding.
Refinement Priority:
- 🔴 Must fix (this round)
- 🟡 Fix based on ROI (this round, e.g., changes ≤ 3 lines)
- ⚪ Select 1-2 items with the highest ROI to fix (this round)
4.2 Apply Refinements
Use the Read/Edit tool to directly modify
(
original file):
- Read to confirm the current line numbers before modification
- Use Edit to replace (exact match, no fuzzy replacement)
- After modification, run verification such as / via (if the target file is associated with a project that has these tests). If no test suite is available (e.g., reviewing README/standalone .md), skip this step and only rely on oracle re-review as the quality gate.
Strictly Prohibited: Modify more than 3 places in batches without verification; modify one place at a time and confirm immediately.
4.3 Re-extract + Re-review
After each modification:
- (No need to re-read target_file — the oracle automatically re-reads it every round; if there are changes, directly proceed to the next round of review)
- Re-run the oracle (same task() call as §3, reuse session_id to maintain cross-round context). Specific mechanism: Extract the field (OpenCode standard) from the return value of R0's , and pass it as a parameter in subsequent
task(subagent_type="oracle", session_id=<extracted value>, prompt=...)
calls. Do not omit session_id — omitting it will cause the oracle to lose known cross-round findings during each re-review, leading to R(N) score fluctuations.
- Parse the new score, record it as R(N)
4.4 Loop Exit Conditions (Check before each round of refinement)
Read the latest R(N) oracle report:
- Overall × 20 ≥ target_score → Exit the loop, proceed to §5 Closing
- Round count ≥ max_rounds → Force stop, proceed to §5 Closing (indicate target not met + remaining findings)
- Otherwise → Proceed to §4.1 for the next round
5. Closing Report
Definition of Finding Level Symbols: 🔴 = Critical issue, must be fixed; 🟡 = Recommended improvement, fix based on ROI; ⚪ = Optional optimization, handle items with high ROI.
Whether the loop exits due to reaching the target or being forced to stop by max_rounds, output the final closing report:
## score-prompt Closing Report
**Target File**: <target_file>
**Target Score**: <target_score>
**Actual Score**: <R(N) Overall × 20>/100
**Iteration Rounds**: R0 → R(N)
**Time Spent**: <estimated minutes>
### Score Evolution
| Round | Overall | Δ | Refinement Summary |
| ----- | ------- | --- | ------------------ |
| R0 | 80/100 | — | Baseline assessment |
| R1 | 88/100 | +8 | Fixed 3 🟡 + 2 ⚪ |
| R2 | 92/100 | +4 | Fixed remaining 1 🟡 |
| ... | | | |
### Target Status
✅ Target score reached (≥ 90) / ❌ Target not reached (N remaining findings)
### Remaining Findings (if any)
- 🟡 L45: ...
- ⚪ L78: ...
### Follow-up Recommendations
- To achieve a higher score, re-run this skill with target_score=95
- Items marked [Low ROI] in remaining findings can be handled in future reviews
After the closing report is output, the skill task is completed, and control is returned to the user.
6. Error Handling
- Target file does not exist → Immediately report "🔴 target_file does not exist: <path>" and stop
- Unsupported file type → Report "🔴 Unsupported file type: <ext>, this skill supports .md/.yaml/.yml/.json/.toml/.txt" and stop
- Oracle agent unavailable → Report "🔴 Oracle agent is unavailable, this skill relies heavily on oracle for quality review" and stop
- Target not reached within max_rounds → No error thrown, output closing report (mark ❌ target not met), return control
- Invalid target_score → Report "🔴 target_score must be between 0 and 100" and stop
",