home / skills / oimiragieo / agent-studio / directory-naming-convention

directory-naming-convention skill

/.claude/skills/_archive/dead/directory-naming-convention

This skill enforces directory naming with lowercase letters and dashes, reviews code, and suggests refactors to align with established conventions.

npx playbooks add skill oimiragieo/agent-studio --skill directory-naming-convention

Review the files below or copy the command above to add this skill to your agents.

Files (3)
SKILL.md
1.4 KB
---
name: directory-naming-convention
description: Defines the directory naming convention.
version: 1.0.0
model: sonnet
invoked_by: both
user_invocable: true
tools: [Read, Write, Edit]
globs: components/**/*
best_practices:
  - Follow the guidelines consistently
  - Apply rules during code review
  - Use as reference when writing new code
error_handling: graceful
streaming: supported
---

# Directory Naming Convention Skill

<identity>
You are a coding standards expert specializing in directory naming convention.
You help developers write better code by applying established guidelines and best practices.
</identity>

<capabilities>
- Review code for guideline compliance
- Suggest improvements based on best practices
- Explain why certain patterns are preferred
- Help refactor code to meet standards
</capabilities>

<instructions>
When reviewing or writing code, apply these guidelines:

- Use lowercase with dashes for directories (e.g., components/auth-wizard).
  </instructions>

<examples>
Example usage:
```
User: "Review this code for directory naming convention compliance"
Agent: [Analyzes code against guidelines and provides specific feedback]
```
</examples>

## Memory Protocol (MANDATORY)

**Before starting:**

```bash
cat .claude/context/memory/learnings.md
```

**After completing:** Record any new patterns or exceptions discovered.

> ASSUME INTERRUPTION: Your context may reset. If it's not in memory, it didn't happen.

Overview

This skill defines and enforces a clear directory naming convention for projects to improve consistency and discoverability. I provide concrete guidance, automated-friendly rules, and targeted feedback to bring existing codebases into alignment. The goal is predictable structure and easier collaboration.

How this skill works

I inspect project directory names and compare them to the convention: lowercase words separated by single dashes (kebab-case) for all folders. I flag deviations, explain why a pattern is problematic, and suggest exact renames or refactors. I can also recommend automated checks and rename scripts to apply fixes safely.

When to use it

  • When establishing or documenting project structure for new projects
  • During code reviews to ensure consistent directory names
  • When onboarding contributors to reduce friction and misnaming
  • When preparing a codebase for packaging, publishing, or automation
  • When migrating or refactoring large folder hierarchies

Best practices

  • Use lowercase letters only and separate words with single dashes (e.g., components/auth-wizard)
  • Avoid spaces, underscores, camelCase, or dots in directory names
  • Keep names short, descriptive, and focused on purpose (e.g., services/payment)
  • Prefer nouns for folders and verbs for scripts or actions where appropriate
  • Add a migration plan when renaming folders to update imports, tests, and CI pipelines

Example use cases

  • Review a front-end repo to convert MixedCase and underscores into kebab-case directories
  • Create a pre-commit or CI check that rejects non-compliant folder names
  • Suggest a step-by-step rename plan that updates imports and references across the codebase
  • Document a consistent directory naming policy for a multi-team monorepo
  • Audit third-party packages or examples to ensure they match your project conventions

FAQ

Are there exceptions to kebab-case naming?

Exceptions are rare; allow them only for external constraints (third-party integrations or legacy systems). Document any exception and include a migration or compatibility plan.

Can I automate the renaming process safely?

Yes. Use scripted renames that update imports, tests, build configs, and CI. Run thorough tests and stage changes in a branch to avoid breaking dependent code.