# Journal

> Log today's work by reconstructing it from git history across all your repos. Use at the end of a day to record what was done, optionally split by work vs personal.

- **Type:** Skill
- **Install:** `agentstack add skill-adrianfernandezalv-skills-journal`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [adrianfernandezalv](https://agentstack.voostack.com/s/adrianfernandezalv)
- **Installs:** 0
- **Category:** [Developer Tools](https://agentstack.voostack.com/c/developer-tools)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [adrianfernandezalv](https://github.com/adrianfernandezalv)
- **Source:** https://github.com/adrianfernandezalv/skills/tree/main/skills/productivity/journal

## Install

```sh
agentstack add skill-adrianfernandezalv-skills-journal
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

Reconstruct today's work from **git history** (not session context) and write it to the journal. Run it at the end of the day; re-running regenerates today's entry idempotently.

## Config

Read from `~/.claude/CLAUDE.md`:

- **`journal-backend`** — `obsidian` (default) | `inkdrop`.
- **`journal-path`** — where journal files live (for `obsidian`).
- **`journal-roots`** — comma-separated directories to scan for git repos (where you keep your projects). Defaults to `~` if unset.
- **`journal-emails`** — comma-separated list of ALL your git author emails (every identity you commit with). Used to attribute commits across repos that may be configured with different `user.email`.
- **`journal-work-hosts`** — optional comma-separated remote-host substrings that mark a repo as work (e.g. your company's git host). Repos whose `origin` matches go under a **Work** section; everything else under **Personal**. If unset, no split — all repos go under one list.

If `journal-backend` is missing, ask the user once and offer to write the keys. If it names an unsupported backend, stop: `journal-backend  not supported; supported: obsidian, inkdrop`. If `journal-emails` is missing, fall back to each repo's `git config user.email` and warn that cross-identity commits may be missed.

## Reconstruct the day

1. Find repos: for each directory in `journal-roots`, run `find  -maxdepth 4 -type d -name .git` and take each parent as the repo root. Depth 4 catches both top-level repos (`.git` at depth 2) and repos nested two levels under a root. Exclude the vault repo itself (the git root containing `journal-path`) to avoid logging the journal's own commits.
2. For each repo, collect today's commits across **all branches** (not just HEAD) authored by any of your emails:
   ```bash
   git -C "$repo" log --all --since="00:00" --no-merges \
     --pretty=format:'%h%x09%ae%x09%s'
   ```
   Keep only lines whose author email (2nd field) is in `journal-emails`; drop the rest (others' commits). `--all` is essential: work is often done on per-ticket feature branches, so the checked-out branch (often `master`/`main`) may not contain today's commits. Skip repos with no matching commits.
3. If `journal-work-hosts` is set, classify each repo by its `origin` remote host:
   ```bash
   git -C "$repo" remote get-url origin
   ```
   - host matches an entry in `journal-work-hosts` → **Work**
   - otherwise → **Personal**

   If `journal-work-hosts` is unset, skip the split and list all repos under one section.
4. For each repo with commits, synthesize a 1-line summary from that day's commit subjects (derivable from the commits — no session context needed).

## Build the entry

```markdown
# YYYY-MM-DD

## Work
### 
> 
-  (``)

## Personal
### 
> 
-  (``)
```

- Omit a section entirely if it has no commits. With no `journal-work-hosts`, drop the section headers and list repos directly under the date.
- No `Prompt` or `Difficulties` fields — they are not derivable from git.
- If the user passed an argument, append it under a `## Notes` section.

## Write

### obsidian (default)

1. Write the entry to `/.md`, **overwriting** any existing file for today (the reconstruction is the full day, so regeneration is idempotent).
2. Commit it in the vault so the entries are versioned:
   ```bash
   git -C "" add "/.md"
   git -C "" commit -m "journal: " >/dev/null 2>&1 || true
   ```
   (`` is the git root containing `journal-path`.)

### inkdrop

Find or create today's note (`YYYY-MM-DD`) in the `Journal` notebook (`list-notebooks`). Write the reconstructed entry. Status `none`.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [adrianfernandezalv](https://github.com/adrianfernandezalv)
- **Source:** [adrianfernandezalv/skills](https://github.com/adrianfernandezalv/skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-adrianfernandezalv-skills-journal
- Seller: https://agentstack.voostack.com/s/adrianfernandezalv
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
