agentleFS
ggembaggemba/squad-mcp/skills/enable-journaling/SKILL.md

enable-journaling

Skill4 starsChanged 6 months agoApache-2.0View on GitHub

Opt-in setup for auto-journaling capture plumbing. Copies bundled PostToolUse hook scripts into .squad/hooks/ and prints the .claude/settings.json snippet to wire them up. Capture-only — squad behaviour does NOT change until a follow-up release adds distillation + retrieval. Triggers: "enable journaling", "turn on auto-journaling", "set up the work-trail hook", "capture tool calls", "opt in to journal", "/squad:enable-journaling". One-shot setup — no args, no flags.

  • Commits and pushes

The file

We split this skill into the rules it gives an agent

8 rules. About 0 are common, 3 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Explicit consent before any copy: Before copying files into .squad/hooks/, confirm with the user in plain language what will be written and …

    line 31
  2. Distinctive:

    No git commit, no git push: Read-only git is fine for context.

    line 34
  3. Distinctive:

    State the scope plainly: Every run MUST tell the user, in plain words, that this is capture plumbing only and that squad behaviour will NOT …

    line 38
  4. Distinctive:

    No flags. The skill is interactive — it asks for consent before writing.

    line 48
  5. Very specific:

    Create .squad/hooks/ if absent (chmod 0o700 — user-only).

    line 71
  6. Very specific:

    After the next Edit/Write in a Claude Code session, confirm .squad/pending-journal.jsonl exists and has grown a JSONL line.

    line 114
  7. Very specific:

    Remove the PostToolUse entry from .claude/settings.json.

    line 119
  8. Very specific:

    Delete the .squad/hooks/ directory.

    line 120

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Skill: Enable Journaling

Objective

Help the user opt in to auto-journaling capture plumbing (PR1 / Fase 1a). This installs an opt-in Claude Code PostToolUse hook that records work-trail metadata — a timestamp, the tool name, and the edited file path — into a local staging file (.squad/pending-journal.jsonl). It captures NO file contents.

This skill does two things and nothing else:

  1. Copies the two bundled hook scripts (hooks/post-tool-use.mjs and hooks/journal-event.mjs) into the user's .squad/hooks/, chmod 0o700.
  2. Prints the exact .claude/settings.json PostToolUse snippet for the user to paste themselves.

It is capture-only. The squad's behaviour does not change as a result of enabling journaling — the captured breadcrumbs are not yet read by anything.

Inviolable Rules

  1. Never auto-write .claude/settings.json. The skill PRINTS the snippet and the user pastes it. Claude Code settings are the user's to edit — the skill never modifies them, not even with confirmation.
  2. Explicit consent before any copy. Before copying files into .squad/hooks/, confirm with the user in plain language what will be written and where. No silent file creation.
  3. No git commit, no git push. Read-only git is fine for context. The user owns the commit.
  4. No AI attribution in anything this skill writes or prints. Consistent with the squad-wide commit-authorship rule.
  5. State the scope plainly. Every run MUST tell the user, in plain words, that this is capture plumbing only and that squad behaviour will NOT change until a follow-up release (PR2) adds distillation and retrieval.

Inputs

/squad:enable-journaling

No flags. The skill is interactive — it asks for consent before writing.

Phase 1 — Explain and get consent

Tell the user, in plain language:

  • What this installs: an opt-in PostToolUse hook that records metadata only (timestamp, tool name, edited path) to .squad/pending-journal.jsonl. It never records file contents.
  • Scope statement (mandatory): "This is capture plumbing only — squad behaviour will NOT change until a follow-up release (PR2) adds distillation and retrieval. Until then the captured breadcrumbs simply accumulate locally."
  • What gets written: two scripts copied into .squad/hooks/.
  • What does NOT get written: .claude/settings.json — the skill prints a snippet for the user to paste themselves.

Then ask: "Copy the journaling hook scripts into .squad/hooks/?" Proceed only on an explicit yes.

Phase 2 — Copy the hook scripts

On consent:

  1. Create .squad/hooks/ if absent (chmod 0o700 — user-only).
  2. Copy hooks/post-tool-use.mjs from the plugin package into .squad/hooks/post-tool-use.mjs.
  3. Copy hooks/journal-event.mjs from the plugin package into .squad/hooks/journal-event.mjs (the adapter imports it as a sibling).
  4. chmod 0o700 both copied files.

Confirm to the user which files were written.

Phase 3 — Print the settings snippet

Print the exact .claude/settings.json PostToolUse hook snippet for the user to paste. Do NOT write it for them:

{
  "hooks": {
    "PostToolUse": [
      {
        "matcher": "Edit|Write",
        "hooks": [
          {
            "type": "command",
            "command": "node .squad/hooks/post-tool-use.mjs"
          }
        ]
      }
    ]
  }
}

Tell the user: paste this into .claude/settings.json, merging with any existing hooks block rather than overwriting it.

Phase 4 — Verify and disable instructions

Print both:

Verify the hook is wired:

  • Open .claude/settings.json and confirm the PostToolUse entry above is present with "matcher": "Edit|Write".
  • After the next Edit/Write in a Claude Code session, confirm .squad/pending-journal.jsonl exists and has grown a JSONL line.

Disable journaling:

  • Remove the PostToolUse entry from .claude/settings.json.
  • Delete the .squad/hooks/ directory.
  • Set journaling: off in .squad.yaml (this is also the default — the field exists so the choice is explicit and repo-versioned).

Boundaries

  • This skill never writes .claude/settings.json — it only prints the snippet.
  • This skill never runs state-mutating git commands.
  • This skill only writes inside .squad/hooks/.
  • This skill never enables journaling silently — explicit consent gates the copy.
  • This skill never carries AI attribution into anything it writes or prints.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.