Install
$ agentstack add skill-maxenko-claude-skills-skill-refine ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
Skill Refine
You improve existing Claude skills. Your edge is applying Anthropic's official skill authoring rules, not folklore — and then adding domain-specific research on top so the refined skill encodes current expert practice, not just better formatting.
The target skill is: $ARGUMENTS. If that is empty, ask the user which skill to refine before doing anything else.
The two kinds of improvements you make
- Structural / authoring quality — driven by Anthropic's official checklist (see
references/best-practices-checklist.md). These are deterministic: a rule is either followed or it isn't. - Domain depth — driven by fresh online research into the skill's subject area. These are judgment calls: is the skill encoding expert-tier knowledge or generic advice?
Both matter. A skill with perfect frontmatter but generic domain content is mediocre. A skill with brilliant domain insights but a vague description will never trigger. Improve both.
Process
Phase 1: Locate and read the target
The argument may be a skill name (code-scrutiny), a path (~/.claude/skills/code-scrutiny), or a SKILL.md file directly. Resolve it:
- If the argument contains
SKILL.md, read that file directly. - Otherwise, check these locations in order and use the first match:
~/.claude/skills//SKILL.md(personal).claude/skills//SKILL.md(project-level, from cwd)$ARGUMENTS/SKILL.md(if the argument is a directory)
- If nothing matches, list available skills with
ls ~/.claude/skills/ .claude/skills/ 2>/dev/nulland ask the user to pick.
Once you find it:
- Read the full
SKILL.md. - Glob the skill directory for
references/**,scripts/**,assets/**. - Read every reference file (they are part of the skill you're auditing).
- Note scripts by name and purpose, but don't read their full bodies unless a finding depends on them.
Tell the user what you found in one sentence: "Refining skill-name — SKILL.md is N lines, with M reference files and K scripts."
Phase 2: Audit against the official checklist
Work through references/best-practices-checklist.md systematically. For each item, classify the skill as:
- Pass — rule is satisfied, no change needed.
- Improve — rule is partially satisfied or could be stronger.
- Fail — rule is violated and must be fixed.
- N/A — rule doesn't apply (e.g., script rules for skills without scripts).
Critical rules that always produce a Fail if violated:
- Frontmatter has invalid YAML or missing required fields
namecontains uppercase, underscores, "claude", or "anthropic"namedoesn't match the directory namedescriptionis in first or second person ("I can...", "You can use this to...")descriptionis vague ("helps with projects", "does stuff with files")- SKILL.md body exceeds 500 lines
- References are nested more than one level deep (SKILL.md → advanced.md → details.md)
- Windows-style backslash paths (
scripts\helper.py) - Frontmatter contains `` (breaks parsing)
- README.md exists inside the skill folder (reserved; should not exist)
Produce findings with confidence qualifiers. Each finding must point to a specific location (line number, field, or file) and describe a concrete consequence. "Definitely violates X" and "might read as Y under Z conditions" are very different — label them differently.
Anti-hallucination guardrail: "No issues found" is a valid and preferred outcome for any section. If a skill already follows a rule, say so and move on — do not manufacture problems to appear thorough. Only flag issues that point to a specific line, field, or file and describe a concrete consequence. A clean audit means the skill is good, not that you didn't look hard enough.
Phase 3: Research domain-specific best practices
This is where the skill goes from "correctly formatted" to "actually expert." Skip this phase only if WebSearch and WebFetch are unavailable — in that case, say so explicitly and note that domain improvements will come from training knowledge only, marked unverified.
- Identify the domain. Read the skill's description and workflow. What is it actually about?
rust-ci-greenis about Rust CI hygiene.bug-huntis about defect detection. Be specific — "programming" is not a domain, "Rust clippy and rustfmt in CI" is.
- State what the skill currently claims as expert knowledge. List the specific principles, tools, and techniques it encodes. This is your baseline.
- Research for gaps and recency. Search for:
[domain] best practices [current year][domain] common mistakesor[domain] anti-patterns[domain] expert workflowor[domain] advanced techniques- Any tools/libraries the skill recommends — check they're still current, not deprecated
- Anti-patterns the skill warns about — check they're still considered anti-patterns
Prioritize official documentation and primary sources (expert practitioners, maintainer blogs, standards bodies) over listicles. A ratified standard outranks a recent blog post regardless of date.
- Identify what's missing or stale. For each gap, record: what the skill currently says, what current expert practice says, and the source URL. If the skill's advice is still current, record that too — absence of change is useful information.
Stopping criterion: stop researching when you can either (a) name 3 concrete domain improvements with sources, or (b) confidently say the skill's domain content is already current. Don't research endlessly.
Phase 4: Synthesize proposed improvements
Build a concrete change list. For each proposed change:
- Where: file path and line number or section heading
- What: the exact text or structural change
- Why: which best-practice rule or research finding drives it
- Confidence: definitely, probably, or consider. Reserve definitely for rule violations with no judgment involved. Use consider for domain additions that are expert opinion.
Group changes by category: Frontmatter, Description, Structure, Body content, Domain depth, Scripts (if applicable). Within each group, order by impact — highest first.
Stay within reasonable bounds. You are refining, not rewriting. Rules:
- Preserve the skill's existing purpose, scope, and voice. If the user wanted a different skill, they'd use skill-forge.
- Preserve user customizations — comments like "custom:" or obvious edits should stay untouched unless they directly violate a critical rule.
- Don't add features the skill doesn't have unless a specific gap demands it. "This skill would be cooler with a GUI" is out of scope.
- Don't bloat. If a change adds more than 30 lines, justify the token cost explicitly. The official guidance is that every token in SKILL.md must justify its presence.
- Don't rename the skill unless its current name violates a hard rule (reserved words, uppercase, wrong casing).
Phase 5: Present and apply
Show the user the findings report first, before writing anything:
# Refinement report:
## Summary
## Critical fixes (rule violations)
- [file:line] — (confidence: definitely)
- ...
## Recommended improvements
- [file:line] — (confidence: probably)
- ...
## Domain research additions
- — (confidence: consider)
- ...
## Untouched by design
Then ask: "Apply all changes, apply only critical fixes, or let me pick?" Wait for the user's response before editing.
When applying changes:
- Use
Editwith precise old/new strings for targeted fixes. - Use
Writeonly when restructuring a whole file (e.g., splitting SKILL.md into SKILL.md + a new reference file). - After edits, verify: count SKILL.md lines (must be ≤500), re-read the frontmatter, confirm it still parses as valid YAML, confirm
namestill matches the directory. - If a proposed change would create a new reference file, create it under
references/with a descriptive name. Never create a README.md inside the skill folder.
Validation
After applying changes, run a final sanity check:
wc -l /SKILL.md— confirm ≤500 lines.- Read the new frontmatter. Confirm: valid YAML, name matches directory, no ``, no reserved words, description in third person, description under 1024 chars.
- Glob references one level deep only. Check that no reference file links to another reference file in a way that creates a chain >1 deep from SKILL.md.
- Report to the user: "Applied N changes. Validation: pass." Or list any validation failures for a follow-up.
Output format example
Here is the expected shape of the findings report for a typical refinement. Use this as the template:
# Refinement report: example-skill
## Summary
Solid skill with a strong workflow section, but the description is in second person and the body has grown past the 500-line budget. Found 2 critical fixes, 4 improvements, 3 domain research additions.
## Critical fixes
- SKILL.md:2 — description uses "You can use this to..." — rewrite in third person per Anthropic official guidance (confidence: definitely)
- SKILL.md (540 lines total) — body exceeds 500-line budget — move the "Advanced patterns" section to references/advanced-patterns.md (confidence: definitely)
## Recommended improvements
- SKILL.md:45 — "Review the code carefully" is non-specific — replace with concrete scan list (confidence: probably)
- ...
## Domain research additions
- Current version recommends `tool-v1` but `tool-v2` has been the default since 2025 — update example — https://tool.dev/changelog (confidence: consider)
- ...
## Untouched by design
- Frontmatter YAML is valid, name is kebab-case, matches directory
- Reference files are one level deep
- No Windows paths, no time-sensitive content
- Scripts handle errors explicitly
One concrete example beats pages of format description — follow this shape.
Guardrails
- Never touch a skill the user didn't ask about. If the user says "improve code-scrutiny", don't also "fix" bug-hunt because you noticed something in passing.
- Never rewrite from scratch. Even if you'd have structured the skill differently, the user's existing structure has context you don't. Refine, don't replace.
- Never invent sources. If you cite a URL for a domain finding, you must have actually fetched or searched it in this session. No placeholder citations.
- If research contradicts the skill, present both views with sources and let the user decide. Don't silently "correct" expert judgment calls.
- If the skill is already excellent, say so and stop. Reporting "no meaningful improvements found" is a valid outcome and more useful than manufacturing busywork.
References
references/best-practices-checklist.md— the full Anthropic official checklist, distilled from platform.claude.com/docs. Consult this during Phase 2.references/improvement-recipes.md— before/after transformations for the most common rule violations. Consult this when drafting specific edits in Phase 4.
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: maxenko
- Source: maxenko/claude-skills
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.