Skills Expert
Overview
Diagnose or improve one Agent Skill against an explicit contract. Keep the
portable Agent Skills format, Claude Code extensions, and local marketplace
requirements separate; do not present one layer's rules as universal.
Prerequisites
- Identify the target skill directory or
SKILL.md file.
- Confirm whether the user wants a read-only audit or an implementation.
- Locate repository instructions and validators before changing files.
Authority and safety
- Treat current official Claude Code documentation as authoritative for Claude
Code behavior. Use local validators for stricter repository overlays.
allowed-tools pre-approves matching tools; it does not remove every other
tool. Permission settings still govern tools not listed.
- Never add broad write or shell permissions merely to raise a score.
- Do not edit during an audit-only request. Before replacing behavior, explain
the mismatch and preserve intentional project conventions.
- See the source and contract map.
Instructions
- Use
Glob to resolve the canonical package. Confirm that the directory name
and frontmatter name agree, and distinguish live files from examples,
backups, generated copies, or archived packages.
- Read the complete
SKILL.md, directly linked support files, applicable
AGENTS.md/CLAUDE.md, and the validator configuration.
- Select the contract explicitly:
- portable Agent Skills base;
- Claude Code invocation and permission extensions;
- repository or marketplace overlay.
- Check discovery metadata, activation boundaries, prerequisites, executable
steps, permissions, validation, outputs, failures, examples, and support-file
links. Use
Grep to trace every claimed command, tool, path, and side effect
back to source.
- Run the repository's canonical validator. In this repository, use
python3 004-scripts/validate_skills_v2.py --fail-on-warn. When checking an
Intent Solutions marketplace submission, use its marketplace validator on
the specific file rather than silently applying that overlay everywhere.
- In fix mode, use
Edit to make the smallest coherent change. Move durable
detail into one level of references/, remove stale claims and unused
permissions, and add focused regression tests for important contracts.
- Rerun the target validator and package tests. Inspect the diff for unrelated
rewrites and report residual warnings separately from failures.
Validation
- Every support-file link resolves relative to the skill directory.
- Every pre-approved tool is used by the workflow and no required tool is
omitted.
- Examples demonstrate the real workflow rather than fabricated output.
- Destructive or external side effects have explicit confirmation boundaries.
- The final report names the standard and validator version actually used.
Output
Return the canonical path, selected contract, findings by severity, exact
changes (when authorized), validator/test receipts, remaining risks, and a clear
pass/fail result. Do not call a skill "valid" without naming the validation tier.
Error Handling
- Multiple live copies: identify the source of truth before editing and
test any required mirrors for drift.
- Missing validator: perform a manual structural audit and label it as such.
- Conflicting rules: follow the higher-precedence repository instruction and
describe the conflict.
- Unverified platform behavior: consult current official documentation or
state the uncertainty; do not preserve folklore as fact.
- Unsafe requested permissions: narrow the workflow or require explicit
approval instead of granting blanket access.
Examples
These requests demonstrate both read-only and authorized-fix modes:
Audit .claude/skills/release/SKILL.md against the portable format and this
repository's marketplace overlay. Do not edit; list failures and warnings.
Fix skills/report-builder so its declared tools match its workflow, move the
long API table into references/, and rerun the repository validator.
Resources
- Skill contract and authority map
- Repository validator:
004-scripts/validate_skills_v2.py
1---2name: skills-expert3description: Audit, debug, and improve Agent Skills without conflating the portable base format with repository-specific marketplace rules. Use when creating or repairing SKILL.md packages; trigger with "skill not loading", "frontmatter", "allowed-tools", or "validate this skill".4license: MIT5---67# Skills Expert89## Overview1011Diagnose or improve one Agent Skill against an explicit contract. Keep the12portable Agent Skills format, Claude Code extensions, and local marketplace13requirements separate; do not present one layer's rules as universal.1415## Prerequisites1617- Identify the target skill directory or `SKILL.md` file.18- Confirm whether the user wants a read-only audit or an implementation.19- Locate repository instructions and validators before changing files.2021## Authority and safety2223- Treat current official Claude Code documentation as authoritative for Claude24 Code behavior. Use local validators for stricter repository overlays.25- `allowed-tools` pre-approves matching tools; it does not remove every other26 tool. Permission settings still govern tools not listed.27- Never add broad write or shell permissions merely to raise a score.28- Do not edit during an audit-only request. Before replacing behavior, explain29 the mismatch and preserve intentional project conventions.30- See [the source and contract map](references/skill-contract.md).3132## Instructions33341. Use `Glob` to resolve the canonical package. Confirm that the directory name35 and frontmatter `name` agree, and distinguish live files from examples,36 backups, generated copies, or archived packages.372. Read the complete `SKILL.md`, directly linked support files, applicable38 `AGENTS.md`/`CLAUDE.md`, and the validator configuration.393. Select the contract explicitly:40 - portable Agent Skills base;41 - Claude Code invocation and permission extensions;42 - repository or marketplace overlay.434. Check discovery metadata, activation boundaries, prerequisites, executable44 steps, permissions, validation, outputs, failures, examples, and support-file45 links. Use `Grep` to trace every claimed command, tool, path, and side effect46 back to source.475. Run the repository's canonical validator. In this repository, use48 `python3 004-scripts/validate_skills_v2.py --fail-on-warn`. When checking an49 Intent Solutions marketplace submission, use its marketplace validator on50 the specific file rather than silently applying that overlay everywhere.516. In fix mode, use `Edit` to make the smallest coherent change. Move durable52 detail into one level of `references/`, remove stale claims and unused53 permissions, and add focused regression tests for important contracts.547. Rerun the target validator and package tests. Inspect the diff for unrelated55 rewrites and report residual warnings separately from failures.5657## Validation5859- Every support-file link resolves relative to the skill directory.60- Every pre-approved tool is used by the workflow and no required tool is61 omitted.62- Examples demonstrate the real workflow rather than fabricated output.63- Destructive or external side effects have explicit confirmation boundaries.64- The final report names the standard and validator version actually used.6566## Output6768Return the canonical path, selected contract, findings by severity, exact69changes (when authorized), validator/test receipts, remaining risks, and a clear70pass/fail result. Do not call a skill "valid" without naming the validation tier.7172## Error Handling7374- **Multiple live copies:** identify the source of truth before editing and75 test any required mirrors for drift.76- **Missing validator:** perform a manual structural audit and label it as such.77- **Conflicting rules:** follow the higher-precedence repository instruction and78 describe the conflict.79- **Unverified platform behavior:** consult current official documentation or80 state the uncertainty; do not preserve folklore as fact.81- **Unsafe requested permissions:** narrow the workflow or require explicit82 approval instead of granting blanket access.8384## Examples8586These requests demonstrate both read-only and authorized-fix modes:8788```text89Audit .claude/skills/release/SKILL.md against the portable format and this90repository's marketplace overlay. Do not edit; list failures and warnings.91```9293```text94Fix skills/report-builder so its declared tools match its workflow, move the95long API table into references/, and rerun the repository validator.96```9798## Resources99100- [Skill contract and authority map](references/skill-contract.md)101- Repository validator: `004-scripts/validate_skills_v2.py`