evolve-skill-with-wiki
Skill4 starsChanged 3 months agoMITView on GitHub
WHEN/WHERE/WHO: [Scheduling: Agents or maintainers who need to evolve an agent skill across many execution runs — user says "evolve this skill", "set up skill evolution", "apply WikiSkill", "improve this skill from past runs", or wants a skill that compounds lessons over time. Do not use for a single-conversation fix (use improve-existing-skill) or for brand-new skills (use save-as-skill).] HOW: [Structural: Use this COMPLEX SKILL to run the WikiSkill loop — three-layer workspace (raw/wiki/skills), an Inference Agent doing rollouts without wiki access, a Wiki Maintainer consolidating patterns, a Skill Proposer reading the wiki to propose one atomic patch per iteration, and validation gating that rolls back skills but never the wiki.] WHY: [Scheduling: One-shot skill patches waste most of the learning signal — the WikiSkill paper (arXiv:2608.27454) shows persistent, compounding wiki knowledge adds ~15 points over iteration-local methods and prevents re-proposing rejected ideas.]
In this repository61 other files it gives its agents.
- activate-personalSkill
- analyze-with-tactics-questionnairesSkill
- apply-agile-testing-quadrantsSkill
- apply-architectural-tacticsSkill
- apply-attribute-driven-designSkill
- apply-fundamentals-of-data-visualizationSkill
- apply-oopsi-modelSkill
- apply-screenplay-patternSkill
- apply-specification-by-exampleSkill
- blog-topic-discoverSkill
- build-agent-memory-systemsSkill
- build-business-objectives-modelSkill
- build-data-dictionarySkill
- build-feature-treeSkill
- comment-alive-test-driven-developmentSkill
- conduct-event-stormingSkill
- create-ecosystem-mapSkill
- create-living-documentationSkill
- create-skill-from-bookSkill
- CREATING-SKILL-TEMPLATESkill
- define-architectural-driversSkill
- define-bounded-contextsSkill
- define-ubiquitous-languageSkill
- design-agentic-screenplay-modelSkill
- design-agent-perception-layersSkill
- design-agent-planningSkill
- design-agent-reward-functionsSkill
- design-agents-using-patternsSkill
- design-architecture-viewpointsSkill
- design-autonomous-ai-interfacesSkill
- design-ddd-aggregatesSkill
- design-tool-use-sandboxingSkill
- document-architectural-decisionsSkill
- document-legacy-codebaseSkill
- doc-with-usage-exampleSkill
- draft-srs-documentSkill
- elicit-requirements-modelsSkill
- extract-business-rulesSkill
- facilitate-example-mappingSkill
- facilitate-user-story-mappingSkill
- implement-agent-observabilitySkill
- implement-agent-reflectionSkill
- improve-existing-skillSkill
- improve-user-storySkill
- managing-ai-projectsSkill
- orchestrate-multi-agent-collaborationSkill
- prioritize-requirementsSkill
- review-c4-modelSkill
- review-data-engineeringSkill
- save-as-skillSkill
- scaffold-cmake-cxx-sanitize-gtest-envSkill
- skill-commonSkill
- task-commit-triggerSkill
- test-case-with-demoSkill
- test-case-with-readmeSkill
- test-driven-developmentSkill
- UnitTesting-convert2CaTDDSkill
- update-my-resumeSkill
- update-spec-contextSkill
- validate-requirements-criteriaSkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
17 rules. About 0 are common, 11 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈11
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
When this skill is activated, first load skill-common and apply the shared conventions it defines: canonical section order, frontmatter …
- Distinctive: line 54
Stop Rule: stop when the validation score reaches 1.0, the iteration budget is exhausted, or two consecutive iterations produce no accepted …
- Very specific: line 57
RULE 1: Skills roll back, wiki persists: If a candidate skill set does not beat the best validation score, revert skills/ to the last …
- Distinctive: line 61
Context budgets: keep each wiki pattern page and skill edit concise.
- Distinctive: line 70
Create the three-layer workspace:
- Distinctive: line 88
If a task fails to run because of harness or environment issues, record the failure and continue.
- Distinctive: line 93
Document the failure mode, evidence (iteration + trace ids), and actionable workaround.
- Distinctive: line 94
If the pattern already exists, append fresh evidence or refine the workaround.
- Very specific: line 96
Update wiki/patterns/index.md to reflect created/edited pages.
- Distinctive: line 103
If the skill-impact log shows the same idea was already rejected, the proposer must propose something different or skip the iteration.
- Very specific: line 108
If the score strictly exceeds R_best: accept the candidate as the active skill set and update R_best.
- Distinctive: line 111
If the iteration budget remains and at least one proposal was accepted recently, continue to the next iteration.
- Distinctive: line 116
If the evolution produced no accepted skill, report that outcome and keep the wiki as the artifact.
- Distinctive: line 133
Verify the workspace contains the three layers and that no accepted proposal was ever rolled back by deleting wiki content.
- Very specific: line 134
Verify wiki/skill-impact.md has one entry per iteration, each with a diff, validation score, and accept/reject outcome.
- Very specific: line 135
Verify each evolved skill directory contains SKILL.md and PURPOSE.md linking to at least one wiki pattern.
- Very specific: line 136
Verify each accepted skill passes validate_skill.py against its tier.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Evolve Skill with Wiki
Common Contract (Load First)
When this skill is activated, first load skill-common and apply the shared conventions it defines: canonical section order, frontmatter rules, anti-pattern guidance, and the Review In Mind loop in review-in-mind. This skill adds only domain-specific rules below.
Who
Agents or maintainers who run an agent on a task repeatedly and want the procedural skill (the SKILL.md the agent follows) to get better across those runs instead of staying static.
What
Run an evolutionary loop that co-evolves one or more skills with a persistent knowledge wiki. Each iteration: roll out the agent on training tasks using the current skills, consolidate sampled traces into the wiki, propose one atomic skill update informed by the wiki, and accept or reject the update by measuring validation performance. The wiki is never rolled back, so later iterations build on accumulated knowledge, rejected proposals are not repeated, and recurring failure patterns get progressively documented.
When
- User says: "evolve this skill", "set up skill evolution", "apply WikiSkill", "make this skill learn from past runs", "improve this skill using execution history", or "run skill evolution".
- The agent has (or can cheaply produce) a batch of execution traces on similar tasks, plus a way to score outcomes (correct/incorrect, pass/fail, or a rubric score).
- The user wants a skill that compounds knowledge over multiple rollout iterations rather than a one-off patch.
- Near-miss boundaries: single-conversation fixes belong to
improve-existing-skill; extracting a brand-new skill from one conversation belongs tosave-as-skill; user-facing agent memory (not skill-evolution knowledge) belongs tobuild-agent-memory-systems; skill execution state for long-horizon runs belongs to the SKILL.state line of work, not this skill.
Where
- A workspace directory such as
evolution-runs/<task-domain>/with three layers:raw/(immutable traces),wiki/(compounding knowledge), andskills/(active skills). - The wiki layer uses files:
wiki/patterns/<pattern-name>.md,wiki/patterns/index.md,wiki/logs.md, andwiki/skill-impact.md. - Each evolved skill directory holds
SKILL.md(procedural content) andPURPOSE.md(which wiki patterns motivated the skill or its latest edit).
Why
Single-shot improvement passes discard most of the learning signal. The WikiSkill paper (arXiv:2608.27454) shows that giving the skill proposer access to a persistent, compounding wiki improves average benchmark performance by ~15 points over proposers that only see current traces, and that without a persistent history agents re-propose interventions that already failed. Skills also keep improving late into an evolution run (39–58% of accepted updates happen after the first two iterations), so the value is in the loop, not the first patch.
Inputs
- Task set with scores (required): training tasks to roll out on, validation tasks used for gating, and (optionally) held-out test tasks for final reporting. Each task needs a scoring function.
- Agent harness (required): the agent (with its tools) that executes tasks and can be run with or without an injected skill set.
- Initial skills (optional): an empty set is fine; the loop discovers skills from scratch.
- Iteration budget (recommended): e.g., 5–8 iterations, or early-stop at validation score 1.0.
Output (Logical Evidence)
- An evolved skill set under
skills/, each skill containingSKILL.mdandPURPOSE.md. - A persistent
wiki/with pattern pages, an index, an evolution log, and a skill-impact tracker recording every proposal's diff, validation score, and accept/reject outcome. - A validation record: baseline score, per-iteration validation scores, acceptance decisions, and final test performance when a test split exists.
- Declared state changes: skills are the only reversible layer; wiki content and raw traces are retained.
Optimization Readiness
- Failure Signals: repeated validation failures on the same error class, the proposer re-proposing a rejected idea, skills that keep growing without validation gains, or rollouts that get worse when the wiki is exposed to the executing agent.
- Evidence To Collect: raw traces per iteration, wiki pattern pages and edit history, skill-impact entries (proposal diff + validation score + outcome), and the evolution log.
- Safe Mutation Boundaries: you may refine prompt instructions for the Maintainer and Proposer, sampling budgets, gating thresholds, and wiki file conventions. Invariants that must stay fixed: skills roll back on degradation while the wiki never resets; the inference agent must not read the wiki during rollouts; each proposal is one atomic skill change.
- Acceptance Criteria: accept a revision of this skill only if a validation score improves over the previous best while the wiki audit trail stays complete (every proposal recorded with diff, score, and outcome).
- Rejected Revision Handling: record every rejected proposal in
wiki/skill-impact.mdand the relevant failure pattern inwiki/patterns/so later iterations avoid it. - Transfer Check: confirm the loop works for at least two different task domains (e.g., one reasoning domain and one tool-use domain) without changing the architecture.
- Stop Rule: stop when the validation score reaches 1.0, the iteration budget is exhausted, or two consecutive iterations produce no accepted proposal. Then deliver the best skill set and the full wiki rather than continuing unbounded evolution.
Constraints (Logical Boundaries)
- RULE 1: Skills roll back, wiki persists. If a candidate skill set does not beat the best validation score, revert
skills/to the last accepted state; never delete or revertwiki/orraw/. - RULE 2: No wiki during rollouts. The inference agent executes tasks with skills injected only. Wiki access during rollouts measurably degrades the final skill quality (the paper's ablation: 63.7 → 60.9 average), because the agent solves tasks from the wiki instead of exercising the skills.
- RULE 3: One atomic proposal per iteration. Each iteration creates one new skill or applies one incremental, patch-based edit to one skill. No mega-updates spanning several skills.
- RULE 4: Strict acceptance gate. Accept only when the validation score strictly improves over the best-so-far baseline. Do not accept "neutral" proposals (the paper notes this is a deliberate limitation; changing it requires user approval).
- Context budgets: keep each wiki pattern page and skill edit concise; sample at most ~8 traces per iteration (about 5 failing + 3 passing) and cap each trace excerpt (~15k chars) to avoid context exhaustion.
- Anti-Pattern Mapping: MUST NOT expose the wiki to the inference agent; MUST NOT reset the wiki on rejection; MUST NOT accept a proposal without a validation rollout; MUST NOT let the proposer rewrite multiple skills in one iteration; MUST NOT prune the wiki automatically without a user decision (the paper flags pruning as open work).
One More Thing
This section is a pre-flight checkpoint placed before ## How on purpose: it is the last place an agent can stop and ask before taking any real action. If the task set, scoring function, validation split, or iteration budget is missing or unclear, stop and ask the user before running the evolution loop; do not start Phase 0 with unresolved assumptions.
How (Structural Workflow)
Phase 0: Set Up the Workspace and Baseline
- Create the three-layer workspace:
evolution-runs/<task-domain>/ raw/ # immutable execution traces, one file per task per iteration wiki/ patterns/ # one .md per failure mode or successful strategy patterns/index.md # catalog of all patterns logs.md # chronological evolution history skill-impact.md # proposal diff + validation score + accept/reject, per iteration skills/ # active skill set (may start empty) - Initialize
wiki/patterns/index.md,wiki/logs.md, andwiki/skill-impact.mdwith empty headers. - Roll out the agent with the empty skill set on the validation split to establish the baseline score
R_best. If the baseline is already 1.0, stop — no skill evolution is needed. - Record the baseline in
wiki/logs.md.
Phase 1: Inference Agent — Rollouts
- For each training task, run the agent with the full content of the current active skills injected into its system prompt. Do NOT give it wiki access.
- Save each complete trajectory (reasoning, tool calls, tool outputs, final answer, and score) as an immutable file under
raw/iter-<k>/. - If a task fails to run because of harness or environment issues, record the failure and continue; do not silently drop the task.
Phase 2: Wiki Maintainer — Pattern Consolidation
- Sample up to ~8 traces: aim for about 5 failing traces (for root-cause analysis) and up to 3 passing traces (to capture successful strategies and guard against regressions). Cap each excerpt to roughly 15,000 characters.
- For each failing trace, identify the root cause and write or update a pattern page under
wiki/patterns/:- Document the failure mode, evidence (iteration + trace ids), and actionable workaround.
- If the pattern already exists, append fresh evidence or refine the workaround; do not delete prior evidence.
- For passing traces, extract the successful strategy and note it in the relevant pattern page or a strategy page.
- Update
wiki/patterns/index.mdto reflect created/edited pages. - Append a summary of this iteration's findings to
wiki/logs.md(patterns created, patterns updated, errors that recurred).
Phase 3: Skill Proposer — One Atomic Proposal
- Give the proposer the wiki index,
wiki/skill-impact.md, and a concise summary of training outcomes (task id, pass/fail, prediction, ground truth). - Let the proposer read specific pattern pages and raw traces on demand (ReAct style) before writing the proposal.
- Require exactly one atomic proposal: create one new skill (with
SKILL.mdand aPURPOSE.mdciting the motivating patterns) or apply one patch-based edit to one existing skill. - If the skill-impact log shows the same idea was already rejected, the proposer must propose something different or skip the iteration.
Phase 4: Gating and Rollback
- Apply the proposal to produce candidate skill set
S'. - Roll out the candidate on the validation split and compute its score.
- If the score strictly exceeds
R_best: accept the candidate as the active skill set and updateR_best. If it reaches 1.0, stop after recording. - Otherwise: revert
skills/to the last accepted set. Do not touchwiki/orraw/. - Programmatically append an entry to
wiki/skill-impact.mdwith: iteration, proposal description, target skill, unified diff, validation score, andAccepted/Rejected. - If the iteration budget remains and at least one proposal was accepted recently, continue to the next iteration; otherwise deliver.
Phase 5: Report and Finalize
- Present the final skill set, the per-iteration acceptance history, and (when a test split exists) the final test score.
- Point out which wiki patterns drove the accepted skills, citing
PURPOSE.mdandwiki/logs.md. - If the evolution produced no accepted skill, report that outcome and keep the wiki as the artifact.
Resources
- wikiskill-paper-digest — condensed method details from the source paper (arXiv:2608.27454), including its key numbers and ablations.
- improve-existing-skill — single-iteration fallback; use it when only one evidence cycle is available.
- save-as-skill and validate_skill.py — validation for any
SKILL.mdthe loop produces or edits.
Review In Mind (ReviewInMindGenie)
Execute the common review loop in review-in-mind before delivering.
Review lens for this skill:
- Is the workspace split into immutable
raw/, persistentwiki/, and reversibleskills/, with skills never rolling the wiki back? - Does the loop keep the inference agent wiki-free, propose exactly one atomic change per iteration, and gate acceptance on a strict validation improvement?
- Is every proposal recorded in
skill-impact.mdwith its diff, score, and outcome so rejected ideas are not re-proposed?
Validation (Verifiable Rewards)
- Verify the workspace contains the three layers and that no accepted proposal was ever rolled back by deleting wiki content.
- Verify
wiki/skill-impact.mdhas one entry per iteration, each with a diff, validation score, and accept/reject outcome. - Verify each evolved skill directory contains
SKILL.mdandPURPOSE.mdlinking to at least one wiki pattern. - Verify each accepted skill passes validate_skill.py against its tier.
- Report baseline, per-iteration validation scores, final skill set, and any remaining gaps (e.g., no test split, neutral proposals excluded).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

