agentleFS
siculosiculo/okf-skills/skills/okf-skill-create/SKILL.md

okf:create

Skill2 starsChanged 5 months agoUnlicenseView on GitHub

Create a new OKF bundle from source documents. Usage: /okf:create <source-path> [output:<bundle-path>] [git:yes|no]

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 4 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    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. Distinctive:

    If no source path is provided, ask the user before proceeding.

    line 18
  2. Very specific:

    Read every source document at the given path.

    line 26
  3. Distinctive:

    Ask: "Proceed with this structure?

    line 63
  4. Distinctive:

    Wait for the user's answer.

    line 65
  5. Very specific:

    Write log.md at the bundle root.

    line 92
  6. Very specific:

    Only if skills:yes was specified: copy all skill files found in skills/ (relative to the current working directory) into …

    line 103
  7. Very specific:

    If git:yes was specified, or if not specified and the user confirms:

    line 111
  8. Distinctive:

    If the bundle root is not already inside a git repository, run git init.

    line 112
  9. Very specific:

    Follow okf:_okf-skill-git-commit with commit message: Initialize OKF bundle (<N> concepts, <M> types)

    line 113

≈ “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 creating a new OKF (Open Knowledge Format) bundle from one or more source documents.

1. Parse arguments

$ARGUMENTS may contain:

  • A path to source documents: a single file, a directory, or a glob pattern (required).
  • output:<path> — destination directory for the new bundle (default: ./okf-bundle).
  • git:yes or git:no — whether to initialize a git repository (default: ask at the end).
  • skills:yes or skills:no — whether to copy the OKF skill files into the bundle (default: no).

If no source path is provided, ask the user before proceeding.

2. Read the spec

Follow okf:_okf-skill-read-spec.

3. Read source documents

Read every source document at the given path. Supported formats: .md, .txt, .pdf, .csv, and any other readable format. For each document, extract:

  • Main topic and subtopics.
  • Key facts, definitions, processes, schemas, or relationships described.
  • Any explicit references to external resources (URLs, system names, table names, etc.).
  • Relationships between topics that could become cross-links.

4. Design the bundle structure

From the extracted knowledge, decide:

  1. Concepts: what distinct concepts to create. Each concept is one .md file. Prefer granular concepts over monolithic ones — if a source document covers five distinct topics, create five concept files.
  2. Types: assign a type to each concept. Be descriptive and consistent within the bundle (e.g., Metric, BigQuery Table, API Endpoint, Playbook, Reference). Use the same type string for the same kind of thing across all concepts.
  3. Hierarchy: group concepts into subdirectories by domain or category, not by source file. A concept from document A and a concept from document B may belong in the same subdirectory.
  4. Cross-links: identify relationships between concepts that should be expressed as markdown links in the body.
  5. Tags: identify cross-cutting tags.

Before writing any files, present the proposed structure to the user:

Proposed OKF bundle: <output path>
─────────────────────────────────────────
<bundle-root>/
├── index.md
├── log.md
├── <group>/
│   ├── index.md
│   ├── <concept>.md
│   └── <concept>.md
└── <group>/
    ├── index.md
    └── <concept>.md

Concepts : <N>
Types    : <list of distinct type values>
Tags     : <list of distinct tags>
Source   : <N> document(s) read

Ask: "Proceed with this structure? (yes / no / describe changes)"

Wait for the user's answer. If they request changes, revise the structure and show it again before writing.

5. Write the bundle

After user approval:

Concept files

For each concept, write a .md file at the planned path with:

  • Frontmatter:
    • type: as decided
    • title: human-readable display name
    • description: one sentence summarizing the concept
    • resource: canonical URI if the concept describes a concrete external asset; omit otherwise
    • tags: YAML list of relevant tags
    • timestamp: current datetime in ISO 8601 (UTC)
  • Body: structured markdown derived from the source content. Use headings, lists, and tables. Add cross-links to related concepts using bundle-relative paths (starting with /). Include a # Citations section if claims are sourced from external material.

Index files

For each directory (including the root), write index.md with no frontmatter. Exception: the root index.md MAY include frontmatter with okf_version. Format per the spec's "Index files" section:

# <Directory / Group Name>

* [Title](./concept.md) - description from frontmatter
* [Subdirectory](./subdir/) - what this group contains

Log file

Write log.md at the bundle root. Format per the spec's "Log files" section, with today's date and one entry per concept created:

# Bundle Update Log

## <YYYY-MM-DD>
* **Creation**: Initialized OKF bundle from <N> source document(s).
* **Creation**: Added [<title>](<path>) — <description>.
…

Skill files (optional)

Only if skills:yes was specified: copy all skill files found in skills/ (relative to the current working directory) into <bundle-root>/skills/.

SPEC.md

Fetch SPEC.md from the upstream repository and write it to <bundle-root>/SPEC.md: https://raw.githubusercontent.com/GoogleCloudPlatform/knowledge-catalog/main/okf/SPEC.md

6. Git (optional)

If git:yes was specified, or if not specified and the user confirms:

  1. If the bundle root is not already inside a git repository, run git init.
  2. Follow okf:_okf-skill-git-commit with commit message: Initialize OKF bundle (<N> concepts, <M> types)

7. Validate

Follow okf:_okf-skill-validate.

8. Final report

OKF bundle created
─────────────────────────────────────────
Path      : <absolute path>
Concepts  : <N> files across <M> directories
Types     : <list>
Git       : initialized with initial commit  /  not initialized
Skills    : copied  /  not included
Validation: ✓ Conformant (OKF <version>)
Skill version: 1.0

9. Write invocation log

Follow okf:_okf-skill-write-log with:

  • skill: okf:create, version: 1.0
  • bundle: absolute path to the bundle root written in step 5
  • outcome: success if the final report was printed; cancelled if the user declined the proposed structure; error if an unrecoverable error occurred
  • concepts_added: number of concept files written
  • concepts_updated: null
  • concepts_split: null
  • conflicts: null
  • note: null

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.