Analyze the current project and save comprehensive context as Cortex memories.
From cortexnpx claudepluginhub jsvitolo/cortex-plugins --plugin cortexThis skill uses the workspace's default tool permissions.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Enables AI agents to execute x402 payments with per-task budgets, spending controls, and non-custodial wallets via MCP tools. Use when agents pay for APIs, services, or other agents.
Analyze the current project and save comprehensive context as Cortex memories.
$ARGUMENTS
--refresh: Update existing memories instead of creating new ones--only <type>: Analyze only specific aspect (stack, architecture, database, testing)--dry-run: Show what would be saved without actually savingAnalyze this project and generate memories for each aspect below. Use the tools available to explore the codebase.
Check for these files to identify the stack:
| File | Stack |
|---|---|
go.mod | Go |
mix.exs | Elixir |
package.json | Node.js |
requirements.txt / pyproject.toml | Python |
Cargo.toml | Rust |
Gemfile | Ruby |
implementation:project:stack)Gather:
Save as:
mcp__cortex__memory(action="save",
type="implementation",
title="project:stack",
content="..."
)
architecture:project:structure)Gather:
Save as:
mcp__cortex__memory(action="save",
type="architecture",
title="project:structure",
content="..."
)
implementation:project:database)If database exists, gather:
Detection by stack:
priv/repo/migrations/, lib/**/schemas/gorm: tagsprisma/schema.prisma**/entities/*.tsdb/schema.rb*/models.py.db filesSave as:
mcp__cortex__memory(action="save",
type="implementation",
title="project:database",
content="..."
)
testing:project:testing)Gather:
Save as:
mcp__cortex__memory(action="save",
type="testing",
title="project:testing",
content="..."
)
context:project:overview)Create a summary with:
Save as:
mcp__cortex__memory(action="save",
type="context",
title="project:overview",
content="..."
)
# Stack: [Language] [Version]
## Framework
[Framework name and version]
## Package Manager
[npm/go mod/mix/pip/cargo]
## Key Dependencies
- [dep1]: [purpose]
- [dep2]: [purpose]
...
## Build Commands
- Build: `[command]`
- Run: `[command]`
- Install deps: `[command]`
# Architecture: [Pattern Name]
## Directory Structure
[tree output, 2-3 levels]
## Layers/Modules
- [layer1]: [purpose]
- [layer2]: [purpose]
## Entry Points
- [file]: [description]
# Database: [Type] + [ORM]
## Connection
- Config: [file path]
- Repo/Connection: [module/class name]
## Schema Overview ([N] tables)
### [Entity Group 1]
- table1 (field1, field2, field3)
- FK: field_id -> other_table
- table2 (...)
### [Entity Group 2]
...
## Relationships
[ASCII diagram or description]
## Key Indexes
- table.field (unique/index)
...
## Commands
- Migrate: `[command]`
- Rollback: `[command]`
- Create migration: `[command]`
# Testing: [Framework]
## Location
- Tests: [path pattern]
- Fixtures: [path]
- Mocks: [path or approach]
## Commands
- Run all: `[command]`
- Run single: `[command]`
- With coverage: `[command]`
## CI/CD
- Platform: [GitHub Actions/GitLab CI/etc]
- Config: [file path]
# [Project Name]
[One paragraph description]
## Stack
- Language: [lang] [version]
- Framework: [framework]
- Database: [db]
## Quick Start
```bash
[clone]
[install]
[run]
[cmd1]: [description][cmd2]: [description]
### Step 4: Output
After saving memories, show:
π Analisando projeto...
π Detectado: Linguagem: [lang] [version] Framework: [framework] Banco: [database]
πΎ MemΓ³rias salvas: β context:project:overview β architecture:project:structure β implementation:project:stack β implementation:project:database (se existir) β testing:project:testing
π Onboarding completo! O Claude Code agora conhece seu projeto.
Dica: Use "cx memory search 'como testar'" para verificar.
### Step 5: Handle Flags
**If `--refresh`:**
- Check existing memories with `mcp__cortex__memory(action="list")`
- Update content instead of creating duplicates
**If `--only <type>`:**
- Only analyze and save the specified aspect
- Valid types: stack, architecture, database, testing, overview
**If `--dry-run`:**
- Show what would be saved
- Do NOT call `mcp__cortex__memory(action="save")`
- Format output as preview
## Notes
- Be thorough but concise in memory content
- Focus on information useful for coding tasks
- Include actual file paths and commands
- For database, prioritize understanding relationships
- Adapt to the specific stack found