/cortex:logfrom cortex
Write up the current session into the cortex - a session page plus any decisions, lessons, insights, how-tos, people, organisations and follow-ups it produced - then check, build and back up. Use when the person says "log this", "log it", "log the session", "save this", "write this up", "record this", or answers yes when the end-of-session reminder asks to log.
Ships in cortex. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Turn what happened in this conversation into pages in the cortex, so the next session starts from it. Plain words throughout; the person does not see commands unless they ask.
~/.cortex/config.json -> vault. If missing, say "Your cortex isn't set up yet - say 'set up my cortex'." and stop.CLAUDE_CODE_SESSION_ID. State folder: ~/.cortex/sessions/<session_id>/.kit.yaml (areas, collections, teach).Decide the area and thing (project, site, pilot...) from the conversation. If it is clear, say which in one line. If unclear, ask one question with choices from existing folders (ls <area>/<collection>/).
If the thing does not exist yet, ask: "This looks new. Shall I create under / ?" On yes, create <area>/<collection>/<slug>/_index.md with cortex.py new thing ... output. A session can touch more than one thing; log each in its own folder.
Go through this list and decide for each one. Say the result for each in your own working notes; tell the person only the ones that produce pages.
| Type | Ask yourself |
|---|---|
| session | Always one page: what we set out to do, what was done and how, what is still open. |
| decision | Was anything decided? Each decision gets its own page with the why, what was rejected, and when to reopen. A decision that only lives inside a session page is not captured - nobody will find it there later. |
| lesson | Did something go wrong or nearly go wrong? Cause and how to avoid it. |
| insight | Did we learn something non-obvious? |
| how-to | Did we work out a repeatable way of doing something? |
| person | Go through every person named in the session who said, owns, presented, wrote or decided something. Each gets a people/<slug>.md (create it) or a dated line on their existing page. A name in passing (an author in a source list) does not need a page. |
| organisation | Same for every organisation that acts in the session (a partner, a standards body whose framework you used, a client). |
| follow-ups | Any promise made between the person and someone else? Write follow-up lines (format below) in the session page and on the other person's page. |
| to-dos | Anything the person still has to do themselves (rehearse, check a number, save a file)? Write it as a to-do line with @me. |
If something already has a page (a decision being changed, a person already known), update that page with a dated line instead of creating a duplicate. If a decision replaces an older one, set the old one status: superseded and superseded_by: <new id>.
Line formats:
- [ ] @alex-rivera send the roadmap doc (due 2026-10-15) (added 2026-10-08) {theirs}
- [ ] @alex-rivera confirm the pilot dates (due 2026-10-20) (added 2026-10-08) {mine}
- [ ] @me rehearse the talk with a timer (due 2026-10-26) (added 2026-10-08) {mine}
{mine} = the person owes it; {theirs} = someone owes it to them. @me = the person's own to-do, never a promise to themselves under their own name. Every new line gets (added <today>) (today from date +%F), so the board knows how long it has been open. Close done ones as - [x] with (done <today>). Leave existing lines as they are.
For each page, get the correct path, id and frontmatter from the script, never by guessing:
python3 ~/.cortex/engine/scripts/cortex.py new <type> --area <area> [--thing <thing>] --title "<title>"
Write the page at the path it prints, keeping its frontmatter and filling the body. A session page's frontmatter may carry chat_id: (the script fills it from this session). Keep it: it is how the kit knows this session is logged. Today's date from date +%F (local time). Use [[id]] style links in the body only for pages that exist; also list them in links:.
Session page body sections: What we set out to do, What was done, Decisions (one line each, linking the decision pages), Open / next (follow-up lines).
Edit <thing>/_index.md: refresh "Current state" (2-4 lines), "Open items", and add the session to "Recent sessions" (newest first). Bump updated:.
python3 ~/.cortex/engine/scripts/cortex.py check <every page you wrote or changed>
python3 ~/.cortex/engine/scripts/cortex.py build
If either reports errors, fix the pages and run again. Do not continue past an error. Do not tell the person it is saved until build passes.
~/.cortex/sessions/<session_id>/written.txt that are inside the vault, plus _cortex/ generated files and home.md. Never rely on written.txt alone: it is empty when the work happened where the hooks do not run (a Claude chat or project), and then nothing would be saved.git -C <vault> add -- <each file by name> then git -C <vault> commit -m "log: <date> <thing> - <short title>". Never git add . or -A (another chat may be working in the same vault).python3 ~/.cortex/engine/scripts/cortex.py backup to push. If the push fails (offline, sign-in), say: "Saved on your Mac; the online copy will catch up at the next backup."touch ~/.cortex/sessions/<session_id>/logged.List what was written, one line each, grouped: "Session page, 1 decision (quarterly reports move to the portal), 1 new person (Sam Lee), 2 follow-ups." Then the teaching note.
Pick the one that fits what was written, 1-2 sentences, for example:
If teach: short in kit.yaml, one short line: "Logged - 1 decision, 2 follow-ups."
If the person says "skip" or "nothing worth keeping", touch the logged flag and say "OK, not logged." Never argue.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
16 skills in this plugin
/boardOpen the person's board and inbox in the browser - their to-dos and follow-ups in columns (Overdue, This week, Later, In progress, Waiting on others, Done) and the notes waiting to be filed. Use when the person says "show my board", "open my board", "my board", "open the inbox", "show me the overdue ones on the board", or the card says "say 'show my board'"./build-skillBuild an improvement the person approved - a new skill, a standing rule, a page template, a scheduled job, or an automatic action - grounded in their real examples and started on a 30-day trial. Use after a "yes" to a Suggest proposal, or when the person says "make this a skill", "turn this into a skill", "automate this", "always do this from now on", "make a template for this", or "do this every Friday"./npx claudepluginhub thehimanshushukla/personal-cortex --plugin cortex