Course/Secure/Lesson 2

Lesson 4.2: Build Your Toolkit Structure

Duration: 35 min

Learning Objectives

  • Create the directory structure for a shareable toolkit
  • Copy and organise your components for distribution
  • Create a starter CLAUDE.md template for installers
🎯 What You'll Learn: How to go from a toolkit plan to a real, installable folder, with everything in the right place
⏱️ Time Required: 35 minutes

From Plan to Structure

Riley has her inventory done. She knows what goes in the toolkit. Now she's building it.

"The plan was just a document. This lesson is where it becomes a real thing, a folder someone can copy and have working in ten minutes."
β€” Riley Harper

In this lesson you'll create the directory structure, copy your components in, and add the template files a new installer needs. By the end, your toolkit will be structurally complete. The README and security review come next.


Step 1: Create the Directory Structure (10 min)

# Create your toolkit folder and all subdirectories
mkdir -p ~/toolkits/margin-operations-toolkit/{skills,agents,hooks,templates}
cd ~/toolkits/margin-operations-toolkit

After this, your layout should be:

margin-operations-toolkit/
β”œβ”€β”€ skills/
β”œβ”€β”€ agents/
β”œβ”€β”€ hooks/
└── templates/

You'll add README.md in this lesson.


Step 2: Copy Your Components (10 min)

Move your existing skill and agent files into the toolkit folder.

# Copy skills (adjust paths to where your files actually live)
cp -r ~/.claude/skills/weekly-margin-report    skills/
cp -r ~/.claude/skills/data-validator   skills/

# Copy agents
cp -r ~/.claude/agents/risk-analyzer    agents/

# Extract the hooks section from your .claude/settings.json
# and save it as a snippet the installer can merge in

For hooks: don't copy your entire settings.json. Instead, create a hooks/settings-snippet.json that contains only the hooks block, the installer can add it to their own settings:

{
  "hooks": {
    "PostToolUse": [
      {
        "matcher": "Write",
        "hooks": [
          {
            "type": "command",
            "command": "echo \"$(date '+%Y-%m-%d %H:%M'): Wrote $CLAUDE_TOOL_INPUT_PATH\" >> ~/automation-log.txt"
          }
        ]
      }
    ]
  }
}

Verify your files are in place:

# List all files to confirm they're in the right locations
find . -type f | sort

Verify every file you expect to share actually exists in the right location.


Step 3: Create Templates (5 min)

Give installers a head-start with a CLAUDE.md they can customise:

templates/CLAUDE.md.template:

# [Your Team/Project] Automation Context

## Overview
**What this is:** [One sentence description of the automation]
**Who it's for:** [Role/team who uses it]
**Business context:** [Why it exists, what problem it solves]

## Key Terminology
| Term | What it means in your context |
|------|-------------------------------|
| [Term 1] | [Your definition] |
| [Term 2] | [Your definition] |

## Standards & Thresholds
| Metric | Threshold | Action |
|--------|-----------|--------|
| [Metric] | [Value] | [What to do] |

## Key People
| Name | Role | What they care about |
|------|------|----------------------|
| [Name] | [Role] | [Their priorities] |

Tell the installer to rename this to CLAUDE.md in their project directory and fill in the brackets.


Validate Before Moving On

Manual check:

ItemStatus
README.md exists at the toolkit root
All skill and agent files are in the right folders
hooks/settings-snippet.json contains only the hooks block
No credentials, real paths, or personal data in any file
templates/ folder has at least a CLAUDE.md.template

βœ… Success Criteria:

Toolkit directory exists with skills, agents, hooks, templates subdirectories
Every file you plan to share is in the right location
No credentials or hardcoded personal paths in any file
README.md placeholder exists (you'll write it in lesson 4.3)

What Riley Built

"Looking at this folder, I can see exactly what David will get. Everything is in one place. Next I need to write the README so he knows what to do with it."

Next Up

Lesson 4.3: Write Your README

The structure exists. Now you'll write the documentation that turns it from a confusing folder of files into something anyone can install in ten minutes.

AI Automation Academy is an independent course created by Mercedes Perez-Capilla. It is not affiliated with, endorsed by, or produced by Anthropic. Claudeβ„’ is a trademark of Anthropic. All tool references are for educational purposes.