{"slug": "a-skill-to-generate-an-okf-index-md-file-for-a-specific-directory", "title": "A skill to generate an OKF `index.md` file for a specific directory.", "summary": "A developer created a skill that generates or updates an OKF-compliant index.md file for a specified directory, designed to help AI agents understand workspace structure. The skill scans only immediate files and subdirectories, extracts metadata from existing frontmatter, and produces a standardized index with relative links.", "body_md": "| name | generate-index | ||||\n|---|---|---|---|---|---|\n| description | Generates or updates an OKF (v0.2) compliant index.md file for a specified directory. Useful for contextualizing workspace structure for AI agents. | ||||\n| argument_pattern | ^@?([a-zA-Z0-9_-]+/?)+$ | ||||\n| tags |\n|\n||||\n| tools |\n|\n\nGenerate or update an `index.md`\n\nfile for a specified directory following the Open Knowledge Format ([OKF v0.2](https://github.com/GoogleCloudPlatform/knowledge-catalog/blob/main/okf/SPEC.md)) standard.\n\nTarget Directory: `$ARG_1`\n\n(e.g., `@path/to/dir`\n\nor passed path)\n\n**Direct Children Only**: Scan ONLY immediate files and immediate subdirectories in`$ARG_1`\n\n.**DO NOT scan recursively into subdirectories**.** Reserved Files**: DO NOT scan or read`index.md`\n\nor`log.md`\n\n.**No Fabrication**: Extract values ONLY from existing YAML frontmatter (`title`\n\n,`description`\n\n,`type`\n\n,`tags`\n\n) or file body.**Description Rule**: Force every description to be a single concise sentence.** Links**: Use relative paths starting from`$ARG_1`\n\n(e.g.,`./file.md`\n\nor`./subdir/index.md`\n\n).\n\n- Scan immediate\n`.md`\n\nfiles and immediate subdirectories under`$ARG_1`\n\n. - Extract frontmatter (\n`type`\n\n,`title`\n\n,`description`\n\n) from immediate`.md`\n\nfiles. - For immediate subdirectories, check if\n`./subdir/index.md`\n\nexists to get its description, or use a short summary of the folder. - Write or overwrite\n`$ARG_1/index.md`\n\nusing the template below.\n\n## type: Directory Index title: \"[Directory Name] Index\" description: \"[One-sentence summary of what this directory contains]\" tags: [index]\n\n[Brief explanation of the directory's purpose based on its contents]\n\n| File / Path | Type | Description |\n|---|---|---|\n|", "url": "https://wpnews.pro/news/a-skill-to-generate-an-okf-index-md-file-for-a-specific-directory", "canonical_source": "https://gist.github.com/koron/3367e16f29798d06a82d19ad6be3710e", "published_at": "2026-08-18 03:03:59+00:00", "updated_at": "2026-08-23 12:14:14.299723+00:00", "lang": "en", "topics": ["developer-tools", "ai-agents"], "entities": ["Open Knowledge Format", "Google Cloud Platform"], "alternates": {"html": "https://wpnews.pro/news/a-skill-to-generate-an-okf-index-md-file-for-a-specific-directory", "markdown": "https://wpnews.pro/news/a-skill-to-generate-an-okf-index-md-file-for-a-specific-directory.md", "text": "https://wpnews.pro/news/a-skill-to-generate-an-okf-index-md-file-for-a-specific-directory.txt", "jsonld": "https://wpnews.pro/news/a-skill-to-generate-an-okf-index-md-file-for-a-specific-directory.jsonld"}}