skills/skill-enhance/SKILL.md
Use when asked to validate a skill, check a SKILL.md, enhance a skill, lint skills, review skill quality, or fix skill issues. Runs structural and quality checks on Cairn skill files. Keywords: enhance skill, validate skill, check skill, lint skill, review skill, skill quality, fix skill, skill issues, SKILL.md check
npx skillsauth add avifenesh/cairn skill-enhanceInstall 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.
Run structural, quality, and security checks on SKILL.md files. Report issues by severity and suggest fixes.
If a path is provided, check that single skill. Otherwise, scan all skills in skills/.
If a specific path was given:
ls <path>
Otherwise scan all:
find backend/.pub/skills -name "SKILL.md" -type f | sort
Read the file content and evaluate each check below. Collect findings as a list of {severity, check, message, suggestion}.
| Check | Severity | Rule |
|-------|----------|------|
| name present | HIGH | Must exist and be lowercase+hyphens, max 64 chars |
| name matches directory | HIGH | name field must equal the parent directory name |
| description present | HIGH | Must exist and be non-empty |
| description has trigger phrase | HIGH | Must contain "Use when" or "Trigger when" |
| description has keywords | MEDIUM | Should end with "Keywords: ..." list |
| description length | MEDIUM | Should be 50-1024 chars. Too short = poor triggering |
| allowed-tools present | HIGH | Must be set — unscoped tools are a security risk |
| allowed-tools no bare Bash | HIGH | Must not contain "Bash" — use "cairn.shell" instead |
| inclusion value | LOW | Must be "on-demand" or "always". Default to on-demand |
| inclusion: always justified | MEDIUM | Only core infra skills should be always-included |
| disable-model-invocation check | HIGH | Must be true ONLY if skill sends email, deletes email, or pushes to main. Must NOT be set for local-only skills |
| Check | Severity | Rule |
|-------|----------|------|
| Line count | MEDIUM | Body should be under 500 lines. Flag if over |
| Has steps/structure | LOW | Should have ## headings for structure |
| No hardcoded secrets | HIGH | Scan for patterns: API keys, tokens, passwords, Bearer, sk-, ghp_, gho_, connection strings |
| No TODO/FIXME | LOW | Unfinished work should be resolved before shipping |
| Output format defined | LOW | Skills that produce output should document the format |
| Check | Severity | Rule |
|-------|----------|------|
| Secret patterns | HIGH | Regex scan for: /(?:sk-|ghp_|gho_|AIza|AKIA|Bearer\s+[A-Za-z0-9])/ |
| PEM blocks | HIGH | Check for -----BEGIN patterns |
| Connection strings | MEDIUM | Check for ://.*:.*@ patterns |
| URL with credentials | MEDIUM | Check for embedded auth in URLs |
Use cairn.shell to read each file and apply checks. Here's how to scan for secrets:
grep -nE '(sk-[a-zA-Z0-9]{20}|ghp_[a-zA-Z0-9]{36}|gho_[a-zA-Z0-9]{36}|AIza[a-zA-Z0-9_-]{35}|AKIA[A-Z0-9]{16}|-----BEGIN|Bearer\s+[A-Za-z0-9]{10})' skills/*/SKILL.md
For frontmatter parsing, extract the YAML block between --- markers:
sed -n '/^---$/,/^---$/p' <path-to-SKILL.md> | head -20
For line count:
wc -l skills/*/SKILL.md | sort -rn
Group by severity and present as a table:
## Skill Enhance Report
### HIGH Issues (must fix)
| Skill | Check | Issue | Fix |
|-------|-------|-------|-----|
| my-skill | missing-tools | `allowed-tools` not set | Add `allowed-tools: "cairn.shell"` |
### MEDIUM Issues (should fix)
| Skill | Check | Issue | Fix |
|-------|-------|-------|-----|
| my-skill | no-keywords | Description missing keyword list | Add `Keywords: x, y, z` at end |
### LOW Issues (nice to fix)
| Skill | Check | Issue | Fix |
|-------|-------|-------|-----|
| my-skill | no-headings | Body has no ## structure | Add section headings |
### Summary
- Skills checked: N
- HIGH: N | MEDIUM: N | LOW: N
- Clean: N skills passed all checks
If issues were found, offer to fix them automatically:
For each fix, use cairn.shell to edit the file with sed or write a corrected version.
data-ai
Detect agent-cairn PRs that have stalled (no activity >=90 min) and classify the failure mode to route to appropriate recovery agent.
tools
Post-install skill adaptation: read a newly installed SKILL.md, fix environment-specific references (paths, accounts, tool names), assign the skill to relevant agent types, and propose an AGENTS.md update. Triggered automatically after cairn.installSkill completes.
data-ai
Monthly self-improvement brief for Cairn. Queries error_patterns, action_exemplars, experiment_windows, and session_journal to synthesize what Cairn learned, where it failed, and 3 concrete proposals for Avi to approve. Run on the 1st of each month. Keywords: growth brief, monthly review, self-improvement, what did cairn learn, how is cairn doing, monthly report
testing
Decision support with memory-backed context. Retrieves past decisions, journal history, and relevant facts before answering questions that involve a choice or tradeoff. Keywords: should I, which is better, tradeoff, compare, decide, choose, option, alternative, pros and cons, recommend