Clean up and organize markdown files dumped at project root. Routes files to appropriate directories (memos/, docs/, devops/docs/) or deletes obsolete content. Follows project file organization guidelines from CLAUDE.md.
Routes markdown files from project root to appropriate directories (memos/, docs/, devops/docs/) or deletes obsolete content. Automatically triggered during housekeeping workflows or when ALL_CAPS.md files are detected at root.
/plugin marketplace add samjhecht/wrangler/plugin install wrangler@samjhecht-pluginsThis skill inherits all available tools. When active, it can use any tool Claude has access to.
You are the root directory organization specialist. Your job is to identify markdown files that were created at the project root and route them to their appropriate locations based on content and purpose.
MANDATORY: When using this skill, announce it at the start with:
š§ Using Skill: organize-root-files | [brief purpose based on context]
Example:
š§ Using Skill: organize-root-files | [Provide context-specific example of what you're doing]
This creates an audit trail showing which skills were applied during the session.
Approach:
List all markdown files in project root:
find . -maxdepth 1 -name "*.md" -type f
Filter to organizational candidates:
RCA-*.md (Root cause analyses)ANALYSIS-*.mdIMPLEMENTATION-*.mdSUMMARY-*.mdNOTES-*.mdDESIGN-*.mdINVESTIGATION-*.mdREADME.mdCHANGELOG.mdLICENSE.mdCONTRIBUTING.mdCODE_OF_CONDUCT.mdRead each candidate file:
Output: List of files with preliminary categorization
For each file, determine:
Criteria:
Signs of obsolescence:
Action: Delete file
Criteria:
Signs it's a memo:
Action: Move to memos/ with date-prefixed name
Naming convention:
memos/YYYY-MM-DD-topic-slug.md
Examples:
RCA-AUTH-FAILURE.md ā memos/2025-11-17-auth-failure-rca.mdIMPLEMENTATION-SUMMARY-MCP.md ā memos/2024-10-29-mcp-integration-summary.mdNOTES-DEBUGGING-SESSION.md ā memos/2025-11-15-debugging-session-notes.mdCriteria:
Signs it's user documentation:
Action: Move to docs/ with lowercase-dash-separated name
Naming convention:
docs/lowercase-with-dashes.md
Examples:
USING-WORKFLOWS.md ā docs/using-workflows.mdAPI-GUIDE.md ā docs/api-guide.mdGETTING-STARTED.md ā docs/getting-started.mdCriteria:
Signs it's developer documentation:
Action: Move to devops/docs/ with lowercase-dash-separated name
Naming convention:
devops/docs/lowercase-with-dashes.md
Examples:
DEPLOYMENT-GUIDE.md ā devops/docs/deployment-guide.mdARCHITECTURE-DECISIONS.md ā devops/docs/architecture-decisions.mdCI-CD-SETUP.md ā devops/docs/ci-cd-setup.mdApproach:
Create directories if needed:
mkdir -p memos
mkdir -p devops/docs
# docs/ usually exists, but ensure it
mkdir -p docs
For each file, execute action:
Delete:
rm FILE.md
Move to memos:
# Extract or infer date
mv FILE.md memos/YYYY-MM-DD-topic.md
Move to docs:
# Convert to lowercase-dash format
mv FILE.md docs/lowercase-topic.md
Move to devops/docs:
mv FILE.md devops/docs/lowercase-topic.md
Track all actions for report
Output: Organized file structure
Generate organization report:
# Root Directory Organization Report
## Summary
Organized [N] markdown files from project root.
**Actions:**
- Deleted: [N] obsolete files
- Moved to memos/: [N] files
- Moved to docs/: [N] files
- Moved to devops/docs/: [N] files
## Detailed Actions
### Deleted (Obsolete)
- `RCA-INCORRECT-HYPOTHESIS.md` - Discarded analysis, superseded by correct RCA
- `TEMP-DEBUG-NOTES.md` - Temporary debugging session notes, issue resolved
### Moved to memos/
- `RCA-AUTH-FAILURE.md` ā `memos/2025-11-17-auth-failure-rca.md`
- Root cause analysis worth preserving for future reference
- `IMPLEMENTATION-SUMMARY-MCP.md` ā `memos/2024-10-29-mcp-integration-summary.md`
- Implementation summary documenting MCP integration decisions
- `INVESTIGATION-PERFORMANCE.md` ā `memos/2025-11-10-performance-investigation.md`
- Performance investigation findings and solutions
### Moved to docs/
- `USING-WORKFLOWS.md` ā `docs/using-workflows.md`
- User guide for workflow system
- `API-EXAMPLES.md` ā `docs/api-examples.md`
- API usage examples for end users
### Moved to devops/docs/
- `DEPLOYMENT-GUIDE.md` ā `devops/docs/deployment-guide.md`
- Deployment procedures for maintainers
- `ARCHITECTURE-DECISIONS.md` ā `devops/docs/architecture-decisions.md`
- ADR for internal design decisions
## Root Directory Status
**Before:** [N] markdown files (excluding standard files like README.md)
**After:** 0 organizational files remaining
**Preserved at root:**
- README.md
- CHANGELOG.md
- LICENSE.md
[etc.]
## Recommendations
- All analysis/documentation files now properly organized
- Root directory clean and maintainable
- Future files should follow guidelines in CLAUDE.md
---
*Generated by organize-root-files skill*
Use this decision tree:
Is the file relevant anymore?
Who is the audience?
What's the purpose?
Still unsure?
When moving to memos/, try to determine the date:
Check git history:
git log --follow --format=%aI -- FILE.md | tail -1
Check file modification time:
stat -f %Sm -t %Y-%m-%d FILE.md # macOS
stat -c %y FILE.md | cut -d' ' -f1 # Linux
Check content for date references:
Use today's date if unknown:
Never modify file content - only move and rename.
The goal is organization, not editing.
If truly ambiguous:
Always preserve these at root:
File: RCA-DATABASE-DEADLOCK.md
Content preview:
# Root Cause Analysis: Database Deadlock
## Issue
Production experienced deadlocks on 2024-08-15...
## Investigation
...detailed analysis...
## Solution
Implemented row-level locking instead of table locks...
## Lessons Learned
- Always use row-level locking for high-concurrency tables
- Monitor lock wait times
Decision: MEMOS
Action: Move to memos/2024-08-15-database-deadlock-rca.md
File: DEBUG-NOTES-TEMP.md
Content preview:
# Debug notes
Trying different approaches to fix auth bug...
Approach 1: didn't work
Approach 2: didn't work
Approach 3: FIXED IT! (moved to proper implementation)
Delete this file after confirming fix deployed.
Decision: DELETE
Action: Delete file
File: WORKFLOW-USAGE.md
Content preview:
# Using Wrangler Workflows
This guide shows you how to use workflows in your projects.
## Running Housekeeping
To clean up your project:
```bash
/wrangler:housekeeping
...
**Decision:** DOCS
- Teaching users how to use feature
- No internal details
- End-user focused
**Action:** Move to `docs/workflow-usage.md`
---
### Example 4: Deployment Procedure
**File:** `DEPLOY-PROCESS.md`
**Content preview:**
```markdown
# Deployment Process
Internal guide for deploying Wrangler updates.
## Prerequisites
- Access to npm registry
- GitHub deploy permissions
## Steps
1. Run tests: `npm test`
2. Build MCP server: `npm run build:mcp`
...
Decision: DEVOPS/DOCS
Action: Move to devops/docs/deploy-process.md
This skill is designed to be called as a subagent from the housekeeping workflow:
In housekeeping Phase 2, add as Agent D:
Agent D: Root Directory Organization
- Task: Clean up markdown files at project root
- Skill: organize-root-files
- Independence: Operates on root .md files only
This keeps root clean automatically during routine housekeeping.
ā All organizational candidate files identified ā Each file correctly categorized ā Files moved to appropriate directories with correct naming ā Obsolete files deleted ā Root directory clean (only standard files remain) ā Report generated documenting all actions
Improve date inference with:
Use more sophisticated analysis:
For ambiguous files:
Organize Root Files Skill v1.0
Master authentication and authorization patterns including JWT, OAuth2, session management, and RBAC to build secure, scalable access control systems. Use when implementing auth systems, securing APIs, or debugging security issues.