tidy-project-structure
정보
이 Claude Skill은 파일을 관례적인 디렉터리로 이동하고, 오래된 README를 업데이트하며, 설정 파일을 통합하여 프로젝트 구조를 정리하고 정돈합니다. 프로젝트에 파일이 흩어져 있거나, 문서가 최신 상태가 아니거나, 환경 간 설정이 일치하지 않는 경우에 도움이 됩니다. 이 도구는 핵심 코드 로직을 변경하지 않고 구조적 개선에 중점을 둡니다.
빠른 설치
Claude Code
추천npx skills add pjt222/agent-almanac -a claude-code/plugin add https://github.com/pjt222/agent-almanacgit clone https://github.com/pjt222/agent-almanac.git ~/.claude/skills/tidy-project-structureClaude Code에서 이 명령을 복사하여 붙여넣어 스킬을 설치하세요
문서
tidy-project-structure
Use When
Project org drifted from conventions:
- Files scattered, no clear org
- READMEs outdated | broken examples
- Config files multiplied (dev, staging, prod drift)
- Deprecated in project root
- Naming inconsistent across dirs
Do NOT use for code refactoring | dep restructuring. Focus = file org + doc hygiene.
In
| Parameter | Type | Required | Description |
|---|---|---|---|
project_path | string | Yes | Absolute path to project root |
conventions | string | No | Path to style guide (e.g., docs/conventions.md) |
archive_mode | enum | No | move (default) or delete for deprecated files |
readme_update | boolean | No | Update stale READMEs (default: true) |
Do
Step 1: Audit Layout
Cmp current structure vs conventions | language best practices.
Common conventions by lang:
JavaScript/TypeScript:
src/ # Source code
tests/ # Test files
dist/ # Build output (gitignored)
docs/ # Documentation
.github/ # CI/CD workflows
Python:
package_name/ # Package code
tests/ # Test suite
docs/ # Sphinx docs
scripts/ # Utility scripts
R:
R/ # R source
tests/testthat/ # Test suite
man/ # Documentation (generated)
vignettes/ # Long-form guides
inst/ # Installed files
data/ # Package data
Rust:
src/ # Source code
tests/ # Integration tests
benches/ # Benchmarks
examples/ # Usage examples
Got: List of files/dirs violating saved to structure_audit.txt.
If err: No conventions doc'd → use language-std defaults.
Step 2: Move Misplaced Files
Relocate to conventional dirs.
Common moves:
- Test files outside
tests/→tests/ - Docs outside
docs/→docs/ - Build artifacts in
src/→ delete (gitignored) - Config in root →
config/|.config/
Per move:
# Check if file is referenced anywhere
grep -r "filename" .
# If no references or only relative path references:
mkdir -p target_directory/
git mv source/file target_directory/file
# Update any imports/requires
# (language-specific — see repair-broken-references skill)
Got: All files in conventional locations; git history preserved via git mv.
If err: Moving breaks imports → update import paths | escalate.
Step 3: README Freshness
ID stale info in all READMEs.
Staleness indicators:
- Last mod >6 mo ago
- Old ver # references
- Broken links | code examples
- Missing sections (Install, Usage, Contributing)
- No license badge | broken badge links
# Find all READMEs
find . -name "README.md" -o -name "readme.md"
# For each README:
# - Check last modified date
git log -1 --format="%ci" README.md
# - Check for broken links
markdown-link-check README.md
# - Verify example code still runs (sample first example)
Got: List of stale READMEs in readme_freshness.txt w/ specific issues.
If err: markdown-link-check unavail → manually review external links.
Step 4: Update Stale READMEs
Fix broken links, update examples, add missing sections.
Std fixes:
- Replace broken badge URLs
- Update vers in install instructions
- Fix broken example code (run to verify)
- Add missing sections (template from conventions)
- Update copyright year
README template:
# Project Name
Brief description (1-2 sentences).
## Installation
```bash
# Language-specific install command
Usage
# Basic example
Documentation
Link to full docs.
Contributing
Link to CONTRIBUTING.md or inline guidelines.
License
LICENSE badge and link.
**Got:** All READMEs updated; examples verified to run.
**If err:** Example code can't be verified → mark w/ warning comment.
### Step 5: Review Config Files
ID drift + consolidate duplicate settings.
**Common config issues**:
1. Multiple `.env` (`.env`, `.env.local`, `.env.dev`, `.env.prod`)
2. Duplicate settings across configs
3. Hardcoded secrets (use env vars)
4. Outdated API endpoints | feature flags
```bash
# Find all config files
find . -name "*.config.*" -o -name ".env*" -o -name "*.yml" -o -name "*.yaml"
# For each config:
# - Check for duplicate keys
# - Grep for hardcoded secrets (API keys, tokens, passwords)
grep -E "(api[_-]?key|token|password|secret)" config_file
# - Compare dev vs prod settings
diff .env.dev .env.prod
Got: Config drift doc'd in config_review.txt; secrets flagged for escalation.
If err: Diff shows major divergence → escalate to devops-engineer.
Step 6: Archive Deprecated Files
Move | delete files no longer needed.
Candidates:
- Commented-out configs (
nginx.conf.old) - Legacy scripts not run in >1y
- Backup files (
file.bak,file~) - Build artifacts accidentally committed
Archive process:
# Create archive directory (if archive_mode=move)
mkdir -p archive/YYYY-MM-DD/
# For each deprecated file:
# 1. Verify not referenced anywhere
grep -r "filename" .
# 2. Check git history for last modification
git log -1 --format="%ci" filename
# 3. If not modified in >1 year and no references:
if [ "$archive_mode" = "move" ]; then
git mv filename archive/YYYY-MM-DD/
else
git rm filename
fi
# 4. Document in ARCHIVE_LOG.md
echo "- filename (reason, last modified: DATE)" >> ARCHIVE_LOG.md
Got: Deprecated archived; ARCHIVE_LOG.md updated.
If err: Uncertain if deprecated → leave + doc in report.
Step 7: Verify Naming Conventions
Check inconsistent file naming across project.
Common conventions:
- kebab-case:
my-file.js(JS/web) - snake_case:
my_file.py(Python) - PascalCase:
MyComponent.tsx(React) - camelCase:
myUtility.js(JS fns)
# Find files violating conventions
# Example: Python project expecting snake_case
find . -name "*.py" | grep -v "__pycache__" | grep -E "[A-Z-]"
# For each violation, either:
# 1. Rename to match conventions
# 2. Document exception (e.g., Django settings.py convention)
Got: All files follow conventions | exceptions doc'd.
If err: Renaming breaks imports → update references | escalate.
Step 8: Generate Tidying Report
Doc all structural changes.
# Project Structure Tidying Report
**Date**: YYYY-MM-DD
**Project**: <project_name>
## Directory Changes
- Moved X files to conventional directories
- Created Y new directories
- Archived Z deprecated files
## README Updates
- Updated W stale READMEs
- Fixed X broken links
- Verified Y code examples
## Config Cleanup
- Consolidated X duplicate settings
- Flagged Y hardcoded secrets for removal
- Documented Z config drift issues
## Files Archived
See ARCHIVE_LOG.md for full list (Z files).
## Naming Convention Fixes
- Renamed X files to match conventions
- Documented Y exceptions
## Escalations
- [Config drift requiring devops review]
- [Hardcoded secrets requiring security audit]
Got: Report saved to TIDYING_REPORT.md.
If err: (N/A — generate regardless)
Check
Post-tidy:
- All files in conventional dirs
- No broken links any README
- README examples verified
- Config files reviewed for secrets
- Deprecated archived w/ docs
- Naming conventions consistent
- Git history preserved (
git mvnotmv) - Tests still pass after moves
Traps
- Break Relative Imports: Moving breaks relative paths. Update refs | use absolute.
- Lose Git History:
mvnotgit mv→ loses history. Always git cmds for moves. - Over-Organize: Too many nested dirs → harder navigation. Flat until complexity demands.
- Delete vs Archive: Direct delete → no recovery. Always archive first unless certain.
- Ignore Language Conventions: Personal pref over language std. Follow established.
- Not Updating Docs: Moving w/o updating README paths → broken docs.
→
- clean-codebase — remove dead code, fix lint warns
- repair-broken-references — fix links + imports after moves
- escalate-issues — route complex config to specialists
- devops/config-management — advanced config consolidation
- compliance/documentation-audit — comprehensive doc review
GitHub 저장소
연관 스킬
qmd
개발qmd는 BM25, 벡터 임베딩, 재순위화를 결합한 하이브리드 검색을 통해 로컬 파일을 색인화하고 검색할 수 있는 로컬 검색 및 색인화 CLI 도구입니다. 명령줄 사용과 Claude 통합을 위한 MCP(Model Context Protocol) 모드를 모두 지원합니다. 이 도구는 임베딩에 Ollama를 사용하고 색인을 로컬에 저장하여 터미널에서 직접 문서나 코드베이스를 검색하는 데 이상적입니다.
subagent-driven-development
개발이 스킬은 각 독립적인 작업마다 새로운 하위 에이전트를 배치하고 작업 사이에 코드 리뷰를 진행하여 구현 계획을 실행합니다. 이 리뷰 프로세스를 통해 품질 게이트를 유지하면서 빠른 반복 작업을 가능하게 합니다. 동일한 세션 내에서 대부분 독립적인 작업을 진행할 때 내장된 품질 검증과 함께 지속적인 진행을 보장하기 위해 사용하세요.
mcporter
개발mcporter 스킬은 개발자가 Claude에서 직접 Model Context Protocol(MCP) 서버를 관리하고 호출할 수 있도록 합니다. 이 스킬은 사용 가능한 서버를 나열하고, 인수를 사용해 해당 서버의 도구를 호출하며, 인증 및 데몬 생명주기를 처리하는 명령어를 제공합니다. 개발 워크플로우에서 MCP 서버 기능을 통합하고 테스트할 때 이 스킬을 사용하세요.
adk-deployment-specialist
개발이 스킬은 A2A 프로토콜을 사용하여 Vertex AI ADK 에이전트를 배포하고 오케스트레이션하며, AgentCard 검색, 작업 제출, 코드 실행 샌드박스 및 메모리 뱅크와 같은 지원 도구를 관리합니다. Python, Java 또는 Go 언어로 순차, 병렬 또는 루프 오케스트레이션 패턴을 갖춘 다중 에이전트 시스템 구축을 가능하게 합니다. Google Cloud에서 ADK 에이전트 배포 또는 에이전트 워크플로우 오케스트레이션을 요청받았을 때 사용하세요.
