agentsclimarketplace

Refactor

Skill rulebased-io/claude-plugin/packages/second-brain/skills/refactor

Claude Code plugins by rulebased.io — harness audit/init/recommend + second-brain capture/connect/review/organize

Install
npx -y skills add rulebased-io/claude-plugin --skill refactor

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Split large notes into atomic pieces or merge small related notes. Update all wiki-links after restructuring. Use when notes have grown too large or are too fragmented.

SKILL.md

2.9 KB, as published. Nobody here has run it

Reshape notes to maintain atomic note principles.

When to Use

  • A note has grown too large (500+ lines)
  • Multiple small notes cover the same topic
  • Moving notes between folders
  • Reorganizing after a connect or organize session
  • /rulebased-second-brain:refactor invoked

Procedure

Read AGENTS.md Structure table for folder locations and system/conventions.md for frontmatter rules before proceeding.

Mode 1: Split a Large Note

  1. Read the target note fully.
  2. Identify natural split points: separate topics, distinct h2/h3 sections, different content types
  3. Propose split plan:
    Split "system-design-notes.md" (450 lines) into:
    1. load-balancing.md — lines 1-120
    2. database-sharding.md — lines 121-280
    3. caching-layers.md — lines 281-400
    4. system-design-overview.md — lines 401-450 (MOC)
    Proceed? [yes / adjust / cancel]
    
  4. Execute split:
    • Create each new note with frontmatter per system/conventions.md
    • Inherit tags from the original
    • created = original's created, updated = now
    • Add cross-links between all split notes via related field
    • Create a summary/MOC note if 3+ pieces
  5. Update references: find all [[wiki-links]] to original → update to most relevant split note
  6. Handle original: move to archives/ with redirect note

Mode 2: Merge Small Notes

  1. Identify merge candidates (or accept user selection):
    • Overlapping tags AND similar titles
    • Notes < 20 lines that reference each other
    • Multiple inbox items on the same topic
  2. Propose merge plan and get approval
  3. Execute merge:
    • Choose the most complete note as target
    • Append content under clear section headers
    • Combine tags (deduplicate)
    • Update updated timestamp
  4. Update references: redirect all links from merged-away notes to target
  5. Archive merged-away notes with redirect marker

Mode 3: Move / Promote

Read AGENTS.md to determine valid destination folders. Common moves:

  • inbox/ → content folder (promote from capture to organized)
  • Any folder → archives/ (archive inactive content)
  • Between content folders (reclassify)

Update all references, related fields, and frontmatter after move.

Rules

  • Never lose content during refactoring. Every line from original must appear in result.
  • Always update [[wiki-links]] across the entire brain after any move/split/merge.
  • Archive originals instead of deleting them.
  • Show a clear before/after plan and get user approval before executing.
  • Preserve original created dates. Only update updated.
  • If a split creates a note < 10 lines, warn that it might be too small.
  • Use folder paths from AGENTS.md, not hardcoded paths.

$ARGUMENTS

Gives 0 of the 12 instructions most refactoring skills give

Counted across 521 of the 525 authors here whose files we hold, read 2026-08-06

  • run tests after each changein 59 of 521, across 56 files
  • write tests before refactoringin 27 of 521, across 24 files
  • preserve external behaviorin 26 of 521, across 22 files
  • remove dead codein 25 of 521, across 24 files
  • make small incremental changesin 20 of 521, across 17 files
  • break the implementation into tiny commitsin 18 of 521, across 5 files
  • ask the user about alternative optionsin 17 of 521, across 4 files
  • create a GitHub issue with the planin 17 of 521, across 4 files
  • explore the repository to verify assertionsin 17 of 521, across 4 files
  • interview the user about the refactorin 16 of 521, across 3 files
  • check the codebase for test coveragein 16 of 521, across 3 files
  • refactor one thing at a timein 16 of 521, across 12 files

Said here and by no other author read

  • Reshape notes to maintain atomic note principles
  • Read conventions files before proceeding
  • Propose a restructuring plan before executing
  • Create each new note with frontmatter
  • Inherit tags from the original note
  • Create a summary note for splits of 3+ pieces

Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.