---
name: create-user-profile-from-sources
description: Create a consolidated user profile markdown file from multiple source documents and persist key facts to Hermes memory.
version: 1.0.0
author: Hermes Agent
category: productivity
---
# Skill: Create User Profile from Multiple Sources

Use this skill when you have received several documents containing user preferences, business info, technical stack, etc., and you need to produce a single, structured profile file for the user while also saving salient facts to persistent memory.

## When to Use
- User has shared multiple notes, configs, or exported knowledge bases (e.g., USER.md, SETTINGS.md, memory dumps).
- You need to synthesize a quick-reference profile for ongoing collaboration.
- You want to bootstrap Hermes memory with user‑specific facts so future sessions start informed.

## Prerequisites
- The user has provided the source files via chat attachment or they are accessible in the current workspace.
- You have enabled the `file`, `memory`, and `write_file` tools.

## Steps

1. **Collect Sources**  
   List all provided documents. Accepted formats: `.md`, `.txt`, `.docx`, `.pdf`.  
   If the user pastes content directly, treat it as a source.

2. **Extract Key Sections**  
   Scan each source for the following categories (use headings or keywords as hints):
   - **Личные данные / Personal Info** – name, aliases, timezone, language, education, experience, family, health.
   - **Бизнес‑контекст** – company name, product/offer, funnel, pricing, fleet, current priorities, active projects.
   - **Технический стек** – IDE, machine, deployment, storage, bots, LLM providers, APIs, language.
   - **Стиль работы** – preferred workflow (MVP, architecture‑first, free‑until‑proven), work patterns (bursts, weekends off).
   - **Коммуникация** – desired format (max N points, use of emojis, disagreement phrasing, requirement for “давай” before actions).
   - **Запреты / Prohibitions** – hard rules the user insists on (e.g., no code without plan, never suggest paid if free exists).
   - **Триггеры для остановки** – signals that should make you pause or ask for clarification.
   - **Приоритеты** – ordered list or traffic‑light system, with note that only the user can change them via explicit command.
   - **Экосистема ботов / Related Agents** – list of bots, their roles, status, notes for improvement.

   For each fact you extract, formulate a short, declarative sentence suitable for memory storage (see step 3).

3. **Persist to Memory**  
   For each extracted fact, call the `memory` tool:
   ```
   memory(action='add', target='user' or 'memory', content='<fact>')
   ```
   - Use `target='user'` for personal preferences, communication style, hard prohibitions, and priorities.
   - Use `target='memory'` for business facts, technical details, bot ecosystem, and contextual notes.
   - Keep each entry under ~200 characters to avoid bloating the store.
   - If a fact already exists (similar wording), skip or replace with `action='replace'` using a unique substring.

   **Example** (user prefers brief replies):
   ```
   memory(action='add', target='user', content='User prefers concise responses, max 5 bullet points.')
   ```

4. **Build the Consolidated Markdown Profile**  
   Create a file named `<first_name>_<last_name>_PROFILE.md` (or a name the user suggests).  
   Use the following template, filling in sections with the extracted information.  
   If a section has no data, omit it or write “Не указано”.

   ```markdown
   # <Имя> (<Позывные>) — Профиль для AI‑агента

   ## 👤 Личные данные
   - **Имя:** ...
   - **Позывные:** ...
   - **Часовой пояс:** ...
   - **Язык:** ...
   - **Образование:** ...
   - **Опыт:** ...
   - **Семья:** ...
   - **Здоровье:** ...

   ## 💼 Бизнес: <Название>
   - **Тип:** ...
   - **База:** ...
   - **Сезон:** ...
   - **Сайт:** ...
   - **Флот:** ...
   - **Цены:** ...
   - **Воронка:** ...
   - **Цель:** ...
   - **Текущие приоритеты (светофор):**  
     🔴 ...  
     🟡 ...  
     🟢 ...  
     ⚫ ...

   ## ⚙️ Технический стек
   - **Среда:** ...
   - **Машина:** ...
   - **Деплой:** ...
   - **Хранение:** ...
   - **Боты:** ...
   - **LLM‑провайдеры:** ...
   - **Язык:** ...
   - **API:** ...

   ## 💡 Стиль работы и коммуникации
   ### Ключевые принципы
   - ...
   ### Коммуникация
   - ...
   ### Формат несогласия
   - Идея плохая: "..."
   - Уход от приоритетов: "..."
   - Правка работающего: "..."
   - Не услышал: "..."
   - Настаивание на ошибке: "..."
   ### Жёсткие запреты
   1. ...
   2. ...
   ...
   ### Триггеры для остановки
   - 🔴 ...
   - 🟡 ...
   ```

   ## 📱 Экосистема ботов <Название>
   | Бот | Роль | Статус | Примечания |
   |-----|------|--------|------------|
   | ... | ...  | ...    | ...        |

   ## 🧠 Принципы организации знаний
   - ...

   *Актуально на: <дата>*  
   *Источник: перечень использованных документов*
   ```

5. **Save and Return**  
   Write the file with `write_file(path='<filename>.md', content=<markdown>)`.  
   Then reply to the user with the file attached (`MEDIA:/<absolute/path>`) and a brief summary of what was stored in memory.

## Verification
- After writing the file, optionally read back the first few lines with `read_file` to ensure correct encoding.
- Confirm that the user sees the attached file and can confirm it matches their expectations.

## Pitfalls & Tips
- **Memory limits:** Hermes memory has a size cap; favor concise, high‑value facts. Omit trivial details.
- **Duplicate detection:** Before adding a memory entry, you may `session_search` for similar phrasing to avoid redundancy.
- **User‑driven priorities:** Never infer or change the priority order yourself; only act on explicit `новый приоритет [X]` commands from the user.
- **Formatting:** Preserve the user’s preferred tone (Russian, emojis, structured) in the generated profile.
- **Iterative refinement:** If the user provides feedback on the profile, treat it as new source material and repeat the skill to update.

## Example Invocation
User pastes three text files: `notes.md`, `business.txt`, `technical.pdf`.  
You run this skill, which:
1. Reads each file.
2. Pulls out Valentin’s personal data, Atlantic Sail details, stack, etc.
3. Saves ~20 memory entries.
4. Outputs `VALENTIN_KONSTANTINOV_PROFILE.md`.
5. Sends the file back with a note: “Profile created and key facts stored in memory.”

---