Skip to content
Back to skills

Mags Legacy

ASecurity

Initialize MAGS for an existing (brownfield/legacy) project

  • 3 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added May 26, 2026
developmentgobashapidatabasedocumentation

Works with

  • claude code
  • api
  • mcp

Security analysis

A100/100

Scanned May 27, 2026

npx -y skills add doancan/mags --skill mags-legacy --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Mags Legacy?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Mags Legacy
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/doancan-mags-legacy/badge)](https://www.skillsdirectory.com/skills/doancan-mags-legacy)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: mags-legacy
description: Initialize MAGS for an existing (brownfield/legacy) project
version: 1.0.0
user-invocable: true
allowed-tools:
  - mcp__mags_mags__mags_list_docs
  - mcp__mags_mags__mags_create_doc
  - mcp__mags_mags__mags_detect_stack
  - mcp__mags_mags__mags_discover_modules
  - mcp__mags_mags__mags_remember
  - mcp__mags_mags__mags_generate_claude_md
  - Bash
  - Read
  - Glob
  - Write
---

# MAGS Legacy Init

Initialize MAGS for an existing (brownfield/legacy) project that already has code but lacks documentation.

## Steps

### 1. Scan existing codebase

Use `mags_detect_stack` to detect the project's tech stack automatically.
Use `mags_discover_modules` to find existing modules in the code.

Report findings:
```
Detected Stack:
  Languages:    <detected>
  Frameworks:   <detected>
  Databases:    <detected>
  API Style:    <detected>

Discovered Modules:
  - <module> (confidence: <score>%)
  - ...
```

### 2. Gather legacy context from user

Ask the user these questions (all at once):
1. What is the migration goal? (modernize, rewrite, extend, maintain)
2. What are the main pain points in the current codebase?
3. Are there parts of the system that must be preserved as-is?
4. What is the target architecture? (keep current, monolith, microservices, serverless)

### 3. Create legacy documentation

Using `mags_create_doc`, create these documents from the legacy templates:
- `current-architecture` — Document the current architecture based on scan results
- `migration-plan` — Create a migration plan based on user goals
- `tech-debt` — Start a tech debt registry
- `target-architecture` — Document the target architecture

Also create standard docs:
- `tech-stack` — Based on detected stack
- `project-structure` — Based on discovered modules

### 4. Show summary

```
MAGS Legacy Init Complete

  Stack:         <detected stack summary>
  Modules:       <N> modules discovered

  Documents Created:
    - current-architecture.md
    - migration-plan.md
    - tech-debt.md
    - target-architecture.md
    - tech-stack.md
    - project-structure.md

Run /mags-status to see your project dashboard.
```

---

**Related commands:**
| Command | Description |
|---------|-------------|
| `/mags-init` | Initialize MAGS for a new project |
| `/mags-status` | View project progress dashboard |
| `/mags-setup` | Get Claude Code configuration recommendations |

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.