maintaining-claude-code

maintaining-claude-code

Validate and improve Claude Code configurations (CLAUDE.md, skills, commands, hooks). Use when auditing config quality, checking skill discoverability, organizing .claude directory, or deciding which entity type to use.

2bintang
0fork
Diperbarui 1/22/2026
SKILL.md
readonlyread-only
name
maintaining-claude-code
description

Validate and improve Claude Code configurations (CLAUDE.md, skills, commands, hooks). Use when auditing config quality, checking skill discoverability, organizing .claude directory, or deciding which entity type to use.

Maintaining Claude Code

Validate, organize, and improve Claude Code configurations.

Modes of Operation

Audit Mode

Use when: Checking config quality, validating skills work

Checklist:

  • CLAUDE.md: Specific, structured, actionable
  • Skills: Valid YAML, good descriptions (What + When formula)
  • Commands: Clear purpose, not duplicating skills
  • Hooks: Proper exit codes, reasonable timeouts

Organize Mode

Use when: .claude directory is messy, too many similar skills

Guidelines:

  • Split CLAUDE.md into rules when >150 lines
  • Consolidate similar skills (don't have 3 "code review" skills)
  • Use subdirectories in rules/ for large projects

Advise Mode

Use when: Deciding what entity type to create

Decision tree:

  • Needs to run automatically before/after actions? -> Hook
  • User explicitly triggers with /command? -> Command
  • Claude should auto-detect and use? -> Skill
  • Always-on behavioral guidance? -> CLAUDE.md
  • Path-specific rules? -> .claude/rules/

Quick Reference

Entity Type Decision Matrix

Need Best Entity Alternative
Global behavior guidelines CLAUDE.md Rules if >150 lines
Path-specific rules .claude/rules/ CLAUDE.md if universal
User-invoked workflows Commands Skill if auto-detection wanted
Auto-detected capabilities Skills Command if user should control
Pre/post action validation Hooks Nothing else does this
External API integration MCP Servers Bash calls if simple
Task-specific personas Agents Skills for simpler cases

Skill Description Formula

<What it does>. Use when <trigger1>, <trigger2>, or <trigger3>.

Good: "Extract text and tables from PDF files. Use when working with PDFs, forms, or document extraction."

Bad: "Helps with documents"

YAML Validation

  • --- on line 1 (required)
  • name: max 64 chars
  • description: max 1024 chars, must include triggers
  • --- before content

Common Anti-Patterns

  • Vague descriptions: "Helps with stuff"
  • Nested references: SKILL.md -> REF.md -> DETAILS.md
  • Overloaded skills: Does 5 unrelated things
  • Missing triggers: No "Use when..." clause

Validation Steps

  1. Check YAML syntax in all skills
  2. Verify descriptions include trigger phrases
  3. Ensure no duplicate capabilities across skills
  4. Confirm CLAUDE.md content won't quickly grow stale
  5. Check hooks have reasonable timeouts

Resources

See REFERENCE.md for detailed examples and troubleshooting.

You Might Also Like

Related Skills

fix

fix

243Kdev-testing

Use when you have lint errors, formatting issues, or before committing code to ensure it passes CI.

facebook avatarfacebook
Ambil
peekaboo

peekaboo

179Kdev-testing

Capture and automate macOS UI with the Peekaboo CLI.

openclaw avataropenclaw
Ambil
frontend-testing

frontend-testing

128Kdev-testing

Generate Vitest + React Testing Library tests for Dify frontend components, hooks, and utilities. Triggers on testing, spec files, coverage, Vitest, RTL, unit tests, integration tests, or write/review test requests.

langgenius avatarlanggenius
Ambil
frontend-code-review

frontend-code-review

127Kdev-testing

Trigger when the user requests a review of frontend files (e.g., `.tsx`, `.ts`, `.js`). Support both pending-change reviews and focused file reviews while applying the checklist rules.

langgenius avatarlanggenius
Ambil
code-reviewer

code-reviewer

92Kdev-testing

Use this skill to review code. It supports both local changes (staged or working tree) and remote Pull Requests (by ID or URL). It focuses on correctness, maintainability, and adherence to project standards.

google-gemini avatargoogle-gemini
Ambil
session-logs

session-logs

90Kdev-testing

Search and analyze your own session logs (older/parent conversations) using jq.

moltbot avatarmoltbot
Ambil