agentleFS
siculosiculo/okf-skills/skills/_okf-skill-write-log/SKILL.md

okf:_okf-skill-write-log

Skill2 starsChanged 5 months agoUnlicenseView on GitHub

Internal skill: append one JSON line to .claude/invocation-log.jsonl at the repository root. Called at the end of each public okf skill.

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 3 are distinctive, and 1 is 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.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If the command fails (not a git repo), use the current working directory as the root.

    line 36
  2. Distinctive:

    Do not pretty-print; the entire object must fit on one line.

    line 49
  3. Very specific:

    Never overwrite or truncate the file.

    line 60
  4. Distinctive:

    If the append fails, print a one-line warning and continue — do not abort the calling skill's flow.

    line 62

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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

You are writing one structured log entry for a completed skill invocation.

1. Collect fields from the calling context

The calling skill provides these values inline:

FieldDescription
skillokf:<skill-name> (e.g. okf:create)
versionSkill version string from frontmatter (e.g. "1.0")
bundleAbsolute path to the bundle root used in this invocation
outcomesuccess, conflict, error, or cancelled
concepts_addedInteger or null
concepts_updatedInteger or null
concepts_splitInteger or null
conflictsInteger or null
noteShort human-readable string or null

Generate ts yourself: current datetime in ISO 8601 UTC format (e.g. 2026-06-26T14:05:00Z).

2. Find the repository root

Run:

git rev-parse --show-toplevel

If the command fails (not a git repo), use the current working directory as the root.

3. Build the JSON line

Construct a single-line JSON object with keys in this exact order:

{"ts":"<ts>","skill":"<skill>","version":"<version>","args":"<args>","bundle":"<bundle>","outcome":"<outcome>","concepts_added":<concepts_added>,"concepts_updated":<concepts_updated>,"concepts_split":<concepts_split>,"conflicts":<conflicts>,"note":<note>}
  • String values must be JSON-escaped.
  • null values must be the JSON literal null, not the string "null".
  • The note field: use null if not applicable, otherwise a JSON string.
  • Do not pretty-print; the entire object must fit on one line.

4. Append to the log file

Target path: <repo-root>/.claude/invocation-log.jsonl

mkdir -p <repo-root>/.claude
echo '<json-line>' >> <repo-root>/.claude/invocation-log.jsonl

Never overwrite or truncate the file. Always append (>>).

If the append fails, print a one-line warning and continue — do not abort the calling skill's flow.

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.