xiaohongshu
xiaohongshu
hidden-folder-audit
Audit and consolidate hidden folders in a repository. Identifies duplicates, dead directories, and consolidation opportunities for .agent-os/, .ai/, .claude/, and other hidden folders.
Full skill instructions
Systematic audit and consolidation of hidden (dot) folders in a repository. Identifies duplicate configurations, dead symlinks, orphaned directories, and consolidation opportunities to establish a clean, maintainable folder structure.
version: 1.2.0
python_min_version: '3.10'
dependencies: []
compatibility:
tested_python:
- '3.10'
- '3.11'
- '3.12'
- '3.13'
os:
- Windows
- Linux
- macOS
.agent-os/, .ai/, .claude/)List all hidden directories at the repository root.
# List all hidden directories (excluding .git)
find . -maxdepth 1 -type d -name ".*" ! -name ".git" | sort
# With sizes
du -sh .*/ 2>/dev/null | grep -v "^0" | sort -hr
# Include symlinks
find . -maxdepth 1 \( -type d -o -type l \) -name ".*" ! -name ".git" | sort
Determine which hidden folders are tracked, ignored, or untracked.
# Check if folder is tracked
git ls-files --error-unmatch .folder/ 2>/dev/null && echo "TRACKED" || echo "NOT TRACKED"
# Check if folder is ignored
git check-ignore -v .folder/ 2>/dev/null && echo "IGNORED" || echo "NOT IGNORED"
# List all tracked hidden files
git ls-files | grep "^\." | cut -d'/' -f1 | sort -u
# List all gitignored hidden folders
git status --porcelain --ignored | grep "^!!" | grep "^\./\." | cut -d'/' -f2 | sort -u
Check for duplicate or overlapping content between hidden folders.
# Compare agent configurations
diff -rq .agent-os/agents/ .claude/agents/ 2>/dev/null
# Find duplicate files by name
find .agent-os .ai .claude -name "*.md" -type f 2>/dev/null | xargs -I {} basename {} | sort | uniq -d
# Find duplicate files by content (MD5)
find .agent-os .ai .claude -type f 2>/dev/null | xargs md5sum 2>/dev/null | sort | uniq -w32 -d
# Compare directory structures
diff <(find .agent-os -type f | sed 's|.agent-os/||' | sort) \
<(find .claude -type f | sed 's|.claude/||' | sort) 2>/dev/null
Determine which folder should be the single source of truth.
Criteria for Authoritative Source:
# Check modification times
stat -c '%Y %n' .*/ 2>/dev/null | sort -rn | head -10
# Check for references in scripts and CI
grep -r "\.agent-os" --include="*.sh" --include="*.yml" --include="*.yaml" .
grep -r "\.claude" --include="*.sh" --include="*.yml" --include="*.yaml" .
# Check symlink targets
find . -maxdepth 2 -type l -exec ls -la {} \;
Create a migration plan based on analysis.
Migration Checklist:
Based on actual cleanup sessions, this table provides verified recommendations.
| Folder | Purpose | Action | Notes |
|---|---|---|---|
.claude/ | Claude Code configuration, agents, skills, docs | KEEP | Authoritative for AI tools |
.claude-flow/ | Runtime data, state, coordination | KEEP | Add to .gitignore |
.githooks/ | Git hooks | KEEP | Standard location |
.github/ | GitHub workflows, templates | KEEP | Required by GitHub |
.git/ | Git repository data | NEVER TOUCH | - |
.gitignore | Git ignore patterns | KEEP | Update as needed |
.vscode/ | VS Code settings | KEEP | Team settings if tracked |
.idea/ | JetBrains IDE settings | KEEP | Or add to .gitignore |
.env | Environment variables | KEEP | Must be in .gitignore |
.agent-os/ | Legacy agent OS configuration | CONSOLIDATE | Merge into .claude/ |
.ai/ | Legacy AI configuration | CONSOLIDATE | Merge into .claude/ |
.drcode/ | External tool (Dr. Code) config | DELETE | Legacy AI config, confirmed deletable |
.slash-commands/ | Command registry | CONSOLIDATE | Move to .claude/docs/commands/ |
.git-commands/ | Git helper scripts | CONSOLIDATE | Move to scripts/git/ |
.benchmarks/ | Benchmark data | DELETE | Usually empty, delete if so |
benchmarks/ | Benchmark data and reports | SPLIT | Move fixtures to tests/fixtures/, gitignore reports/results |
.agent-runtime/ | Dead symlinks, orphaned state | DELETE | After verifying dead links |
.common/ | Orphaned utilities | DELETE | Relocate useful scripts first |
.specify/ | Stale specification templates | DELETE | Migrate to specs/templates/ |
.pytest_cache/ | Pytest cache | DELETE | Regenerated automatically |
.ruff_cache/ | Ruff linter cache | DELETE | Regenerated automatically |
.mypy_cache/ | MyPy type checker cache | DELETE | Regenerated automatically |
.coordination/ | Multi-agent coordination | MIGRATE | Move to .claude-flow/ |
.session/ | Session state files | MIGRATE | Move to .claude-flow/ |
Some non-hidden directories follow similar cleanup/consolidation patterns.
Standard location for completed specification plans.
# Archive completed plans (check YAML frontmatter for status: completed)
mkdir -p specs/archive
git mv specs/modules/<completed-plan>.md specs/archive/
Benchmark directories typically contain mixed content requiring separation.
| Subdirectory | Content | Action |
|---|---|---|
legacy_projects/ | Reference test data (*.dat, *.csv) | Move to tests/fixtures/ |
reports/ | Timestamped HTML reports | Add to .gitignore |
results/ | Timestamped CSV/JSON | Add to .gitignore |
Root *.py files | Benchmark scripts | Keep tracked |
# Separate fixtures from generated outputs
mkdir -p tests/fixtures/orcaflex
git mv benchmarks/legacy_projects/* tests/fixtures/orcaflex/
git rm -r --cached benchmarks/reports benchmarks/results
echo "benchmarks/reports/" >> .gitignore
echo "benchmarks/results/" >> .gitignore
# Backup first
cp -r .agent-os .agent-os.backup
# Migrate agents
mkdir -p .claude/agents
cp -r .agent-os/agents/* .claude/agents/ 2>/dev/null
# Migrate standards (if applicable)
mkdir -p .claude/standards
cp -r .agent-os/standards/* .claude/standards/ 2>/dev/null
# Update git tracking
git rm -r --cached .agent-os/ 2>/dev/null
git add .claude/
# Remove old folder after verification
rm -rf .agent-os
rm -rf .agent-os.backup # After confirming migration
# Backup first
cp -r .ai .ai.backup
# Migrate prompts to skills
mkdir -p .claude/skills/prompts
cp -r .ai/prompts/* .claude/skills/prompts/ 2>/dev/null
# Migrate config
cp .ai/config.* .claude/ 2>/dev/null
# Cleanup
git rm -r --cached .ai/ 2>/dev/null
rm -rf .ai
# Find broken symlinks
find . -maxdepth 2 -type l ! -exec test -e {} \; -print
# Remove broken symlinks
find . -maxdepth 2 -type l ! -exec test -e {} \; -delete
# Remove specific dead symlink folder
rm -rf .agent-runtime
# Create standard runtime directory
mkdir -p .claude-flow/state
mkdir -p .claude-flow/cache
mkdir -p .claude-flow/logs
# Migrate coordination data
mv .coordination/* .claude-flow/state/ 2>/dev/null
mv .session/* .claude-flow/state/ 2>/dev/null
# Remove old directories
rm -rf .coordination .session
Add these patterns after consolidation:
# Runtime and state (not tracked)
.claude-flow/
.coordination/
.session/
# Legacy folders (prevent re-creation)
.agent-os/
.ai/
.agent-runtime/
# Cache directories
.pytest_cache/
.ruff_cache/
.mypy_cache/
__pycache__/
git status)git checkout -b backup/pre-hidden-auditls -la .*/ > hidden-folders-before.txtgit rm --cached, git add)Use these commands to verify the final state after audit and cleanup.
# List remaining hidden folders (should be minimal)
echo "=== Remaining Hidden Folders ==="
find . -maxdepth 1 -type d -name ".*" ! -name ".git" | sort
# Expected remaining folders:
# .claude/ - AI configuration (authoritative)
# .claude-flow/ - Runtime data (gitignored)
# .github/ - GitHub workflows
# .githooks/ - Git hooks
# .vscode/ - VS Code settings (if tracked)
# Verify no legacy folders remain
echo "=== Checking for Legacy Folders ==="
for dir in .agent-os .ai .drcode .slash-commands .git-commands .benchmarks .agent-runtime .common .specify; do
if [ -d "$dir" ]; then
echo "WARNING: $dir still exists!"
fi
done
echo "Check complete."
# Verify .claude/ structure
echo "=== .claude/ Structure ==="
ls -la .claude/
# Verify scripts/git/ exists if .git-commands was consolidated
echo "=== scripts/git/ ==="
ls -la scripts/git/ 2>/dev/null || echo "scripts/git/ does not exist"
# Verify .claude/docs/commands/ if .slash-commands was consolidated
echo "=== .claude/docs/commands/ ==="
ls -la .claude/docs/commands/ 2>/dev/null || echo ".claude/docs/commands/ does not exist"
# Verify specs/archive exists for completed plans
echo "=== specs/archive/ ==="
ls -la specs/archive/ 2>/dev/null || echo "specs/archive/ does not exist"
# Verify benchmark structure
echo "=== benchmarks/ Structure ==="
ls -la benchmarks/ 2>/dev/null || echo "benchmarks/ does not exist"
# Check for legacy_projects in benchmarks (should be moved)
if [ -d "benchmarks/legacy_projects" ]; then
echo "[WARN] benchmarks/legacy_projects/ should be moved to tests/fixtures/"
fi
# Check for untracked hidden folders
echo "=== Untracked Hidden Folders ==="
git status --porcelain | grep "^??" | grep "^\./\." || echo "None found"
# Verify .gitignore includes runtime folders
echo "=== .gitignore Hidden Folder Entries ==="
grep -E "^\.(claude-flow|coordination|session)" .gitignore || echo "No runtime folders in .gitignore"
# Count tracked files in .claude/
echo "=== .claude/ Tracked Files ==="
git ls-files .claude/ | wc -l
# Run all verification checks
echo "=== Final State Verification ==="
# 1. Only expected hidden folders exist
hidden_count=$(find . -maxdepth 1 -type d -name ".*" ! -name ".git" ! -name ".claude" ! -name ".claude-flow" ! -name ".github" ! -name ".githooks" ! -name ".vscode" | wc -l)
if [ "$hidden_count" -eq 0 ]; then
echo "[OK] No unexpected hidden folders"
else
echo "[WARN] $hidden_count unexpected hidden folders found"
fi
# 2. Legacy folders are gone
legacy_count=0
for dir in .agent-os .ai .drcode .slash-commands .git-commands .benchmarks; do
[ -d "$dir" ] && legacy_count=$((legacy_count + 1))
done
if [ "$legacy_count" -eq 0 ]; then
echo "[OK] All legacy folders removed"
else
echo "[WARN] $legacy_count legacy folders remain"
fi
# 3. .claude/ has expected subdirectories
for subdir in agents docs skills; do
if [ -d ".claude/$subdir" ]; then
echo "[OK] .claude/$subdir exists"
else
echo "[WARN] .claude/$subdir missing"
fi
done
# 4. Git working directory is clean
if git diff --quiet 2>/dev/null; then
echo "[OK] Git working directory is clean"
else
echo "[INFO] Git has uncommitted changes"
fi
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience