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.
In this repository12 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- github-issueSkill
- okf:createSkill
- okf:editSkill
- okf:_okf-skill-git-commitSkill
- okf:_okf-skill-read-specSkill
- okf:reconcileSkill
- okf:_okf-skill-scan-bundleSkill
- okf:searchSkill
- okf:updateSkill
- okf:_okf-skill-validateSkill
- okf:validateSkill
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
- Distinctive: line 36
If the command fails (not a git repo), use the current working directory as the root.
- Distinctive: line 49
Do not pretty-print; the entire object must fit on one line.
- Very specific: line 60
Never overwrite or truncate the file.
- Distinctive: line 62
If the append fails, print a one-line warning and continue — do not abort the calling skill's flow.
≈ “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.
Files
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:
| Field | Description |
skill | okf:<skill-name> (e.g. okf:create) |
version | Skill version string from frontmatter (e.g. "1.0") |
bundle | Absolute path to the bundle root used in this invocation |
outcome | success, conflict, error, or cancelled |
concepts_added | Integer or null |
concepts_updated | Integer or null |
concepts_split | Integer or null |
conflicts | Integer or null |
note | Short 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-toplevelIf 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.
nullvalues must be the JSON literalnull, not the string"null".- The
notefield: usenullif 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.jsonlNever 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.
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
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.

