agentleFS
guhcostanguhcostan/claude-mega-brain/skills/migrate/SKILL.md

migrate

Skill128 starsChanged 4 days agoMITView on GitHub

Scan the project and migrate existing documentation into OKF format. Use when the user wants to populate the knowledge base from existing docs, README, schemas, API specs, runbooks, or any structured project knowledge. Trigger on "migrate to okf", "populate the knowledge base", "scan my docs", "convert docs to okf", "importar documentação", "migrar para okf", "popular o knowledge base", "lê meus docs e cria o okf", "generate okf from existing docs", or when the user points at a docs folder and asks to "put it in the knowledge base". If no OKF files exist yet, run /mega-brain:init before migrating.

  • Reads credentials

72 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use incident, scaffold and 9 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • JkudjoSkill

    incident

    Production incident response — structured triage, hypothesis tree, safe remediation, incident record

    Also in 5 projects that use this

  • BerryKuipersSkill

    scaffold

    Detect project stack, apply architecture patterns, wire quality gates, and scaffold features. Use when bootstrapping a project, adding a vertical slice, wiring CI/CD, adding Docker compose, or setting up quality gates.

    Also in 5 projects that use this

  • JohnJBorenSkill

    ci-cd

    CI/CD pipeline design, GitHub Actions, testing automation, and deployment strategies

    Also in 4 projects that use this

  • liatrio-labsSkill

    sdd

    Execute the Liatrio Spec-Driven Development (SDD) workflow when explicitly invoked by the user. NOTE: this skill is NOT intended to be dynamically loaded or automatically triggered; it should only ever be explicitly called by the user.

    Also in 4 projects that use this

  • drewdrewthisSkill

    sweep

    Search for similar patterns, anti-patterns, or issues elsewhere in the codebase after a fix or feature. Use after implementing a fix to catch the same bug in other places, or proactively to audit for a known pattern.

    Also in 3 projects that use this

  • MicrosoftSkill

    hotfix

    Proposes a scoped version bump for a roosterjs hotfix. Given one or more commits provided by the user, determines which packages had files changed by those commits, bumps the version only for the affected version groups, and creates a draft PR. Use when asked to do a hotfix, a scoped/targeted version bump, or to release only specific commits.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

6 rules. 0 are common, 1 is distinctive, and 5 are very specific to this project.

  • 0

    Common

    Most of the 58 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Look for existing OKF files: any .md with type: frontmatter, or index.md / log.md anywhere in the project.

    line 12
  2. Very specific:

    If .mega-brain.json defines dir, place new files under that directory.

    line 14
  3. Very specific:

    Add wikilinks Name when concepts reference each other

    line 72
  4. Very specific:

    Place files in tables/, apis/, metrics/, services/, runbooks/ as appropriate

    line 73
  5. Very specific:

    Add one line per new concept under the relevant section in the project's existing index.md (create one via /mega-brain:init if missing):

    line 77
  6. Distinctive:

    Test fixtures and mock data

    line 97

“Common” is measured: kept by at least 6 in 10 of the 58 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

migrate — Migrate Existing Docs to OKF

Reads existing project documentation and generates OKF concept files so claude-mega-brain can inject them at session start. The goal is exact fidelity — preserve real column names, actual formulas, and specific values, not generic descriptions.

Before starting

Look for existing OKF files: any .md with type: frontmatter, or index.md / log.md anywhere in the project. If none exist, run /mega-brain:init first.

If .mega-brain.json defines dir, place new files under that directory. Otherwise, put files wherever fits the project (docs/, project root, etc.) — no dedicated folder is required.

Process

1. Discover sources

Scan the project root. Priority order:

SourceLook for
API specsopenapi.yaml, swagger.json, *.openapi.yml
DB schemasschema.sql, schema.prisma, *.dbml, migration files
Data modelsmodels/, entities/, domain/
README sections## API, ## Schema, ## Architecture, ## Data
Runbooksdocs/runbook*, runbooks/, playbooks/
Env/config docs.env.example with comments, annotated config/ files
Existing wikisdocs/, wiki/, pages/

Report what you found before proceeding. If more than 10 sources, ask the user to confirm before generating all files.

2. Classify each source → OKF type

Source contentOKF type
DB table / Prisma modelTable or BigQuery Table
REST/GraphQL endpointAPI
Business metric / KPIMetric
Microservice / moduleService
Operational procedureRunbook
Business term / glossaryConcept
Data pipeline / ETLPipeline

3. Generate OKF files

One .md file per concept:

---
type: <classified type>
title: <name>
description: <one sentence, plain language>
resource: <source file path or URL>
tags: [<relevant tags>]
timestamp: <today ISO date>
---

# Schema / Definition

<exact content extracted from source — preserve all field names, types, values>

# Notes

<caveats, deprecations, gotchas found in the source>

Rules that matter:

  • One concept per file — split tables from each other, endpoints from each other
  • Preserve exact field names, column types, enum values, formulas — never generalize
  • Add wikilinks [Name](relative-path.md) when concepts reference each other
  • Place files in tables/, apis/, metrics/, services/, runbooks/ as appropriate

4. Update index.md

Add one line per new concept under the relevant section in the project's existing index.md (create one via /mega-brain:init if missing):

- [Title](subdir/file.md) — one-sentence description

5. Append to log.md

<today ISO date> — migrated <N> concepts from <source list>

6. Report

List every file created with its type and path. Flag anything ambiguous or skipped with a reason.

Tell the user to start a new Claude Code session for the injected context to activate.

What NOT to migrate

  • Test fixtures and mock data
  • Build artifacts and generated code
  • Duplicate docs — keep the most recent or canonical version
  • Files with no extractable schema, formula, or definition

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.