agentleFS
jwrobesjwrobes/skills/scaffold-docs-folder/SKILL.md

scaffold-docs-folder

Skill1 starsChanged 7 months agoMITView on GitHub

Create a new project folder or subfolder inside a documentation repo with README scaffolding and index updates. Use when the user wants to add a new documentation project folder, create a subfolder in an existing project, or organize new documentation.

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 7 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Create a new project folder or subfolder inside a documentation repo with a properly structured README and updated indexes.

    line 8
  2. Distinctive:

    If the current working directory is inside a docs repo (has a master index markdown file at its root), use that.

    line 14
  3. Very specific:

    If the repo has documentation-maintenance rules in .cursor/rules/, follow them.

    line 121
  4. Very specific:

    Always use lowercase_with_underscores for folder names.

    line 162
  5. Distinctive:

    Every folder MUST have a README.md — this is non-negotiable per the repo conventions.

    line 163
  6. Distinctive:

    Read the parent README and index before updating them — don't blindly append.

    line 164
  7. Distinctive:

    If the user provides initial documents to place in the folder, add them to the README's file guide and folder tree.

    line 165
  8. Distinctive:

    Don't create placeholder files beyond the README unless the user asks.

    line 166
  9. Distinctive:

    If the subfolder will contain 3+ files, the README should include all the standard subfolder sections (Purpose, Context, File Guide, Key …

    line 167

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

Scaffold Documentation Folder

Create a new project folder or subfolder inside a documentation repo with a properly structured README and updated indexes.

Paths

Determine the docs repo root dynamically:

  1. If the current working directory is inside a docs repo (has a master index markdown file at its root), use that.
  2. Otherwise, ask the user: "Which docs repo should I create this folder in?"
ResourceHow to Find
Docs repo rootCurrent directory or user-specified path
Master indexLook for *-INDEX.md or INDEX.md at the repo root
Documentation rulesCheck for .cursor/rules/documentation-maintenance.mdc

When to Use

  • User wants to create a new project/topic folder in a docs repo
  • User wants to add a subfolder within an existing project
  • User mentions "new docs folder", "new project in docs", "add a folder for <topic>"

Step 1: Determine Scope

Ask the user:

  1. Top-level or subfolder?
    • Top-level: new project folder directly under the docs repo root
    • Subfolder: new folder inside an existing project (e.g., <existing_project>/new_analysis/)
  2. Folder name — Use lowercase_with_underscores per repo conventions.
  3. Brief description — 1-2 sentences about what this folder covers.
  4. Related workspace? — "Is this docs folder related to a project workspace (e.g., <project>_workspace)? If so, which one?"

Step 2: Create the Folder and README

For Top-Level Project Folders

Create <docs_repo_root>/<folder_name>/README.md:

# <Title (Title Case of folder name)>

**Status:** Active

---

## Overview

<Brief description from Step 1>

**Related Workspace:** `~/workspace/<project>_workspace/`
<!-- Remove the Related Workspace line if no workspace relationship -->

---

## Folder Structure

<folder_name>/ ├── README.md # This file


---

## Document Index

| Document | Description |
|----------|-------------|

---

## Related Resources

<!-- Links to other docs folders, external references, or workspace initiatives -->

For Subfolders

Create <docs_repo_root>/<project>/<subfolder_name>/README.md:

# <Title>

## Purpose

<Brief description from Step 1>

## Context

<Enough background for an LLM to understand the domain without reading every file. Ask the user for this or infer from the parent project's README.>

**Related Workspace:** `~/workspace/<project>_workspace/`
<!-- Remove if no workspace relationship -->

## File Guide

| File | Description |
|------|-------------|
| `README.md` | This file |

## Key Terminology

<!-- Add domain-specific terms if the subfolder has specialized vocabulary -->

## Recommended Reading Order

1. This README

Step 3: Update Indexes

If the repo has documentation-maintenance rules in .cursor/rules/, follow them. The update cascade is:

For Top-Level Folders

  1. Read the master index file (e.g., *-INDEX.md or INDEX.md) to understand the current structure
  2. Add an entry under "Active Projects" in alphabetical position:
#### [<folder_name>/](./<folder_name>/)
<Description>

**Key Documents:**
- `<folder_name>/README.md` - Project index

For Subfolders

  1. Read the parent project's README.md
  2. Update the folder tree — add the new subfolder with an inline comment
  3. Update the document index table — add a row linking to the subfolder's README with a description

Step 4: Commit

cd <docs_repo_root>
git add <new_folder_path>/
git add <master_index_file>             # if top-level folder was created
git add <project>/README.md             # if subfolder was created
git commit -m "Add <folder_name> documentation folder"

Step 5: Offer Next Steps

Tell the user:

  1. Folder created at <full_path>
  2. README scaffolded with template structure
  3. Indexes updated
  4. Suggest: "Want to add any initial documents to this folder?"

Guidelines

  1. Always use lowercase_with_underscores for folder names.
  2. Every folder MUST have a README.md — this is non-negotiable per the repo conventions.
  3. Read the parent README and index before updating them — don't blindly append; maintain alphabetical order and consistent formatting.
  4. If the user provides initial documents to place in the folder, add them to the README's file guide and folder tree.
  5. Don't create placeholder files beyond the README unless the user asks.
  6. If the subfolder will contain 3+ files, the README should include all the standard subfolder sections (Purpose, Context, File Guide, Key Terminology, Recommended Reading Order).

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.