repo-librarian

repo-librarian

Repository cleanup, documentation management, and markdown reorganization. Use this skill when the repo feels cluttered, documentation is scattered, or after major version upgrades. Handles dead code elimination, legacy artifact removal, and documentation indexing.

0étoiles
0forks
Mis à jour 1/17/2026
SKILL.md
readonlyread-only
name
repo-librarian
description

Repository cleanup, documentation management, and markdown reorganization. Use this skill when the repo feels cluttered, documentation is scattered, or after major version upgrades. Handles dead code elimination, legacy artifact removal, and documentation indexing.

Repository Librarian

Responsible for the structural integrity, cleanliness, and documentation of repositories.

When This Skill Activates

  • Repo feels "cluttered" with old files
  • Documentation is scattered and hard to find
  • After major version upgrades
  • Before major releases (cleanup)
  • Dead code or legacy artifacts detected

Responsibilities

1. Repository Cleaning

  • Dead Code Elimination: Identify and remove unused functions, variables, and imports
  • Legacy Artifact Removal: Delete or archive files no longer part of current architecture
  • Redundant Component Purging: Consolidate multiple implementations of same feature

2. Documentation Management

  • Code Documentation: Maintain function/method docs and type annotations
  • Knowledge Files: Keep KNOWLEDGE.md, GUIDE.md in sync with code
  • ADR Maintenance: Ensure DECISIONS.md reflects recent architectural choices

3. Markdown Reorganization

  • Audit & Reorganize: Periodically review all .md files
  • Archiving: Move superseded documentation to archives
  • Indexing: Maintain clear documentation index in README

Workflow: Markdown Reorganization

  1. Inventory: List all .md files
  2. Read & Categorize: Determine status (Active, Superseded, Research, Spec)
  3. Analyze Redundancy: Identify overlapping content
  4. Propose Structure: Draft new directory structure
  5. Execute: Move files, update internal links, update index

Operating Principles

  • Alpha Mode: Prioritize speed and clarity. Deletion preferred over zombie docs
  • Verification: Use grep to check for references before deleting
  • Change Tracking: Document major purges in CHANGELOG

Cleanup Actions

When cleaning up, follow this order:

  1. Identify - List what needs cleanup
  2. Verify unused - Confirm no code depends on it
  3. Archive if valuable - Move to .archive/ if historically important
  4. Delete if not - Remove outright if truly obsolete
  5. Update imports - Fix any broken references
  6. Test - Ensure nothing broke

Quick Commands

# Find all markdown files
find . -name "*.md" -type f | grep -v node_modules

# Find large commented blocks
grep -rn "^//" --include="*.sol" --include="*.ts" | wc -l

# Check for stale imports
npx depcheck

# Find TODO/FIXME
grep -rn "TODO\|FIXME" --include="*.sol" --include="*.ts"

Anti-Patterns

  • Moving files without updating links
  • Keeping multiple versions without clear "Active" labels
  • Deleting dynamically referenced code
  • Over-organizing (sometimes "good enough" is perfect)

You Might Also Like

Related Skills

update-docs

update-docs

137Kdev-docs

This skill should be used when the user asks to "update documentation for my changes", "check docs for this PR", "what docs need updating", "sync docs with code", "scaffold docs for this feature", "document this feature", "review docs completeness", "add docs for this change", "what documentation is affected", "docs impact", or mentions "docs/", "docs/01-app", "docs/02-pages", "MDX", "documentation update", "API reference", ".mdx files". Provides guided workflow for updating Next.js documentation based on code changes.

vercel avatarvercel
Obtenir
docstring

docstring

97Kdev-docs

Write docstrings for PyTorch functions and methods following PyTorch conventions. Use when writing or updating docstrings in PyTorch code.

pytorch avatarpytorch
Obtenir
docs-writer

docs-writer

94Kdev-docs

Always use this skill when the task involves writing, reviewing, or editing files in the `/docs` directory or any `.md` files in the repository.

google-gemini avatargoogle-gemini
Obtenir
write-concept

write-concept

66Kdev-docs

Write or review JavaScript concept documentation pages for the 33 JavaScript Concepts project, following strict structure and quality guidelines

leonardomso avatarleonardomso
Obtenir
resource-curator

resource-curator

66Kdev-docs

Find, evaluate, and maintain high-quality external resources for JavaScript concept documentation, including auditing for broken and outdated links

leonardomso avatarleonardomso
Obtenir
doc-coauthoring

doc-coauthoring

47Kdev-docs

Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision docs, or similar structured content. This workflow helps users efficiently transfer context, refine content through iteration, and verify the doc works for readers. Trigger when user mentions writing docs, creating proposals, drafting specs, or similar documentation tasks.

anthropics avataranthropics
Obtenir