/SKILL.md
CortexFS Memory Skill - Persistent cognitive memory layer backed by CortexFS CLI. Allows saving, reading, searching knowledge and session states, scoped by project context. Includes automatic CLI installation and commands for OpenCode and Cursor. Todos los comandos son BASH/CLI que deben ejecutarse en la TERMINAL/SHELL.
npx skillsauth add aarcilam/cortexfs_agent_skill cortexfsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Version: 0.6.0
Execution: Shell/Bash
Auth: None
Cuando el skill se carga por primera vez, EL AGENTE DEBE ejecutar automáticamente estos comandos:
if ! command -v cortex &> /dev/null; then
npm install -g cortexfs-cli
cortex config "$HOME/.cortexfs/brain"
fi
Para OpenCode:
mkdir -p ~/.config/opencode/commands
cp -r ~/.agents/skills/cortexfs/opencode-commands/* ~/.config/opencode/commands/
Para Cursor:
mkdir -p ~/.cursor/commands
cp -r ~/.agents/skills/cortexfs/opencode-commands/* ~/.cursor/commands/
Verificación:
which cortex || echo "NO_INSTALLED"
Si no está instalado, ejecutar:
npm install -g cortexfs-cli
which cortex || cortex --versionnpm install -g cortexfs-cliEste skill actúa como la MEMORIA PERSISTENTE del proyecto. El agente DEBE seguir estas reglas de comportamiento:
Cuándo: SIEMPRE que el usuario pregunte algo sobre el proyecto, ANTES de responder o buscar en el código.
Acción:
cortex search "<términos relevantes de la pregunta>"cortex read para obtener el contenido completoEjemplos:
| Pregunta del usuario | Ejecutar primero |
|---------------------|------------------|
| "¿Cómo funciona la autenticación?" | cortex search 'autenticación auth login' |
| "¿Cuáles son las convenciones de código?" | cortex search 'convenciones código estilo' |
| "¿Qué decisiones de arquitectura tomamos?" | cortex search 'arquitectura decisiones' |
Por qué: CortexFS contiene conocimiento curado y decisiones previas. Buscar aquí PRIMERO evita repetir trabajo o contradecir decisiones.
Cuándo: Guardar AUTOMÁTICAMENTE cuando se descubra o defina:
Acción:
cortex save "<category>" "<id>" "<contenido JSON>"| Categoría | Usar para |
|-----------|-----------|
| arquitectura | Decisiones de diseño, patrones, estructura |
| convenciones | Reglas de código, estilo, naming |
| config | Configuraciones, variables de entorno, settings |
| api | Endpoints, contratos, schemas |
| bugs | Problemas encontrados y soluciones |
| flujos | Lógica de negocio, workflows, procesos |
| dependencias | Librerías importantes y su uso |
| memoria | Información general que recordar |
Cuándo: Al inicio de una nueva conversación o sesión.
Acción:
cortex load-statecortex listPor qué: Retomar contexto sin que el usuario tenga que repetir información.
Cuándo:
Acción: Ejecutar cortex save-state con JSON estructurado:
{
"task": "qué se estaba haciendo",
"status": "in_progress|blocked|review",
"progress": {
"completed": [],
"pending": [],
"blocked": []
},
"context": {
"files_modified": [],
"branch": ""
},
"next_steps": []
}
cortex configConfigura el directorio raíz del brain.
cortex config "<path>"
Ejemplo:
cortex config '/ruta/al/brain'
cortex saveGuarda conocimiento estructurado. SIEMPRE estructurar el contenido en JSON o Markdown.
cortex save "<category>" "<id>" "<content>"
Parámetros:
category: Categoría del conocimiento (ej: arquitectura, convenciones)id: Identificador semánticocontent: Contenido - DEBE ser JSON estructurado o Markdown organizadoEjemplo JSON:
cortex save 'agent' 'mi-agente' '{"name":"mi-agente","role":"asistente","capabilities":["buscar","analizar"]}'
Ejemplo Markdown:
cortex save 'project' 'readme' '# Proyecto\n\n## Descripción\nTexto aquí...'
cortex readLee conocimiento persistido.
cortex read "<category>" "<id>"
Ejemplo:
cortex read 'agent' 'mi-agente'
cortex updateActualiza conocimiento existente.
cortex update "<category>" "<id>" "<content>"
Ejemplo:
cortex update 'agent' 'mi-agente' 'nuevo contenido'
cortex deleteElimina conocimiento.
cortex delete "<category>" "<id>"
Ejemplo:
cortex delete 'agent' 'mi-agente'
cortex listLista conocimiento, opcionalmente filtrado por categoría.
cortex list [category]
Ejemplos:
cortex list # Lista todas las categorías
cortex list 'agent' # Lista entradas en categoría 'agent'
cortex searchBusca conocimiento por query.
cortex search "<query>"
Ejemplo:
cortex search 'mi búsqueda'
cortex save-stateGuarda el estado de la sesión. SIEMPRE usar formato estructurado para facilitar handoff.
cortex save-state "<summary>"
Formato recomendado JSON:
cortex save-state '{"task":"Implementar auth","status":"in_progress","progress":{"completed":["login"],"pending":["logout"]},"next_steps":["agregar tests"]}'
Alternativa compacta:
cortex save-state 'TASK: Auth OAuth2 | STATUS: in_progress | DONE: login | PENDING: logout | NEXT: tests'
cortex load-stateCarga el estado más reciente de la sesión.
cortex load-state
┌─────────────────────────────────────────────────────────┐
│ INICIO DE SESIÓN │
│ 1. cortex load-state → Recuperar contexto anterior │
│ 2. cortex list → Ver conocimiento disponible │
└─────────────────────────────────────────────────────────┘
↓
┌─────────────────────────────────────────────────────────┐
│ CUANDO EL USUARIO PREGUNTE ALGO │
│ 1. cortex search "..." → BUSCAR PRIMERO en memoria │
│ 2. cortex read "..." "..." → Leer detalles si existe │
│ 3. Luego buscar en código si es necesario │
└─────────────────────────────────────────────────────────┘
↓
┌─────────────────────────────────────────────────────────┐
│ CUANDO DESCUBRAS/DEFINAS ALGO IMPORTANTE │
│ → cortex save "categoria" "id" "{...JSON...}" │
│ │
│ Guardar: decisiones, convenciones, configs, APIs, │
│ bugs+soluciones, patrones, flujos de negocio │
└─────────────────────────────────────────────────────────┘
↓
┌─────────────────────────────────────────────────────────┐
│ FIN DE SESIÓN / TAREA COMPLETADA │
│ → cortex save-state "{...estado estructurado...}" │
└─────────────────────────────────────────────────────────┘
Usuario: "¿Cómo manejamos los errores en la API?"
# PASO 1: Buscar primero en CortexFS
cortex search "errores API manejo error handling"
# PASO 2: Si encuentra resultados, leer el contenido
cortex read "convenciones" "error-handling"
# PASO 3: Responder usando ese conocimiento + código si necesario
Después de definir cómo manejar errores:
cortex save "convenciones" "error-handling" '{
"topic": "Manejo de errores en API",
"rules": [
"Usar AppError para errores controlados",
"Logging con nivel según severidad",
"Respuestas estandarizadas con code y message"
],
"example": "throw new AppError(400, \"VALIDATION_ERROR\", \"Campo requerido\")",
"decided_on": "2024-01-15",
"reason": "Consistencia en respuestas de error"
}'
cortex son ejecutables BASH del sistematools
Use when work should span one or more detached tasks but still behave like one job with a single owner context. TaskFlow is the durable flow substrate under authoring layers like Lobster, ACPX, plugins, or plain code. Keep conditional logic in the caller; use TaskFlow for flow identity, child-task linkage, waiting state, revision-checked mutations, and user-facing emergence.
tools
# Lobster Lobster executes multi-step workflows with approval checkpoints. Use it when: - User wants a repeatable automation (triage, monitor, sync) - Actions need human approval before executing (send, post, delete) - Multiple tool calls should run as one deterministic operation ## When to use Lobster | User intent | Use Lobster? | | ------------------------------------------------------ | --------------------------
tools
# Lobster Lobster executes multi-step workflows with approval checkpoints. Use it when: - User wants a repeatable automation (triage, monitor, sync) - Actions need human approval before executing (send, post, delete) - Multiple tool calls should run as one deterministic operation ## When to use Lobster | User intent | Use Lobster? | | ------------------------------------------------------ | --------------------------
tools
A CLI tool for making authenticated requests to the X (Twitter) API. Use this skill when you need to post tweets, reply, quote, search, read posts, manage followers, send DMs, upload media, or interact with any X API v2 endpoint.