In Chapter 1: The Skill Definition (Natural Language Programs), we learned that a Skill is just a Markdown file that gives the AI a specific procedure to follow.
But here is the catch: A file sitting on your hard drive does nothing by itself.
If you start a session with Claude Code or OpenCode and immediately ask it to "debug this," it won't know that you have a meticulously crafted debugging/SKILL.md file waiting for it. It will just revert to its default behavior and guess.
We need a way to force the AI to "wake up" knowing that it has superpowers. We need to install an Operating System before we run the apps.
Every time you start a new chat session with an AI, it is born yesterday. It has no memory of your files, your preferences, or your rules.
Without a Bootstrap Layer, your conversation would look like this:
skills/using-superpowers/SKILL.md and follow it. Also, please look at my skills folder to see what tools I have."That setup step is tedious. We want to automate it so the AI wakes up already knowing the rules.
Think of the scene in The Matrix where the operator uploads a combat training program directly into Neo's brain. Neo wakes up, blinks, and says, "I know Kung Fu."
This is exactly what the Bootstrap Layer does.
using-superpowers.
The specific file we inject is skills/using-superpowers/SKILL.md. This is the "Master Skill" or the "God Skill."
It doesn't tell the AI how to write code. It tells the AI how to use the other skills.
Here is a simplified version of what's inside that file:
<EXTREMELY-IMPORTANT>
You have access to a library of "Skills".
Before you answer the user, you MUST check if a Skill applies.
If the user says "Fix bug", look for a "debugging" skill.
Do not guess. Use the tools.
</EXTREMELY-IMPORTANT>
By injecting this text at the very start, the AI enters the chat ready to work.
Different AI environments (Claude Code, OpenCode, Codex) have different ways of letting us run code at startup. We call these Hooks.
A Hook is just a script that the environment runs before it lets the user type.
In Claude Code (and similar command-line tools), we use a bash script located at hooks/session-start.sh.
Imagine this logic:
#!/bin/bash
# 1. Find the Master Skill file
SKILL_FILE="skills/using-superpowers/SKILL.md"
# 2. Read the text inside it
CONTENT=$(cat $SKILL_FILE)
# 3. Print it out in a format the Agent understands
# (We pretend to be the system handing over data)
echo "Here is your starting context: $CONTENT"
Explanation: When you type claude, this script runs instantly. It grabs the text from your hard drive and prepares it for the agent.
"Context" is the AI's short-term memory. "Injection" means putting text there that the user didn't type.
Usually, the Context looks like this:
After we use the Bootstrap Layer, the Context looks like this:
The AI now "thinks" these instructions are part of its core personality.
Let's see how this works step-by-step using a diagram.
Let's look at real examples of how this is done in the Superpowers project.
OpenCode allows us to write plugins in JavaScript. We use a "transform" to edit the system prompt.
File: .opencode/plugins/superpowers.js (Simplified)
// We need to read files from the disk
import fs from 'fs';
// This function runs every time the AI prepares to speak
export const SuperpowersPlugin = async () => {
return {
'experimental.chat.system.transform': async (input, output) => {
// 1. Read the Master Skill from the disk
const skill = fs.readFileSync('skills/using-superpowers/SKILL.md', 'utf8');
// 2. Push it into the AI's system prompt list
output.system.push(`<IMPORTANT>You have superpowers: ${skill}</IMPORTANT>`);
}
};
};
Explanation:
chat.system.transform event.SKILL.md file using standard JavaScript file reading (fs).output.system array. Now, OpenCode sends this text to the LLM (Large Language Model) automatically.
For environments that just run shell scripts (like Claude Code's CLAUDE_HOOKS), we output JSON data that the tool reads.
File: hooks/session-start.sh (Simplified)
#!/usr/bin/env bash
# 1. Read the file content
CONTENT=$(cat skills/using-superpowers/SKILL.md)
# 2. Output a JSON object that the Host tool expects
# This tells the tool: "Add this text to the conversation context"
cat <<EOF
{
"hookSpecificOutput": {
"additionalContext": "<EXTREMELY_IMPORTANT> ${CONTENT} </EXTREMELY_IMPORTANT>"
}
}
EOF
Explanation:
cat reads the file.additionalContext. It takes that text and silently feeds it to the AI.You might wonder: Why don't we inject ALL the skills at startup?
If you have 50 skills, that is too much text. The AI's brain (context window) will get cluttered, and it will get expensive.
Instead, we only inject One Skill to Rule Them All: using-superpowers.
using-superpowers.skills/ folder to see if I have a tool for this job."It is a pointer system. We inject the instruction on how to find tools, not the tools themselves.
The Bootstrap Layer is the invisible hand that sets up the environment. By using Hooks and Context Injection, we ensure the AI is disciplined and aware of its capabilities from the very first second.
You don't need to explain the rules to the AI anymore. The Bootstrap Layer does it for you.
Now that the AI knows it has skills and knows it should look for them, how does it actually find the specific one it needs?
Skill Discovery & Core Library
Generated by Code IQ