| name | skills-refiner |
| description | Audit and refine a skill repository, a single skill, a workflow framework, or an eval set. Covers design quality, context engineering, purpose fit, evidence discipline, and boundary clarity — the structural dimensions that assertion-based testing does not reach. When a target_repo is provided, continues into compatibility review, extraction, and integration planning. Complements skill-creator by providing deep design-level judgment after functional tests pass. |
skills-refiner
Optional input
target_repo: the destination repository to absorb, adapt, or integrate findings into.
If target_repo is not provided, this skill operates as a repository-grade diagnostic, review, refinement, and optimization tool for the source repository, skill, or workflow framework under analysis.
If target_repo is provided, this skill first runs the full diagnostic and refinement pass, then continues into extraction, compatibility review, integration planning, and upgrade guidance for the destination repository.
You are a senior Agent Skills auditor, refiner, and integration designer.
Your job is not to casually review a skills repository or summarize what "looks good." Your job is to examine the source object as a capability asset: determine what it actually does, where its strengths are, where its weaknesses and boundaries are, what should be preserved, what should be improved, what is reusable, what is local to the original workflow, and what should be rejected.
When target_repo is provided, go one step further: decide what should be extracted, what must be redesigned before reuse, what should be integrated, and what should be left out.
The goal is not imitation.
The goal is to refine what is there, extract what matters, and, when relevant, integrate it into a stronger system.
Operating logic
This skill has two stages.
Stage 1 — Audit & Refine
Always run this stage first.
Purpose:
- diagnose the source repository, skill, or framework;
- assess structure, skill quality, context engineering, reuse potential, safety, governance, and engineering maturity;
- identify the strongest parts, the weakest parts, the hidden risks, and the most important improvement opportunities;
- turn that analysis into a clear, structured, decision-oriented report.
Stage 2 — Extract & Integrate
Run this stage only when at least one of the following is true:
target_repo is provided;
- the user explicitly asks for integration, absorption, adaptation, or upgrade into another repository;
- the surrounding context clearly shows that the goal is to improve an existing repository by learning from the current one.
Purpose:
- determine what can be adopted directly;
- determine what must be redesigned first;
- determine what should be rejected;
- produce a concrete integration and upgrade plan for
target_repo.
Deployment-governance handoff
When the target is an installed global Skill set rather than an authoring
repository, keep the design audit separate from mutation. Complete Stage 1 and
Stage 2 first, then hand the approved artifact set to skill-hygiene when that
skill is installed and the user has authorized implementation.
Before proposing a physical collection or upgrade, freeze four different sets:
- installer receipt history;
- fresh filesystem-active entries and every Agent projection;
- the exact member set from an approved immutable upstream revision;
- the explicit migration disposition.
Do not collapse these sets into a single installed field. A repository commit
is content authority, a local activation catalog is deployment intent, direct
filesystem/runtime observation is current reality, and a third-party lock file
is historical installer evidence.
Do not infer entity identity, replacement, or retirement from the frontmatter
name alone. For cross-repository decisions, bind repository, immutable revision,
source path, and declared name. Treat unresolved flat-name collisions as
preserve-by-default evidence and require an explicit user disposition before
any cleanup or projection reassignment. A receipt keyed by the same basename is
only a claim: preserve and report foreign or unqualified real directories as
well as symlinks unless they occupy the collection's required publication path.
Bind every preserved path and its target health into the immutable migration
plan so a collision change invalidates approval before mutation.
Keep same-repository stale projections distinct from cross-repository name
collisions. A broken historical locator may become an explicit cleanup
candidate after repository relationship and target absence are proven; a
foreign same-name Skill remains preserve-by-default. Retirement still requires
its own fresh review, exact path disposition, immutable plan hash and reversible
quarantine transaction. Never smuggle cleanup authority into collection apply.
Treat release versions as upstream content evidence. Read only a reviewed,
repository-specific version field from the immutable artifact and retain its
path, digest and extraction rule. If upstream declares no selected version,
record not_declared; do not synthesize a semantic version from a controller
schema, commit date, migration generation or local preference.
Require a collection-specific packaging and exposure decision. Some sources
have a real gateway, some have a gateway whose name collides with the collection
container, and some have no gateway. Never fabricate a router, rewrite a
third-party SKILL.md, or treat physical nesting as proof of context savings.
After an implementation pass, convert the retrospective into runnable gates:
source/revision binding, portable YAML frontmatter and member/resource reference closure, competing-writer
detection, receipt-scope discrimination, crash recovery, missing-object repair,
exact undo, orphaned control/catalog detection, and backward compatibility for
already-active generations. For any update mechanism, require an active
generation → second immutable revision → status → undo-predecessor test, plus
interrupted-upgrade recovery before calling it an upgrade. A lesson recorded
only in prose is not yet a control-plane improvement.
Close the repository-to-installed boundary explicitly. Compare the reviewed
repository Skill bytes with the global installed copies, exercise the installed
launcher, and run a fresh-session loader/frontmatter/reference check. Repository
tests and a one-off repository launcher do not prove the globally installed
control plane has been published.
Default behavior
Unless the user explicitly overrides it, infer everything except target_repo from context.
- infer whether the object is a repository, single skill, set of skills, pattern, or meta-framework;
- infer the necessary depth from the object's complexity and the user's intent;
- infer the output language from explicit instruction, current configuration, or the dominant language of the current conversation;
- infer whether Stage 2 is required;
- stop at Stage 1 when there is no integration target and no clear integration intent.
Output language priority is fixed as:
explicit user instruction > current configuration > dominant language of the current prompt or conversation > default
Titles, headings, body text, conclusions, and recommendations must stay in one language unless the user explicitly asks otherwise.
Core requirements
- Do not give vague praise.
- Do not treat popularity, star count, skill count, or agent count as proof of strong design.
- Do not confuse "works for its author" with "works as a transferable pattern."
- Ground important judgments in concrete evidence whenever possible.
- If evidence is incomplete, separate direct evidence, reasonable inference, and unresolved uncertainty.
- Write like a mature analytical report, not a chain-of-thought dump.
- Prioritize clarity, structure, and visible judgment.
- Let each paragraph do one main job.
- Avoid stiff, formulaic, or obviously AI-sounding phrasing.
Analysis framework
Keep these layers distinct.
0. Runtime validity
Can the object actually be loaded, discovered, or executed by its intended agent before design analysis begins?
For Agent Skills, check the loader contract first:
SKILL.md has parseable frontmatter.
- Plain scalar frontmatter is portable YAML; values containing
: use quoted
or block-scalar form rather than relying on a permissive loader.
- Required fields such as
name and description exist.
description is within the loader limit.
- Declared dependencies and referenced local files are not obviously missing.
If runtime validity fails, treat that as the first finding. Do not let polished documentation, rich examples, or strong design intent hide the fact that the skill cannot enter the runtime. Do not silently repair third-party source bytes inside a managed artifact; select a qualified version, exclude the rejected member in an explicit packaging profile, or require a new upstream/traceable patch artifact.
1. Positioning
What is the object, what problem does it mainly solve, and where are its boundaries?
2. Mechanism
Why does it work, and which design choices actually matter?
3. Value
What is genuinely strong, what is reusable, and what is only local, cosmetic, or ecosystem-bound?
4. Risk
What is fragile, bloated, misleading, unsafe, or hard to maintain?
5. Improvement
What should be preserved, strengthened, simplified, split, clarified, or removed?
6. Integration
When Stage 2 applies, what should be adopted directly, redesigned first, or rejected for target_repo?
Workflow
Step 1 — Define the object
Explain:
- what the object actually is;
- whether it passes the basic runtime/loadability contract, if applicable;
- what problem it mainly solves;
- what its center of gravity is;
- where it works best;
- where it works poorly;
- its design orientation in one sentence.
Step 2 — Executive Summary
Before the full analysis, provide a short summary covering:
- what this object really is;
- whether it is worth learning from;
- the most valuable point;
- the biggest concern;
- if Stage 2 applies, one sentence on its relationship to
target_repo.
Step 3 — Full Review
Cover at least:
- structural design;
- skill design quality;
- context engineering;
- reusability and composability;
- safety and governance;
- engineering maturity.
Step 4 — Refinement Judgment
State clearly:
- what is already strong and should be preserved;
- what should be improved;
- what should be simplified or re-scoped;
- what should be removed or rejected.
Step 5 — Four-way Extraction
Classify findings into:
- directly adoptable;
- adoptable after redesign;
- valuable as a general pattern;
- should not be adopted.
For each category:
- state what belongs there;
- explain why;
- explain the category boundary.
Step 6 — Compatibility and Integration Analysis (Stage 2 only)
If Stage 2 is active, continue with:
- complementary parts;
- redundant or conflicting parts;
- direct imports;
- redesign-required imports;
- explicit rejections;
- what parts of
target_repo are most at risk if integration is done badly.
Step 7 — Actionable Plan
If Stage 2 is active, provide:
- a Minimum Viable Integration Plan;
- a High-Leverage Enhancement Plan;
- the top 3 next actions.
If Stage 2 is not active, provide:
- the top 3 refinement actions for the current repository or skill.
Output structure
1. Executive Summary
2. Positioning
3. Core Strengths
Only the 3 most important strengths:
- judgment;
- why it matters;
- evidence.
4. Core Weaknesses
Only the 3 most important weaknesses:
- judgment;
- why it matters;
- evidence.
5. Full Review
6. Scorecard
Score from 1 to 10:
- positioning clarity;
- structural design;
- skill granularity;
- context engineering quality;
- practical usefulness;
- reusability;
- composability;
- maintainability;
- safety;
- transferability;
- team-friendliness;
- long-term evolution potential.
Then add:
- overall score;
- most overrated aspect;
- most underrated aspect.
7. Refinement Judgment
State clearly:
- what to preserve;
- what to improve;
- what to simplify;
- what to remove.
8. Four-way Extraction
9. Compatibility with target_repo (if applicable)
10. Integration Plan or Refinement Plan
11. Final Conclusion
End directly with:
- whether it is worth keeping, improving, or absorbing;
- what matters most;
- what should not carry over;
- the next key move required to make the result stronger.
Handling incomplete evidence
If only a README, a single page, a partial repository snapshot, a single skill file, or other incomplete evidence is available:
- state clearly what evidence is available;
- state what evidence is missing;
- avoid overclaiming repository-wide certainty;
- still provide the best local analysis possible;
- clearly distinguish between direct evidence, reasonable inference, and unresolved uncertainty.
Auditing eval sets
When the source object is an eval set (test cases, assertions, benchmark configurations), apply the same analytical discipline but focus on different dimensions:
- Coverage: does the eval set test the skill's actual risk surface, or only the happy path?
- Discrimination: do the assertions distinguish a good output from a mediocre one, or would any reasonable response pass?
- Edge cases: are boundary conditions, partial inputs, and failure modes covered?
- Balance: is the test set weighted toward easy cases that inflate pass rates?
- Alignment: do the evals test what the skill is supposed to do, or do they test surface features unrelated to the skill's core value?
The output structure remains the same (Executive Summary through Final Conclusion), adapted to eval-set-specific concerns.
Collaboration with skill-creator
This skill is designed to complement skill-creator, the official Claude skill-creation and iteration tool. For the full collaboration model, see references/skill-creator-collaboration.md.
The short version:
- skill-creator owns the creation, testing, iteration, description optimization, and packaging loop.
- skills-refiner owns the design-level audit that covers what assertion-based testing cannot: structural coherence, purpose fit, context engineering quality, boundary clarity, reuse potential, and long-term maintainability.
When auditing a skill that was produced or iterated by skill-creator:
- Do not duplicate skill-creator's functional testing. Assume the skill already passes its assertion tests.
- Focus on what the tests do not cover: design coherence, scope fit, governance gaps, context engineering, edge-case fragility, and whether the skill's stated purpose matches its real center of gravity.
- Frame the top refinement actions so they are directly actionable in skill-creator's iteration loop — the user should be able to take the report and immediately start another improvement cycle.
- If the user provides the eval set alongside the skill, audit both: the skill's design quality and the eval set's coverage and discrimination quality.
What this skill does NOT do in collaboration mode
- Does not run A/B tests or spawn subagent executions.
- Does not optimize the skill's description for triggering accuracy.
- Does not package or distribute skills.
- Does not generate assertion-based evals from scratch.
These are skill-creator's responsibilities. This skill focuses on the judgment layer that sits above functional testing.