codex/skills/opt/SKILL.md
Orchestrate evidence-backed optimization of user-owned Codex skills through $seq or $shadow evidence, $tune diagnosis, and $refine package editing and outcome observation. Use for explicit skill audits, missed/false/ceremonial activation, decision-contract tuning, regression repair, or authorized skill edits. Not for application-code optimization or autonomous portfolio mutation.
npx skillsauth add tkersey/dotfiles optInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Coordinate the user-owned skill-improvement loop without blurring authority:
$seq historical and session evidence
$shadow one watched-session delta
$tune diagnosis and expected decision delta
$refine sole skill-package writer
$opt orchestration and final synthesis
Core question:
What is the smallest evidence-backed change that improves future decisions,
execution, evidence quality, or orchestration?
$opt is explicit-intent. Generic uses of “optimize,” “improve,” or “tune” for application code do not activate it.
Skill-package mutation requires explicit edit authority. Ambiguous improvement requests default to proposal-only.
Choose exactly one:
audit
propose
tune
shadow-diagnose
apply
regression
goal-loop
Defaults:
ambiguous optimize -> propose
edit authority -> absent
Carry one type through the workflow:
decision
execution
evidence
orchestration
mixed
Evaluate the type with its relevant evidence:
Prefer:
seq skill-decision-audit \
--skill <skill> \
--last 30d \
--exclude-current \
--mode tune-packet \
--format json
Pass STE-v1 to $tune.
Use $shadow over exactly one target skill, one root session, and one cursor. Pass GSD-v2 or watched-session STE-v1 to $tune. Do not infer recurrence from one session.
Use current-turn evidence first. Do not mine history to overrule an explicit correction.
Optional read-only roles:
skill_contract_modeler
skill_decision_provenance_auditor
skill_outcome_skeptic
STE-v1.$tune in proposal mode.SDC-v2 delta or a terminal no-action state.Use only with explicit edit authorization and a complete REFINE-SKILL-v3 brief.
$refine owns:
target-package inspection
one dominant intervention
authorized edits
stable contract preservation
outcome-observation query
SRR-v1
The root owns final synthesis. Custom agents do not write skill packages.
Bind the repair to:
observed episode
trigger / clause / route
prior bad behavior
expected future behavior
reproduction query
Apply the smallest intervention that addresses the behavioral failure rather than changed wording.
When $cas owns continuation:
new evidence
-> tune delta
-> refine action
-> outcome observation
-> parent goal decision
No evidence delta means no repeated full optimization cycle.
refine_brief:
brief_version: REFINE-SKILL-v3
target_skill:
target_kind:
mode:
source_evidence:
gap:
expected_delta:
optimization_boundary:
allowed_files: []
forbidden_files: []
protected_contracts: []
intervention_budget:
forbidden_changes: []
smallest_change_hint:
outcome_observation:
Rules:
SRR-v1.Optimization is complete only when:
$tune selected one bounded route;$refine stayed inside the authorized package surface;SRR-v1 was emitted;$opt result:
- Target:
- Target kind:
- Mode:
- Evidence packet:
- Tune delta:
- Refine route:
- Files changed:
- Outcome observation:
- SRR-v1:
- Parent goal status:
- Remaining uncertainty:
- Next action:
$seq owns historical/session evidence.$shadow owns one-session monitoring.$tune owns diagnosis.$refine is the sole skill-package writer.$opt owns orchestration and final synthesis.tools
Invokes Apple's macOS 27 fm command-line tool from a local Mac to use the on-device system model or Private Cloud Compute, including instructions, image prompts, schema-constrained JSON, and noninteractive automation. Use when the user asks to run Apple Foundation Models through fm, compare system versus pcc, generate structured output, or automate fm without Swift or an app.
development
Compile historical Codex sessions into governed counterfactual evidence, evaluate an existing owner-applied candidate through blinded paired HCTP trials, and fold observable evidence into RUN, OBSERVE, or STOP. Use for `$hylo`, CRF extraction, counterfactual replay, source-governed direct or historical trials, sealed evidence, paired baseline/candidate evaluation, causal frontiers, or evidence-governed improvement.
testing
Ensure a `ledger` command is available on PATH; materialize, validate, record, replay, and project requested Actuating artifacts without taking semantic or execution authority; coordinate the shared Learnings/Synesthesia/Negative Ledger lifecycle checkpoint and repo-local source-memory reconciliation; address Universalist plans and receipts; and perform pure artifact validation.
testing
Classify and quotient review findings, failing tests, incidents, bug reports, migration failures, and other witnessed falsifiers against accepted intent and the current Construction. Author counterexample-set/v1 without selecting repairs, counting review credit, or granting mutation.