okf:edit
Skill2 starsChanged 5 months agoUnlicenseView on GitHub
Modify an OKF bundle based on a natural-language instruction (rename, move, merge, add a section, bulk-tag). Use when you know exactly what to change and do not have a source document to ingest. Use okf:update to ingest new source documents; use okf:reconcile for a full source-alignment pass.
In this repository12 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- github-issueSkill
- okf:createSkill
- 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
- okf:_okf-skill-write-logSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 6 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
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 19
If no instruction is provided, ask the user what they want to change before proceeding.
- Distinctive: line 61
Before writing anything, produce a clear plan:
- Distinctive: line 94
Ask: "Apply these changes?
- Distinctive: line 96
Wait for the user's answer.
- Distinctive: line 100
After user approval, apply in this order to avoid broken intermediate states:
- Distinctive: line 116
After all changes, scan the bundle for broken links caused by the edit (renamed or deleted files).
- Very specific: line 120
Follow okf:_okf-skill-git-commit with commit message derived from the instruction: edit: <concise description of the change>
≈ “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 editing an OKF (Open Knowledge Format) bundle based on the user's instructions.
1. Parse arguments
$ARGUMENTS may contain:
- A natural language instruction describing what to change (required). May be quoted or unquoted.
bundle:<path>— path to the bundle root (default: current working directory).
If no instruction is provided, ask the user what they want to change before proceeding.
2. Classify the instruction
Understand what the user wants. Instructions fall into these categories — a single instruction may combine several:
Content edits — modifying the text of one or more concept files:
- Rewriting or extending a body section (
# Schema,# Examples, etc.) - Adding or removing a section
- Correcting factual content
- Updating
description,title, or other frontmatter fields
Structural edits — changing the organization of the bundle:
- Renaming a concept file or directory
- Moving concepts between directories
- Splitting one concept into multiple files
- Merging multiple concepts into one
- Creating or deleting concepts
Bulk edits — applying a uniform change across multiple concepts:
- Changing a
typevalue across all matching concepts - Adding or removing a tag from a set of concepts
- Adding a section to all concepts of a given type
- Normalizing frontmatter fields (e.g., converting
timestampto UTC)
Cross-link edits — modifying how concepts reference each other:
- Fixing broken links
- Converting relative links to absolute (bundle-relative) links or vice versa
- Adding links between concepts that should be related but aren't
Identify the category, the scope (single concept / directory / whole bundle / cross-cutting filter), and the target (which files are affected).
3. Read the relevant portion of the bundle
- For single-concept edits: read only that file.
- For directory-scoped edits: read all concept files in that directory.
- For whole-bundle or bulk edits: scan all concepts and read the files that match the filter implied by the instruction.
Also read the affected index.md files and log.md.
4. Plan the changes
Before writing anything, produce a clear plan:
Edit plan
─────────────────────────────────────────
Instruction : "<user instruction>"
Scope : <single concept / <N> concepts / whole bundle>
Bundle : <path>
CHANGES (<N> files)
~ path/to/concept.md
[field] description: "old value" → "new value"
[body] Added section "# Usage" with <N> lines
[move] → new/path/concept.md
~ path/to/other.md
[type] "BigQuery Table" → "Table"
INDEX UPDATES (<N>)
↻ tables/index.md — reflects rename
LOG ENTRY
log.md — will add **Edit** entry for todayFor destructive changes (deleting concepts, merging files, removing sections), call them out explicitly:
DESTRUCTIVE CHANGES — review carefully
✗ legacy/old-concept.md — will be deleted
✗ tables/orders.md (body section "# Old Notes") — will be removedAsk: "Apply these changes? (yes / no / describe adjustments)"
Wait for the user's answer. If they request adjustments, revise the plan and show it again. Never apply any change without explicit approval.
5. Apply changes
After user approval, apply in this order to avoid broken intermediate states:
- Content edits: rewrite fields and body sections as planned. Preserve all frontmatter keys not mentioned in the plan. Update
timestampto the current datetime on any concept whose content changed. - Structural edits:
- Renames/moves: write the file at the new path, delete the old one, update all cross-links in the bundle that pointed to the old path.
- Splits: write the new concept files, remove the original, update cross-links.
- Merges: write the merged concept, remove the originals, update cross-links.
- Index files: regenerate
index.mdfor every affected directory. Preserve any manually written content not related to the changed concepts. - Log file: prepend an entry to
log.mdat the bundle root:## <YYYY-MM-DD> * **Edit**: <concise description of what changed and why, derived from the instruction>.
6. Cross-link integrity
After all changes, scan the bundle for broken links caused by the edit (renamed or deleted files). Report any that remain and offer to fix them. Do not leave the bundle in a state with newly introduced broken links without warning the user.
7. Git (optional)
Follow okf:_okf-skill-git-commit with commit message derived from the instruction:
edit: <concise description of the change>
8. Validate
Follow okf:_okf-skill-validate.
9. Final report
OKF bundle edited
─────────────────────────────────────────
Bundle : <absolute path>
Changed : <N> concept file(s)
Structural : <renames / moves / splits / merges, or "none">
Links fixed: <N> cross-links updated
Git : committed / not committed
Validation : ✓ Conformant (OKF <version>)
Skill version : 1.010. Write invocation log
Follow okf:_okf-skill-write-log with:
skill:okf:edit,version:1.0bundle: absolute path to the bundle rootoutcome:successif the final report was printed;cancelledif the user declined the plan;errorif an unrecoverable error occurredconcepts_added:nullconcepts_updated: number of concept files changed (N from final report)concepts_split:nullconflicts:nullnote:null
Examples of valid instructions
"Rename type 'BigQuery Table' to 'Table' everywhere""Move all concepts tagged 'legacy' into a new legacy/ directory""Add a # Usage section to tables/orders.md explaining how to query it""Split tables/customers.md into two concepts: one for schema, one for PII handling""Convert all relative cross-links to absolute bundle-relative paths""Remove the tag 'wip' from all concepts that have a description""Merge datasets/sales.md and datasets/marketing.md into a single datasets/commercial.md"
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.

